/* Client Dashboard Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;600;700;900&display=swap');

:root {
    --primary: #3EE0CF;
    --primary-dark: #2CB5E7;
    --gradient: #2CB5E7;
    --blue: #2563EB;
    --blue-dark: #1D4ED8;
    --sidebar-bg: #FFFFFF;
    --sidebar-border: #E2E8F0;
    --sidebar-text: #475569;
    --sidebar-hover: #F1F5F9;
    --sidebar-active: #3EE0CF;
    --main-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--main-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout */
.client-wrapper {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Sidebar */
.sidebar {
    display: none;
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .sidebar { display: flex; }
}

/* Sidebar Profile */
.sidebar-profile {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-profile .avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 10px;
    border-radius: 12px;
    overflow: hidden;
}

.sidebar-profile .avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-profile .user-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.sidebar-profile .user-name .role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 1px 8px;
    border-radius: 4px;
    background: #DBEAFE;
    color: #2563EB;
    margin-left: 6px;
    vertical-align: middle;
}

.sidebar-profile .user-points {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0;
}

.sidebar-profile .user-points span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

/* Sidebar Buttons (모던 미니멀 모노톤 — Notion/Linear 스타일) */
.sidebar-buttons {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-buttons a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
    text-align: left;
    background: transparent;
    color: #475569;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
}

.sidebar-buttons a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-buttons a.active {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.sidebar-buttons a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: currentColor;
    opacity: 0.7;
}
.sidebar-buttons a:hover svg,
.sidebar-buttons a.active svg { opacity: 1; }

/* 셀러 영역 그룹 타이틀 */
.sidebar-buttons .group-title {
    margin: 10px 12px 4px;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #94a3b8;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

/* 셀러 계정 추가하기 — primary action 강조 */
.sidebar-buttons a.btn-primary-action {
    background: #2CB5E7;
    color: #fff;
    font-weight: 600;
    margin-top: 2px;
}
.sidebar-buttons a.btn-primary-action svg { opacity: 0.95; }
.sidebar-buttons a.btn-primary-action:hover {
    background: #1A9ED1;
    color: #fff;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.sidebar-nav .menu-item {
    border: 1px solid var(--border-color);
    background: #fff;
    width: calc(100% - 32px);
    margin: 3px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
    border-radius: var(--radius);
}

.sidebar-nav .menu-item:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}
.sidebar-nav .menu-item:hover .menu-arrow {
    color: #fff;
}

.sidebar-nav .menu-item .menu-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav .menu-item .menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-nav .menu-item .menu-icon img {
    width: 100%;
    height: 100%;
}

.sidebar-nav .menu-item .menu-icon svg {
    width: 16px;
    height: 16px;
}

/* 원본 에셋 아이콘 (파란 원 + 흰색 아이콘 SVG 이미지) */
.menu-icon.img { background: none; }

/* fallback: 인라인 SVG 사용 시 */
.menu-icon.mint,
.menu-icon.blue,
.menu-icon.green,
.menu-icon.purple,
.menu-icon.orange { background: #2563EB; color: #fff; }
.menu-icon.mint svg,
.menu-icon.blue svg,
.menu-icon.green svg,
.menu-icon.purple svg,
.menu-icon.orange svg { stroke: #fff; }

.hot-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: #FEE2E2;
    color: #DC2626;
    margin-left: 4px;
}

.menu-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.menu-arrow.open {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    display: none;
    padding: 4px 0 4px 48px;
    background: #FAFBFC;
}

.submenu.open {
    display: block;
}

.submenu a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.submenu a:hover {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

.submenu a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Sidebar HOT Link */
.sidebar-hot-link {
    padding: 8px 16px;
}

.sidebar-hot-link a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    border: 1px solid #FDBA74;
    transition: background 0.2s;
}

.sidebar-hot-link a:hover {
    background: linear-gradient(135deg, #FFEDD5, #FED7AA);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.sidebar-footer a:hover {
    background: var(--sidebar-hover);
}

.sidebar-footer a svg {
    width: 18px;
    height: 18px;
}

/* Mobile Header */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 56px;
}

@media (min-width: 1024px) {
    .mobile-header { display: none; }
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-primary);
}

.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

.mobile-sidebar.active {
    transform: translateX(0);
    box-shadow: 0 0 24px rgba(0,0,0,0.25);
}

