/**
 * ECO.JIGU.DOCTOR - Mobile-First CSS
 * v4.0 — Premium Eco Design Overhaul
 * Clean, bright, spacious eco-friendly theme
 * Blue-Green gradient with excellent readability
 */

/* ========================================
   CSS Variables (Theme)
   ======================================== */
:root {
    /* Primary Colors — Eco Blue */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-bg: rgba(37, 99, 235, 0.06);
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;

    /* Secondary Colors — Eco Green */
    --secondary: #059669;
    --secondary-dark: #047857;
    --secondary-light: #34d399;
    --secondary-bg: rgba(5, 150, 105, 0.06);

    /* Accent Colors */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fcd34d;

    /* Gradients — Soft Blue-White */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #059669 100%);
    --gradient-header: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 40%, #eff6ff 100%);
    --gradient-footer: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 40%, #eff6ff 100%);
    --gradient-card: linear-gradient(135deg, #2563eb 0%, #0ea5e9 50%, #059669 100%);
    --gradient-accent: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-soft: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 100%);
    --gradient-hero: linear-gradient(160deg, #1e40af 0%, #2563eb 30%, #0ea5e9 60%, #059669 100%);

    /* Status Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.08);

    /* Neutral Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-tertiary: #94a3b8;
    --text-white: #FFFFFF;
    --text-dark: #0f172a;

    /* Background Colors — Bright & Clean */
    --bg-body: #f0f7ff;
    --bg-card: #FFFFFF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-dark: #1e293b;
    --bg-overlay: rgba(15, 23, 42, 0.5);

    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-color: #e2e8f0;

    /* Shadows — Soft & Natural */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.06), 0 8px 10px -6px rgba(0,0,0,0.03);
    --shadow-blue: 0 4px 14px rgba(37, 99, 235, 0.12);
    --shadow-green: 0 4px 14px rgba(5, 150, 105, 0.12);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);

    /* Spacing — Generous */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius — Rounded */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-md: 15px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 36px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;
}

/* 가격 단위: 포인트 (작은 글씨) — 쇼핑몰/관리자 공통 */
.price-unit {
    font-size: 0.75em;
    font-weight: 500;
    color: inherit;
    opacity: 0.9;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-bg: rgba(37, 99, 235, 0.12);
    --primary-50: #1e293b;
    --primary-100: #1e3a5f;
    --secondary-bg: rgba(5, 150, 105, 0.12);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-tertiary: #64748b;
    --text-dark: #f1f5f9;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #334155;
    --border-light: #334155;
    --border-medium: #475569;
    --border-color: #334155;
    --gradient-header: linear-gradient(135deg, #1e3a5f 0%, #1e293b 50%, #172554 100%);
    --gradient-footer: linear-gradient(135deg, #1e3a5f 0%, #1e293b 50%, #172554 100%);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.2);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; }
ul, ol { list-style: none; }
hr { border: none; border-top: 1px solid var(--border-light); margin: var(--space-md) 0; }

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-white { color: var(--text-white) !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

/* ========================================
   Layout — Mobile First
   ======================================== */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 72px;
}

.app-content {
    flex: 1;
    padding: var(--space-lg) 0;
}

.section {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title i,
.section-title .material-symbols-rounded {
    color: var(--primary);
    font-size: 22px;
}

/* ========================================
   Header — Mobile App Style
   [Back/Logo] [Title] [Actions + Hamburger]
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--gradient-header);
    padding: 0 var(--space-sm);
    height: 52px;
    box-shadow: 0 1px 8px rgba(37, 99, 235, 0.08);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* 왼쪽 영역: 로고 또는 뒤로가기 */
.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 1;
}

/* 가운데 영역: 페이지 제목 (절대 위치로 정중앙) */
.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 55%;
    text-align: center;
}

.header-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    letter-spacing: -0.3px;
}

/* 오른쪽 영역: 액션 버튼 + 햄버거 */
.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1;
}

/* 로고 */
.header-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-logo img { height: 28px; width: auto; }

.header-logo-text {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.header-logo i,
.header-logo .material-symbols-rounded {
    color: var(--secondary) !important;
    font-size: 24px;
}

/* 뒤로가기 버튼 */
.header-back-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-left: -4px;
}

.header-back-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}

.header-back-btn .material-symbols-rounded {
    font-size: 24px;
}

