@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ─── SPICELAND BRAND TOKENS ─── */
:root {
    --green-deep:   #1e5c1e;
    --green-dark:   #236b23;
    --green-mid:    #2d7a2d;
    --green-light:  #3a9132;
    --green-bright: #4ea83e;
    --yellow:       #f5a800;
    --yellow-light: #ffc53d;
    --yellow-pale:  #fff3cd;
    --white:        #ffffff;
    --off-white:    #f8faf6;
    --gray-50:      #f0f4ee;
    --gray-100:     #e2eade;
    --gray-200:     #c8d4c2;
    --gray-400:     #7a9170;
    --gray-600:     #4a6644;
    --text-dark:    #1a3318;
    --text-body:    #2d4a28;
    --text-muted:   #5a7852;
    --danger:       #d63b3b;
    --success:      #2d7a2d;
    --info:         #1a6b8a;
    --radius:       12px;
    --radius-lg:    18px;
    --shadow-sm:    0 2px 8px rgba(30,92,30,0.10);
    --shadow-md:    0 4px 20px rgba(30,92,30,0.15);
    --shadow-lg:    0 8px 40px rgba(30,92,30,0.20);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--off-white);
    color: var(--text-body);
    min-height: 100vh;
}

/* ══════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(145deg, var(--green-deep) 0%, var(--green-mid) 50%, var(--green-bright) 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background rings */
.login-page::before {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(245,168,0,0.12);
    top: -200px; right: -100px;
    pointer-events: none;
}
.login-page::after {
    content: '';
    position: fixed;
    width: 400px; height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(245,168,0,0.08);
    bottom: -150px; left: -80px;
    pointer-events: none;
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.25);
    position: relative;
    animation: fadeUp 0.5s ease;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%; height: 4px;
    background: linear-gradient(90deg, var(--green-mid), var(--yellow), var(--green-mid));
    border-radius: 0 0 4px 4px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Logo in login card */
.logo { text-align: center; margin-bottom: 36px; }

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(45,122,45,0.35);
    position: relative;
    overflow: hidden;
}

.logo-mark::after {
    content: '';
    position: absolute;
    bottom: 14px; left: 10%; right: 10%;
    height: 3px;
    background: var(--yellow);
    border-radius: 3px;
    transform: scaleX(0.7);
}

.logo-mark svg { width: 38px; height: 38px; }

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--green-deep);
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1;
}

.logo-swoosh {
    display: block;
    margin: 6px auto 0;
    width: 120px; height: 10px;
}

.logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════
   ROLE BUTTONS
══════════════════════════════════════ */
.role-btn {
    padding: 14px 10px;
    border-radius: var(--radius);
    border: 2px solid var(--gray-100);
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--gray-50);
}

.role-btn.selected {
    border-color: var(--green-mid);
    background: rgba(45,122,45,0.06);
}

.role-btn .role-icon { font-size: 24px; margin-bottom: 5px; }
.role-btn .role-label { font-size: 13px; font-weight: 700; color: var(--text-muted); font-family:'Montserrat',sans-serif; letter-spacing:0.5px; }
.role-btn.selected .role-label { color: var(--green-mid); }

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.form-control {
    width: 100%;
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text-dark);
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--green-mid);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(45,122,45,0.10);
}

.form-control::placeholder { color: var(--gray-200); }

select.form-control { cursor: pointer; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    color: var(--white);
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 15px;
    box-shadow: 0 4px 16px rgba(45,122,45,0.30);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(45,122,45,0.40); }

.btn-success {
    background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-yellow {
    background: linear-gradient(135deg, var(--yellow), var(--yellow-light));
    color: var(--text-dark);
    box-shadow: 0 4px 14px rgba(245,168,0,0.30);
}
.btn-yellow:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,168,0,0.40); }

.btn-danger {
    background: rgba(214,59,59,0.08);
    color: var(--danger);
    border: 1.5px solid rgba(214,59,59,0.20);
}
.btn-danger:hover { background: rgba(214,59,59,0.15); }

.btn-outline {
    background: transparent;
    color: var(--green-mid);
    border: 1.5px solid var(--green-mid);
}
.btn-outline:hover { background: rgba(45,122,45,0.06); }