/* Body scroll lock when mobile sidebar open */
body.sidebar-open {
    overflow: hidden;
    touch-action: none;
}

@media (min-width: 1024px) {
    .mobile-sidebar,
    .mobile-sidebar-overlay {
        display: none !important;
    }
    body.sidebar-open {
        overflow: auto;
        touch-action: auto;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .mobile-sidebar,
    .mobile-sidebar-overlay,
    .menu-arrow,
    .submenu {
        transition: none !important;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .mobile-sidebar { width: 90vw; max-width: 90vw; }
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    background: var(--main-bg);
    padding-top: 56px;
}

@media (min-width: 1024px) {
    .main-content { padding-top: 0; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

@media (min-width: 640px) {
    .container { padding: 24px; }
}

/* Page Header (Blue gradient like submissions) */
.page-header-blue {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.page-header-blue h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header-blue p {
    font-size: 14px;
    opacity: 0.8;
}

/* Tabs (top tabs like 알림/마이페이지) */
.top-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.top-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-decoration: none;
    transition: all 0.2s;
}

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

.top-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
    font-weight: 600;
}

.top-tab svg {
    width: 16px;
    height: 16px;
}

/* Category Tabs (like 전체/리워드/리뷰...) */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    min-width: 100px;
}

.category-tab:hover {
    border-color: var(--blue);
}

.category-tab.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.category-tab svg {
    width: 20px;
    height: 20px;
}

/* Stat Cards (Blue theme) */
.stat-grid-blue {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card-blue {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    color: #fff;
}

.stat-card-blue .label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.stat-card-blue .value {
    font-size: 28px;
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.card-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

.card-header-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* Notification Cards */
.notification-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .notification-grid { grid-template-columns: 1fr; }
}

.notice-item {
    padding: 16px;
    border-left: 3px solid var(--primary);
    background: #F0FDFA;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 12px;
}

.notice-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.notice-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notice-item .date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Guide Section (Accordion) */
.guide-section {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}

.guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #92400E;
}

.guide-header .icon {
    color: #F59E0B;
}

.guide-body {
    padding: 0 20px 16px;
    font-size: 14px;
    color: #78350F;
    line-height: 1.8;
}

/* Form Styles */
.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-section-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(44,181,231,0.15);
}

/* Option Cards (like reward media selection) */
.option-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.option-card:hover {
    border-color: var(--blue);
}

.option-card.selected {
    border-color: var(--blue);
    background: #EFF6FF;
}

.option-card .option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F1F5F9;
    flex-shrink: 0;
}

.option-card .option-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.option-card .option-info .selected-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    margin-left: 6px;
}

.option-card .option-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover { opacity: 0.9; }

.btn-blue {
    background: var(--blue);
    color: #fff;
}

.btn-blue:hover { background: var(--blue-dark); }