/* 공통 버튼 */
.header-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.header-btn .material-symbols-rounded {
    font-size: 20px;
}

.header-btn:hover {
    background: rgba(37, 99, 235, 0.15);
}

.header-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
}

/* 햄버거 버튼 강조 */
.hamburger-btn {
    background: transparent;
}

.hamburger-btn .material-symbols-rounded {
    font-size: 24px;
    color: var(--text-primary);
}

/* 비로그인 로그인 버튼 */
.header .btn-primary {
    background: var(--primary);
    border: none;
    color: white;
    padding: 7px 14px;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-full);
}

.header .btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

/* ========================================
   Side Menu (Hamburger)
   ======================================== */

.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.side-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 82vw;
    background: var(--bg-primary);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 16px;
    background: var(--gradient-header);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.side-menu-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.side-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-menu-avatar .material-symbols-rounded {
    font-size: 22px;
}

.side-menu-user-info {
    min-width: 0;
}

.side-menu-user-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-menu-user-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-menu-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.side-menu-close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.side-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.side-menu-group {
    padding: 4px 0;
}

.side-menu-group-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 20px 4px;
}

.side-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
}

.side-menu-link .material-symbols-rounded {
    font-size: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.side-menu-link:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--text-primary);
}

.side-menu-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}

.side-menu-link.active .material-symbols-rounded {
    opacity: 1;
}

.side-menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.side-menu-footer {
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    flex-shrink: 0;
}

.side-menu-link.logout-link {
    color: var(--danger, #ef4444);
}

.side-menu-link.logout-link .material-symbols-rounded {
    opacity: 1;
}

/* Dark mode side menu adjustments */
[data-theme="dark"] .side-menu-close {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .side-menu-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .side-menu-link:hover {
    background: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .side-menu-link.active {
    background: rgba(37, 99, 235, 0.15);
}

/* Prevent body scroll when menu is open */
body.side-menu-open {
    overflow: hidden;
}

/* Page Header */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
}

.page-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.page-header-back {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-header-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    flex: 1;
}

/* ========================================
   Site Footer — Info Links
   ======================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 24px var(--space-lg) 16px;
    margin-top: auto;
}

.site-footer-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 4px;
    margin-bottom: 14px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.footer-links a .material-symbols-rounded {
    font-size: 16px;
    opacity: 0.7;
}

.footer-links a:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}

.footer-divider {
    width: 1px;
    height: 14px;
    background: var(--border-color);
    flex-shrink: 0;
}

.footer-copyright {
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: -0.2px;
}

/* ========================================
   Bottom Navigation — Light Blue-White
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: var(--gradient-footer);
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -1px 12px rgba(37, 99, 235, 0.08);
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    max-width: 480px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
    min-width: 56px;
}

.bottom-nav-item i,
.bottom-nav-item .material-symbols-rounded {
    font-size: 22px;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* ========================================
   Cards — Clean, Premium Style
   ======================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-lg);
}

.card-header {
    padding: var(--space-md) var(--space-md);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gradient-soft);
}

.card-header h3 {
    font-size: var(--font-size-md);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-primary);
}

.card-header h3 i,
.card-header h3 .material-symbols-rounded {
    color: var(--primary);
    font-size: 20px;
}

.card-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-body {
    padding: var(--space-md);
}

.card-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* Section Card — Dashboard Style with clear separation */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary-100);
}

.section-header .section-title {
    margin-bottom: 0;
    font-size: var(--font-size-md);
}

.section-link {
    font-size: var(--font-size-sm);
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* ========================================
   Asset Card (Main Dashboard NFT Card)
   ======================================== */
.asset-card {
    position: relative;
    background: var(--gradient-hero);
    color: var(--text-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-lg);
    margin-bottom: var(--space-lg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.asset-card-bg,
.asset-card .asset-card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='400' height='300' viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='350' cy='50' r='120' fill='rgba(255,255,255,0.05)'/%3E%3Ccircle cx='50' cy='250' r='80' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") no-repeat;
    background-size: cover;
}

.asset-card-content {
    position: relative;
    z-index: 1;
}

.asset-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-bottom: 8px;
}

.asset-label .material-symbols-rounded { font-size: 18px; }

.asset-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.asset-unit {
    font-size: var(--font-size-lg);
    font-weight: 500;
    opacity: 0.85;
    margin-left: 4px;
}

.asset-conversion {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-bottom: var(--space-lg);
}

.asset-conversion .material-symbols-rounded { font-size: 16px; }

.asset-buttons {
    display: flex;
    gap: var(--space-sm);
}

.asset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.18);
    color: white;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all var(--transition-fast);
}