.btn-ghost {
    background: var(--gray-50);
    color: var(--text-muted);
    border: 1.5px solid var(--gray-100);
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-sm { padding: 8px 14px; font-size: 12px; border-radius: 8px; }

/* ══════════════════════════════════════
   LAYOUT — SIDEBAR + MAIN
══════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 265px;
    background: linear-gradient(180deg, var(--green-deep) 0%, var(--green-dark) 60%, var(--green-mid) 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(30,92,30,0.20);
}

/* Sidebar top brand */
.sidebar-brand {
    padding: 28px 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    position: relative;
}

.sidebar-brand-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-box {
    width: 44px; height: 44px;
    background: var(--yellow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--green-deep);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-brand h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
}

.sidebar-brand p {
    color: rgba(255,255,255,0.45);
    font-size: 10px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Sidebar nav */
.sidebar-nav { flex: 1; padding: 18px 12px; overflow-y: auto; }

.nav-section { margin-bottom: 22px; }

.nav-section-title {
    color: rgba(255,255,255,0.35);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 10px;
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.18s;
    margin-bottom: 2px;
    font-family: 'Nunito', sans-serif;
}

.nav-item:hover {
    background: rgba(255,255,255,0.10);
    color: var(--white);
}

.nav-item.active {
    background: var(--yellow);
    color: var(--green-deep);
    box-shadow: 0 4px 12px rgba(245,168,0,0.35);
}

.nav-item .icon {
    width: 22px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.06);
}

.user-avatar {
    width: 38px; height: 38px;
    background: var(--yellow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--green-deep);
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    flex-shrink: 0;
}

.user-info strong {
    display: block;
    font-size: 13px;
    color: var(--white);
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
}

.user-info span {
    font-size: 10px;
    color: rgba(255,255,255,0.40);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ══════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════ */
.main {
    margin-left: 265px;
    flex: 1;
    padding: 32px 36px;
    background: var(--off-white);
    min-height: 100vh;
}

/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.page-header { margin-bottom: 28px; }

.page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
    font-weight: 500;
}

/* ══════════════════════════════════════
   STAT CARDS
══════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px 22px 18px;
    border: 1.5px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.stat-card.green::after  { background: linear-gradient(90deg, var(--green-mid), var(--green-bright)); }
.stat-card.yellow::after { background: linear-gradient(90deg, var(--yellow), var(--yellow-light)); }
.stat-card.teal::after   { background: linear-gradient(90deg, #1a8a7a, #26b5a0); }
.stat-card.orange::after { background: linear-gradient(90deg, #e07b30, #f0a050); }

.stat-icon {
    font-size: 26px;
    margin-bottom: 12px;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1.5px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--white);
}

.card-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.card-body { padding: 24px; }

/* ══════════════════════════════════════
   TABLES
══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
    background: var(--gray-50);
    padding: 11px 16px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    border-bottom: 1.5px solid var(--gray-100);
}

td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--gray-50);
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    animation: fadeDown 0.3s ease;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success { background: #edf7ed; border: 1.5px solid #aedcae; color: #1f6b1f; }
.alert-danger  { background: #fdf0f0; border: 1.5px solid #f0b8b8; color: #b03030; }
.alert-info    { background: #fffbeb; border: 1.5px solid #f5d76e; color: #7a5800; }
.alert-warning { background: #fffbeb; border: 1.5px solid var(--yellow); color: #7a5800; }

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
}

.badge-success { background: #edf7ed; color: #1f6b1f; }
.badge-danger  { background: #fdf0f0; color: #b03030; }
.badge-yellow  { background: var(--yellow-pale); color: #7a5800; }

/* ══════════════════════════════════════
   POINTS DISPLAY (Customer)
══════════════════════════════════════ */
.points-display {
    background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 60%, var(--green-bright) 100%);
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.points-display::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(245,168,0,0.15);
    top: -80px; right: -60px;
    pointer-events: none;
}

.points-display::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    bottom: -60px; left: -40px;
    pointer-events: none;
}

.points-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 80px;
    font-weight: 800;
    color: var(--yellow);
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.20);
    position: relative;
    z-index: 1;
}

.points-label {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    z-index: 1;
}

.points-swoosh {
    margin: 12px auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════
   TRANSACTION ITEMS
══════════════════════════════════════ */
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-50);
}
.transaction-item:last-child { border-bottom: none; }

.tx-info strong { display: block; font-size: 14px; color: var(--text-dark); font-weight: 700; }
.tx-info span   { font-size: 12px; color: var(--text-muted); }

.tx-points {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--green-mid);
}

/* ══════════════════════════════════════
   CUSTOMER PROFILE HEADER
══════════════════════════════════════ */
.customer-avatar-lg {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--white);
    font-size: 26px;
    font-family: 'Montserrat', sans-serif;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

/* ══════════════════════════════════════
   PASSWORD DISPLAY BOX
══════════════════════════════════════ */
.pass-box {
    background: var(--gray-50);
    border: 2px solid var(--yellow);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pass-box code {
    font-size: 20px;
    color: var(--green-deep);
    letter-spacing: 2px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* ══════════════════════════════════════
   UTILITIES
══════════════════════════════════════ */
.text-green  { color: var(--green-mid); }
.text-yellow { color: var(--yellow); }
.text-muted  { color: var(--text-muted); }
.text-dark   { color: var(--text-dark); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--green-mid); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.font-mono { font-family: 'Montserrat', sans-serif; }
.mb-4 { margin-bottom: 20px; }
.mt-2 { margin-top: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.w-100 { width: 100%; }

@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .main { margin-left: 0; padding: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .points-number { font-size: 60px; }
}
