﻿/* =========================================================
   RF ASIA ERP PORTAL — CLEAN LIGHT THEME
   ========================================================= */

/* =========================
   COLOR SYSTEM
   ========================= */
:root {
    --brand-1: #40dd72;
    --brand-2: #00b5ff;
    --brand-strong: #0080c7;
    --bg-page: #f3f6fb;
    --surface-1: #ffffff;
    --surface-2: #f9fafb;
    --border-subtle: #e5e7eb;
    --border-strong: #cbd5e1;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-soft: #9ca3af;
    --focus: #00b5ff;
    --focus-ring: rgba(0, 181, 255, 0.25);
    --success: #16a34a;
    --danger: #dc2626;
}

/* =========================
   BASE
   ========================= */
html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, #f9fbff, #eff3fb);
}

/* =========================
   TOP BAR
   ========================= */
.top-appbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .6rem .9rem;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-subtle);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: .8rem;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
}

.brand-pill {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem .9rem;
    border-radius: .9rem;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
}

    .brand-pill .cube {
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: .55rem;
        background-image: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    }

.search-wrap {
    flex: 1;
    border-radius: .9rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    padding: .25rem .6rem;
}

    .search-wrap input {
        border: 0;
        background: transparent;
        width: 100%;
        outline: none;
    }

.user-chip {
    border-radius: .9rem;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
}

/* =========================
   MASTER LAYOUT
   ========================= */
.app-shell {
    display: flex;
    min-height: calc(100vh - 70px);
}

.left-sidebar {
    width: 200px;
    background: #ffffff;
    border-right: 1px solid var(--border-subtle);
    padding: 10px;
    transition: width 0.3s ease;
    overflow-y: auto;
}

    .left-sidebar.collapsed {
        width: 0;
        padding: 0;
        overflow: hidden;
    }

        .left-sidebar.collapsed .menu-link,
        .left-sidebar.collapsed .accordion-body,
        .left-sidebar.collapsed .sidebar-home span,
        .left-sidebar.collapsed .accordion-button span {
            display: none;
        }

.main-content-area {
    flex: 1;
    padding: 10px;
    transition: all .3s ease;
}

/* =========================
   SIDEBAR MENU
   ========================= */
.sidebar-home {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: #0b1220 !important;
    text-decoration: none;
    font-weight: 700;
}

.sidebar-accordion .accordion-item {
    border: none;
    margin-bottom: 8px;
}

.sidebar-accordion .accordion-button {
    border-radius: 10px !important;
    background: #ffffff;
    color: var(--text-main);
    font-weight: 600;
    border: 1px solid var(--border-subtle);
}

    .sidebar-accordion .accordion-button:not(.collapsed) {
        background: linear-gradient(135deg, rgba(64,221,114,.15), rgba(0,181,255,.12));
    }

.menu-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 6px;
    background: #f8fafc;
}

    .menu-link:hover {
        background: #e2e8f0;
    }

/* =========================================================
   LOGIN PAGE UI
   ========================================================= */

.login-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f7fbff, #eef5ff);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #dbe4f0;
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    }

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 220px;
    margin: auto;
    border-radius: 999px;
    padding: 16px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: #0b1220;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(0, 181, 255, 0.18);
}

.logo-line2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.login-title {
    margin-top: 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.login-input .input-group-text {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
}

.password-toggle-btn {
    cursor: pointer;
}

.login-footer {
    margin-top: 18px;
}

/* =========================
   CARD SYSTEM
   ========================= */
.card-dark {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    color: var(--text-main);
}

    /* =========================
   FORM CONTROLS
   ========================= */
    .form-label,
    label,
    .card-dark label,
    .card-dark .form-label {
        font-weight: 600;
        font-size: 14px;
        color: var(--text-main) !important;
        margin-bottom: 6px;
        display: inline-block;
    }

.form-control,
.form-select {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    background: #ffffff;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--focus);
        box-shadow: 0 0 0 .18rem var(--focus-ring);
    }

/* =========================
   TABLES
   ========================= */
.table-darkish {
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    overflow: hidden;
}

    .table-darkish th {
        background: #eaf3ff;
        color: #0f172a;
        font-weight: 600;
    }

    .table-darkish td {
        vertical-align: middle;
    }

/* =========================
   DASHBOARD TILES
   ========================= */
a.master-btn {
    display: flex !important;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(64,221,114,.14), rgba(0,181,255,.12));
    border: 1px solid var(--border-subtle);
    text-decoration: none !important;
    color: #0b1220 !important;
}

.master-icon-box {
    width: 44px;
    height: 44px;
    border-radius: .85rem;
    background-image: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
}

.master-btn-title {
    font-weight: 800;
    font-size: 1.05rem;
}

.master-btn-desc {
    font-size: .85rem;
    color: var(--text-muted);
}

/* =========================
   FOOTER
   ========================= */
footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a.footerlinks {
    color: var(--brand-strong);
}