.asset-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

.asset-btn .material-symbols-rounded { font-size: 18px; }

/* Legacy asset-card classes */
.asset-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.asset-card-label { font-size: var(--font-size-sm); opacity: 0.9; }
.asset-card-badge { background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: 600; }
.asset-card-amount { font-size: var(--font-size-3xl); font-weight: 700; margin-bottom: var(--space-xs); }
.asset-card-amount small { font-size: var(--font-size-lg); font-weight: 500; opacity: 0.9; }
.asset-card-sub { font-size: var(--font-size-sm); opacity: 0.8; }
.asset-card-divider { height: 1px; background: rgba(255,255,255,0.2); margin: var(--space-md) 0; }
.asset-card-row { display: flex; justify-content: space-between; align-items: center; }
.asset-card-row-label { font-size: var(--font-size-sm); opacity: 0.9; }
.asset-card-row-value { font-size: var(--font-size-md); font-weight: 600; }

/* ========================================
   Point Grid — 2-Column Cards
   ======================================== */
.point-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.point-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: transform var(--transition-fast);
}

.point-item:hover {
    transform: translateY(-1px);
}

.point-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.point-icon .material-symbols-rounded { font-size: 22px; }
.point-icon.cash { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.point-icon.mileage, .point-icon.shopping { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.point-icon.referral { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.point-icon.sponsor { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.point-info { display: flex; flex-direction: column; gap: 2px; }
.point-label { font-size: var(--font-size-xs); color: var(--text-secondary); font-weight: 500; }
.point-value { font-size: var(--font-size-lg); font-weight: 700; color: var(--text-primary); }

/* ========================================
   Quick Actions Grid — Clean 3x2
   ======================================== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: var(--space-xl);
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.quick-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
    border-color: var(--primary-200);
}

.quick-icon, .quick-item-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.quick-label, .quick-item-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-align: center;
}

/* ========================================
   Dashboard Sections
   ======================================== */
.greeting-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
}

.greeting-text { display: flex; flex-direction: column; gap: 2px; }
.greeting-hello { font-size: var(--font-size-sm); color: var(--text-secondary); }
.greeting-name { font-size: var(--font-size-xl); font-weight: 700; color: var(--primary); }
.greeting-date { font-size: var(--font-size-xs); color: var(--text-muted); background: var(--primary-50); padding: 4px 10px; border-radius: var(--radius-full); }

/* Volume / Stats */
.volume-section { margin-bottom: var(--space-sm); }
.volume-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.volume-badge { padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: 600; }
.volume-badge.today { background: var(--primary-bg); color: var(--primary); }
.volume-badge.total { background: var(--secondary-bg); color: var(--secondary); }
.volume-period { font-size: var(--font-size-xs); color: var(--text-muted); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.stat-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    border: 1px solid var(--border-light);
}

.stat-box.left { border-left: 3px solid var(--info); }
.stat-box.right { border-left: 3px solid var(--success); }
.stat-label { font-size: var(--font-size-xs); color: var(--text-secondary); display: block; margin-bottom: 4px; }
.stat-value { font-size: var(--font-size-lg); font-weight: 700; display: block; }
.stat-sub { font-size: var(--font-size-xs); color: var(--text-muted); display: block; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.stat-item { display: flex; justify-content: space-between; padding: var(--space-sm) 0; }
.stat-item-label { font-size: var(--font-size-sm); color: var(--text-secondary); }
.stat-item-value { font-size: var(--font-size-sm); font-weight: 600; }

/* Bonus Grid */
.bonus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.bonus-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    border: 1px solid var(--border-light);
}

.bonus-type { font-size: var(--font-size-xs); color: var(--text-secondary); display: block; margin-bottom: 4px; }
.bonus-amount { font-size: var(--font-size-md); font-weight: 700; display: block; }

.bonus-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--primary-50);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1px solid var(--primary-100);
}

.bonus-total-value { color: var(--primary); font-weight: 700; font-size: var(--font-size-md); }

/* Referral Card */
.referral-card { border-left: 4px solid var(--primary); }

.referral-box {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.referral-code-display {
    flex: 1;
    padding: var(--space-md);
    background: var(--primary-50);
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    letter-spacing: 1px;
    border: 1px solid var(--primary-100);
}

.referral-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.referral-copy-btn:hover { background: var(--primary-dark); }
.referral-copy-btn .material-symbols-rounded { font-size: 18px; }

/* Order List */
.order-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.order-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-sm) 0; border-bottom: 1px solid var(--border-light); }
.order-item:last-child { border-bottom: none; }
.order-info { display: flex; flex-direction: column; gap: 2px; }
.order-name { font-size: var(--font-size-sm); font-weight: 600; }
.order-date { font-size: var(--font-size-xs); color: var(--text-muted); }
.order-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.order-amount { font-size: var(--font-size-sm); font-weight: 600; }
.order-status { font-size: var(--font-size-xs); font-weight: 600; }
.order-status.completed { color: var(--success); }
.order-status.pending { color: var(--warning); }