.btn-outline {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover { background: #F8FAFC; }

.btn-full { width: 100%; }

/* Tables */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: #F8FAFC;
    padding: 10px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

tbody tr:hover { background: #F8FAFC; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-green { background: #DCFCE7; color: #166534; }
.badge-yellow { background: #FEF9C3; color: #854D0E; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-gray { background: #F1F5F9; color: #475569; }
.badge-rose { background: #FFE4E6; color: #9F1239; }
.badge-mint { background: #D1FAE5; color: #065F46; }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-orange { background: #FFEDD5; color: #9A3412; }

/* Search Bar */
.search-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.search-input-wrap {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: none;
}

.search-input-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

/* Point Section */
.point-balance {
    background: linear-gradient(135deg, #1E293B, #334155);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.point-balance h2 {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 8px;
}

.point-balance .balance-amount {
    font-size: 36px;
    font-weight: 800;
}

.point-balance .balance-amount span {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.6;
}

/* KakaoTalk Button */
.kakao-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #FEE500;
    color: #191919;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 40;
    text-decoration: none;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E0FFF9 0%, #F0F8FF 50%, #E8F4E0 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    padding: 40px 32px;
    text-align: center;
}

.login-logo-img {
    width: 120px;
    height: auto;
    margin-bottom: 16px;
}

.login-title {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 9999px;
    font-size: 13px;
    background: var(--gradient);
    color: #fff;
    margin-bottom: 24px;
}

.login-form { text-align: left; }

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: var(--gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.login-btn:hover { opacity: 0.9; }

.login-tabs {
    display: flex;
    background: #F1F5F9;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.login-tab.active {
    background: var(--gradient);
    color: #fff;
}

.login-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 24px;
}

.login-register {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-register a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* =====================================================
   SMALL MOBILE (320-480px) RESPONSIVE
   ===================================================== */
@media (max-width: 480px) {
    /* Container */
    .container { padding: 10px; }

    /* Sidebar buttons */
    .sidebar-buttons { padding: 8px 10px; gap: 2px; }
    .sidebar-buttons a { padding: 8px 10px; font-size: 12px; gap: 8px; }
    .sidebar-buttons a svg { width: 14px; height: 14px; }
    .sidebar-buttons .group-title { margin: 8px 10px 2px; font-size: 10px; }

    /* Top tabs - horizontal scroll */
    .top-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 4px; }
    .top-tab { padding: 8px 12px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }

    /* Category tabs - horizontal scroll */
    .category-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
    .category-tab { padding: 6px 10px; font-size: 11px; white-space: nowrap; flex-shrink: 0; min-width: auto; }
    .category-tab svg { width: 14px; height: 14px; }

    /* Search filter bar - stack */
    .search-filter-bar { flex-direction: column; gap: 8px; }
    .search-input-wrap { min-width: 100%; }
    .search-filter-bar .form-select { width: 100% !important; min-width: 0 !important; }

    /* Tables - smaller text */
    .table-wrapper { margin: 0 -10px; }
    table thead th { font-size: 11px; padding: 8px 6px; white-space: normal; }
    table tbody td { font-size: 12px; padding: 8px 6px; }

    /* Page header blue */
    .page-header-blue { padding: 20px 16px; margin-bottom: 16px; }
    .page-header-blue h1 { font-size: 18px; }
    .stat-grid-blue { gap: 8px; }
    .stat-card-blue { padding: 12px 8px; }
    .stat-card-blue .value { font-size: 20px; }

    /* Cards */
    .card { border-radius: 8px; }
    .card-header { padding: 12px; }
    .card-body { padding: 0; }

    /* Form elements */
    .form-section { padding: 16px 12px; }
    .form-label { font-size: 13px; }
    .form-input, .form-select { font-size: 14px; padding: 8px 10px; }

    /* Two-column form → single column */
    .two-col { grid-template-columns: 1fr !important; gap: 12px; }

    /* Stepper buttons */
    .stepper-btn { width: 36px; height: 36px; font-size: 16px; }

    /* Cost summary */
    .cost-summary { padding: 12px 14px; }
    .cost-summary .cost-row { font-size: 13px; }
    .cost-summary .cost-total { font-size: 16px; }

    /* Modals */
    .detail-modal, .stop-modal, .new-sub-modal { width: 95%; max-width: 100%; }
    .iframe-modal { width: 100%; max-width: 100%; height: 90vh; border-radius: 12px 12px 0 0; }

    /* Login/Register */
    .login-card { padding: 24px 16px; }
    .login-logo-img { width: 72px; }
    .login-title { font-size: 22px; }

    /* Guide sections */
    .guide-header { padding: 10px 12px; font-size: 13px; }
    .guide-body { padding: 10px 12px; font-size: 13px; }

    /* Option cards (media selection) */
    .option-card { padding: 12px; gap: 10px; }
    .option-icon { width: 36px; height: 36px; font-size: 14px; }

    /* Badges */
    .badge { font-size: 11px; padding: 2px 6px; }

    /* Bulk upload */
    .bulk-upload-area { padding: 24px 12px; }

    /* Sidebar nav menu items */
    .sidebar-nav .menu-item { padding: 8px 12px; margin: 2px 12px; width: calc(100% - 24px); font-size: 13px; }
    .sidebar-nav .menu-icon { width: 26px; height: 26px; }
}

/* MEDIUM PHONES (481-640px) */
@media (max-width: 640px) {
    .page-header-blue { padding: 24px 20px; }
    .stat-grid-blue { gap: 10px; }
    .search-filter-bar { flex-wrap: wrap; }
    .search-input-wrap { min-width: 100%; }
}