/* Notice List */
.notice-list { display: flex; flex-direction: column; }
.notice-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-light); text-decoration: none; color: var(--text-primary); }
.notice-item:last-child { border-bottom: none; }
.notice-title { font-size: var(--font-size-sm); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.notice-badge { display: inline-block; padding: 2px 8px; background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-full); font-size: 10px; font-weight: 700; }
.notice-date { font-size: var(--font-size-xs); color: var(--text-muted); white-space: nowrap; margin-left: 8px; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}
.empty-state .material-symbols-rounded { font-size: 40px; opacity: 0.4; }

.empty-state-icon {
    width: 80px; height: 80px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 36px;
}
.empty-state-title { font-size: var(--font-size-lg); font-weight: 600; margin-bottom: var(--space-sm); }
.empty-state-text { font-size: var(--font-size-sm); color: var(--text-secondary); margin-bottom: var(--space-lg); }

.bottom-spacer { height: 24px; }

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-size: var(--font-size-md);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: var(--text-white);
}

.btn-danger { background: var(--danger); color: var(--text-white); }
.btn-danger:hover:not(:disabled) { background: #dc2626; color: var(--text-white); }

.btn-success { background: var(--success); color: var(--text-white); }
.btn-success:hover:not(:disabled) { background: var(--secondary-dark); color: var(--text-white); }

.btn-sm { padding: 8px 16px; font-size: var(--font-size-sm); }
.btn-lg { padding: 16px 32px; font-size: var(--font-size-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); }

/* ========================================
   Forms
   ======================================== */
.form-group { margin-bottom: var(--space-md); }

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-md);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--bg-secondary); cursor: not-allowed; }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }

.form-hint { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: var(--space-xs); }
.form-error { font-size: var(--font-size-xs); color: var(--danger); margin-top: var(--space-xs); }
.form-text { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: var(--space-xs); }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group-append { display: flex; }
.input-group-append .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-md);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-check { display: flex; align-items: flex-start; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.form-check-input { width: 20px; height: 20px; margin-top: 2px; cursor: pointer; accent-color: var(--primary); }
.form-check-label { font-size: var(--font-size-md); color: var(--text-primary); cursor: pointer; }

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 14px var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--font-size-sm);
}

.alert i, .alert .material-symbols-rounded { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: var(--space-xs); }
.alert-success { background: var(--success-bg); color: #047857; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert-danger { background: var(--danger-bg); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-info { background: var(--info-bg); color: #1d4ed8; border: 1px solid rgba(59, 130, 246, 0.2); }

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-dark { background: var(--bg-dark); color: var(--text-white); }

/* ========================================
   Tables
   ======================================== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: var(--space-sm) var(--space-md); text-align: left; border-bottom: 1px solid var(--border-light); }
.table th { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-secondary); background: var(--bg-secondary); white-space: nowrap; }
.table td { font-size: var(--font-size-sm); color: var(--text-primary); }
.table tbody tr:hover { background: var(--bg-secondary); }

/* Mobile Table */
.mobile-table { display: flex; flex-direction: column; gap: var(--space-md); }
.mobile-table-item { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md); box-shadow: var(--shadow-card); border: 1px solid var(--border-light); }
.mobile-table-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.mobile-table-row:not(:last-child) { border-bottom: 1px solid var(--border-light); }
.mobile-table-label { font-size: var(--font-size-sm); color: var(--text-secondary); }
.mobile-table-value { font-size: var(--font-size-sm); font-weight: 500; color: var(--text-primary); }

/* ========================================
   Lists
   ======================================== */
.list-group {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.list-group-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-md);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background: var(--bg-secondary); }

.list-group-item-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.list-group-item-content { flex: 1; min-width: 0; }
.list-group-item-title { font-size: var(--font-size-md); font-weight: 500; margin-bottom: 2px; }
.list-group-item-subtitle { font-size: var(--font-size-sm); color: var(--text-secondary); }
.list-group-item-arrow { color: var(--text-muted); }

/* ========================================
   Modal — Bottom Sheet Style
   ======================================== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-overlay);
    z-index: var(--z-modal-backdrop);
    opacity: 0; visibility: hidden;
    transition: all var(--transition-normal);
}
.modal-backdrop.show { opacity: 1; visibility: visible; }

.modal {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: var(--z-modal);
    background: var(--bg-card);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}
.modal.show { transform: translateY(0); }

.modal-handle { width: 40px; height: 4px; background: var(--border-medium); border-radius: var(--radius-full); margin: var(--space-md) auto; }
.modal-header { padding: var(--space-md); border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: var(--font-size-lg); font-weight: 700; }
.modal-close { width: 36px; height: 36px; border-radius: var(--radius-full); border: none; background: var(--bg-secondary); color: var(--text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: var(--space-lg); }
.modal-footer { padding: var(--space-md); border-top: 1px solid var(--border-light); display: flex; gap: var(--space-sm); padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0)); }
.modal-footer .btn { flex: 1; }

/* ========================================
   Toast
   ======================================== */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    left: var(--space-md); right: var(--space-md);
    z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: var(--space-sm);
    pointer-events: auto;
    animation: slideInDown 0.3s ease;
}

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

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ========================================
   Auth Pages (Login/Register)
   ======================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-lg);
    background: var(--bg-body);
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-logo { text-align: center; margin-bottom: var(--space-lg); }
.auth-logo img { height: 60px; margin: 0 auto var(--space-md); }
.auth-logo h1 { font-size: var(--font-size-xl); color: var(--primary); }
.auth-logo p { font-size: var(--font-size-sm); color: var(--text-secondary); }
.auth-form { margin-bottom: var(--space-lg); }
.auth-links { text-align: center; }
.auth-links a { font-size: var(--font-size-sm); color: var(--text-secondary); }
.auth-divider { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-lg) 0; color: var(--text-muted); font-size: var(--font-size-sm); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

/* ========================================
   Landing Page Base
   ======================================== */
.landing-slider { position: relative; overflow: hidden; }
.landing-slide { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: var(--space-xl); }
.landing-slide-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; }
.landing-slide-bg::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(37,99,235,0.4) 0%, rgba(5,150,105,0.5) 100%); }
.landing-slide-content { position: relative; z-index: 1; color: var(--text-white); }
.landing-slide-title { font-size: var(--font-size-2xl); font-weight: 700; margin-bottom: var(--space-md); }
.landing-slide-text { font-size: var(--font-size-md); opacity: 0.9; margin-bottom: var(--space-xl); }

/* ========================================
   Organization Chart
   ======================================== */
.org-tree { padding: var(--space-md); }
.org-node { background: var(--bg-card); border-radius: var(--radius-lg); padding: var(--space-md); margin-bottom: var(--space-sm); box-shadow: var(--shadow-card); border: 1px solid var(--border-light); border-left: 4px solid var(--primary); }
.org-node.left { border-left-color: var(--info); }
.org-node.right { border-left-color: var(--success); }
.org-node-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.org-node-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--primary-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.org-node-name { font-weight: 600; font-size: var(--font-size-md); }
.org-node-code { font-size: var(--font-size-xs); color: var(--text-muted); }
.org-node-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); font-size: var(--font-size-sm); }
.org-node-stat { display: flex; justify-content: space-between; }
.org-node-stat-label { color: var(--text-secondary); }
.org-node-stat-value { font-weight: 600; }

/* ========================================
   Transaction History
   ======================================== */
.transaction-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.transaction-item { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md); display: flex; align-items: center; gap: var(--space-md); box-shadow: var(--shadow-card); border: 1px solid var(--border-light); }
.transaction-icon { width: 44px; height: 44px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.transaction-icon.in { background: var(--success-bg); color: var(--success); }
.transaction-icon.out { background: var(--danger-bg); color: var(--danger); }
.transaction-content { flex: 1; min-width: 0; }
.transaction-title { font-weight: 500; margin-bottom: 2px; }
.transaction-date { font-size: var(--font-size-xs); color: var(--text-muted); }
.transaction-amount { text-align: right; }
.transaction-amount-value { font-weight: 700; font-size: var(--font-size-md); }
.transaction-amount-value.positive { color: var(--success); }
.transaction-amount-value.negative { color: var(--danger); }
.transaction-amount-type { font-size: var(--font-size-xs); color: var(--text-muted); }

/* ========================================
   Product Cards — Clean Premium Style
   ======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.product-card-header {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--space-lg);
    text-align: center;
}

.product-card-header.bronze { background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%); }
.product-card-header.silver { background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%); }
.product-card-header.gold { background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%); }

.product-card-name { font-size: var(--font-size-xl); font-weight: 700; margin-bottom: var(--space-xs); }
.product-card-price { font-size: var(--font-size-2xl); font-weight: 700; }
.product-card-price small { font-size: var(--font-size-md); opacity: 0.9; }
.product-card-body { padding: var(--space-md); }
.product-card-feature { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.product-card-feature:last-child { border-bottom: none; }
.product-card-feature-label { color: var(--text-secondary); font-size: var(--font-size-sm); }
.product-card-feature-value { font-weight: 600; color: var(--primary); font-size: var(--font-size-sm); }
.product-card-footer { padding: var(--space-md); background: var(--bg-secondary); }

/* Search Results */
.search-results-inline { max-height: 200px; overflow-y: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-top: var(--space-xs); background: var(--bg-card); }
.search-result-item { padding: var(--space-sm) var(--space-md); cursor: pointer; border-bottom: 1px solid var(--border-light); font-size: var(--font-size-sm); transition: background var(--transition-fast); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-50); }

/* ========================================
   Loading
   ======================================== */
.loading { display: flex; justify-content: center; align-items: center; padding: var(--space-xl); }

.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-overlay);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: var(--space-md);
    z-index: var(--z-toast);
}
.loading-overlay .spinner { width: 60px; height: 60px; border-width: 4px; border-color: rgba(255,255,255,0.3); border-top-color: var(--text-white); }

/* ========================================
   Utilities
   ======================================== */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.flex-1 { flex: 1; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }

/* Spacing */
.m-0 { margin: 0 !important; }
.mt-sm { margin-top: var(--space-sm) !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mb-sm { margin-bottom: var(--space-sm) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }
.p-0 { padding: 0 !important; }
.p-sm { padding: var(--space-sm) !important; }
.p-md { padding: var(--space-md) !important; }
.p-lg { padding: var(--space-lg) !important; }
.w-100 { width: 100% !important; }
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: var(--space-lg) 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    background: var(--bg-card);
}

.pagination a:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary);
}

.pagination .active,
.pagination span.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   Tabs
   ======================================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-item {
    padding: 12px 16px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.tab-item:hover {
    color: var(--primary);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ========================================
   Info Row (profile, detail pages)
   ======================================== */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.info-row .value {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   Responsive — Tablet & Desktop
   ======================================== */
@media (min-width: 768px) {
    .container { max-width: 720px; }
    .point-grid { grid-template-columns: repeat(4, 1fr); }
    .quick-grid { grid-template-columns: repeat(6, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }

    .modal {
        position: fixed;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        bottom: auto; right: auto;
        width: 90%; max-width: 500px;
        border-radius: var(--radius-2xl);
        opacity: 0;
    }
    .modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@media (min-width: 1024px) {
    .container { max-width: 960px; }
    :root {
        --font-size-xs: 12px;
        --font-size-sm: 14px;
        --font-size-md: 16px;
        --font-size-lg: 20px;
        --font-size-xl: 24px;
        --font-size-2xl: 32px;
        --font-size-3xl: 40px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header, .bottom-nav, .btn, .no-print { display: none !important; }
    body { background: white; color: black; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ========================================
   Safe Area (iOS Notch)
   ======================================== */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
    .modal-footer { padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom)); }
}

/* ========================================
   Animations
   ======================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slide-up { animation: slideUp 0.4s ease; }
.animate-fade-in { animation: fadeIn 0.3s ease; }
