/* ═══════════════════════════════════════════════
   전략기획부 통합 운영 시스템
   Dark Theme · Liquid Glass Inspired · Red Accent
   ═══════════════════════════════════════════════ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* ── 다크 컬러 시스템 ── */
    --bg-deep: #0a0a0a;
    --bg-base: #111111;
    --bg-surface: rgba(255,255,255,0.04);
    --bg-elevated: rgba(255,255,255,0.07);
    --bg-hover: rgba(255,255,255,0.10);

    /* ── 글래스 ── */
    --glass: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.10);
    --glass-strong: rgba(255,255,255,0.10);
    --glass-hover: rgba(255,255,255,0.14);

    /* ── 포인트 컬러 (사용자 테마에서 override됨) ── */
    --accent: #E53935;
    --accent-rgb: 229, 57, 53;
    --accent-light: rgba(var(--accent-rgb), 0.15);
    --accent-glow: rgba(var(--accent-rgb), 0.3);
    --accent-text: var(--accent);

    /* ── 글래스 카드 배경 (사용자 테마에서 override됨) ── */
    --glass-card-bg: rgba(12, 12, 16, 0.75);
    --video-dim: 0.65;
    --sidebar-bg: rgba(10, 10, 14, 0.82);
    --sidebar-opacity: 0.82;
    --form-line-color: rgba(255,255,255,0.12);
    --form-placeholder: rgba(255,255,255,0.3);

    /* ── 텍스트 ── */
    --text-primary: rgba(255,255,255,0.92);
    --text-secondary: rgba(255,255,255,0.55);
    --text-tertiary: rgba(255,255,255,0.35);
    --text-inverse: #0a0a0a;

    /* ── 시맨틱 ── */
    --success: #4CAF50;
    --success-bg: rgba(76,175,80,0.12);
    --warning: #FFB300;
    --warning-bg: rgba(255,179,0,0.12);
    --danger: #E53935;
    --danger-bg: rgba(229,57,53,0.12);
    --info: #42A5F5;
    --info-bg: rgba(66,165,245,0.12);

    /* ── 기타 ── */
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.05);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --tr: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* ── 폰트 크기 ── */
    --fs-xs:   clamp(0.875rem, 0.8rem + 0.2vw, 0.9375rem);   /* 14px ~ 15px */
    --fs-sm:   clamp(0.9375rem, 0.85rem + 0.25vw, 1rem);     /* 15px ~ 16px */
    --fs-base: clamp(1rem, 0.9rem + 0.3vw, 1.0625rem);       /* 16px ~ 17px */
    --fs-md:   clamp(1.0625rem, 0.95rem + 0.35vw, 1.125rem);  /* 17px ~ 18px */
    --fs-lg:   clamp(1.25rem, 1.1rem + 0.4vw, 1.375rem);     /* 20px ~ 22px */
    --fs-xl:   clamp(1.5rem, 1.3rem + 0.5vw, 1.75rem);       /* 24px ~ 28px */
    --fs-2xl:  clamp(1.875rem, 1.6rem + 0.6vw, 2.125rem);    /* 30px ~ 34px */
}

html { font-size: 16px; color-scheme: dark; }

body {
    font-family: 'Noto Sans KR', -apple-system, 'SF Pro Display', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-size: var(--fs-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; transition: var(--tr); }
a:hover { color: var(--accent); }

/* ═══ 비디오 배경 ═══ */
.video-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
}
.video-bg video {
    width: 100%; height: 100%;
    object-fit: cover;
}
.video-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, var(--video-dim, 0.65));
}

/* ═══ 레이아웃 ═══ */
.app-wrapper { display: flex; min-height: 100vh; position: relative; }

/* ── 사이드바 (Liquid Glass) ── */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg, rgba(10,10,14,0.82));
    backdrop-filter: blur(60px) saturate(1.5);
    -webkit-backdrop-filter: blur(60px) saturate(1.5);
    border-right: 1px solid rgba(255,255,255,0.08);
    position: fixed; top: 0; left: 0; height: 100vh;
    overflow: visible; z-index: 100;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
    transition: width 0.3s cubic-bezier(.4,0,.2,1);
}
.sidebar-inner {
    overflow-y: auto; overflow-x: hidden;
    flex: 1; display: flex; flex-direction: column;
    width: 100%;
}
/* 사이드바 텍스트 fade */
.sidebar .menu-label,
.sidebar .sidebar-header h1,
.sidebar .sidebar-header a > img,
.sidebar .sidebar-header .subtitle,
.sidebar .nav-section,
.sidebar .sidebar-user .user-name,
.sidebar .sidebar-user .user-role,
.sidebar #notiDrop,
.sidebar .sidebar-user .noti-badge-wrap span[style] {
    transition: opacity 0.2s ease, max-width 0.3s ease;
    opacity: 1; max-width: 200px; overflow: hidden; white-space: nowrap;
    display: inline-block; vertical-align: middle;
}
/* collapsed: fade out + 폭 축소 */
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sidebar-inner { overflow: hidden; }
.sidebar.collapsed .menu-label,
.sidebar.collapsed .sidebar-header h1,
.sidebar.collapsed .sidebar-header a > img,
.sidebar.collapsed .sidebar-header .subtitle,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .sidebar-user .user-name,
.sidebar.collapsed .sidebar-user .user-role,
.sidebar.collapsed #notiDrop,
.sidebar.collapsed .sidebar-user .noti-badge-wrap span[style] {
    opacity: 0; max-width: 0; pointer-events: none;
    transition: opacity 0.15s ease, max-width 0.25s ease;
}
.sidebar.collapsed .sidebar-header { padding: 1rem 0.5rem; text-align: center; }
.sidebar.collapsed .sidebar-header a { display:flex; justify-content:center; }
.sidebar.collapsed .sidebar-nav a {
    padding: 0.5rem 0; margin: 0.125rem 0.35rem;
    justify-content: center; text-align: center;
    border-radius: var(--radius-sm);
}
.sidebar.collapsed .sidebar-nav a:hover {
    background: var(--glass-hover);
}
.sidebar.collapsed .sidebar-nav a .icon { width: auto; font-size: 1.15rem; margin: 0; }
.sidebar.collapsed .sidebar-user { padding: 0.5rem; justify-content: center; }
.sidebar-toggle {
    position: absolute; top: 1.25rem; right: -18px; z-index: 101;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--accent); border: none;
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-xs); transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.sidebar-toggle:hover { transform: scale(1.15); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.sidebar-toggle svg { width: 20px; height: 20px; fill: currentColor; }

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h1 {
    font-size: var(--fs-base); font-weight: 700;
    color: var(--text-primary);
    display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-header .subtitle {
    font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 0.25rem;
}

.sidebar-nav { padding: 0.75rem 0; flex: 1; }
.sidebar-nav .nav-section {
    padding: 1rem 1.25rem 0.375rem;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 1.5px; font-weight: 600;
}
.sidebar-nav a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    margin: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--fs-sm); font-weight: 500;
    transition: var(--tr);
}
.sidebar-nav a:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}
.sidebar-nav a.active {
    background: rgba(var(--accent-rgb, 229,57,53), 0.12);
    color: var(--accent-text, #E53935);
    font-weight: 600;
}
.sidebar-nav a .icon { width: 1.25rem; text-align: center; font-size: var(--fs-base); color: var(--icon-color, inherit); }

.sidebar-user {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
    display: flex; justify-content: space-between; align-items: center;
    gap: 0.5rem;
}
.sidebar-user .user-info { flex: 1; min-width: 0; overflow: hidden; }
.sidebar-user .user-name { font-weight: 600; font-size: var(--fs-sm); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: var(--fs-xs); color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .logout-btn {
    padding: 0.375rem 0.625rem;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-xs);
    font-size: var(--fs-xs); cursor: pointer; font-family: inherit;
    transition: var(--tr);
    white-space: nowrap; flex-shrink: 0;
}
.sidebar-user .logout-btn:hover {
    background: rgba(var(--accent-rgb, 229,57,53), 0.12); color: var(--accent-text);
}

/* ── 메인 콘텐츠 ── */
.main-content {
    margin-left: 260px;
    transition: margin-left 0.3s cubic-bezier(.4,0,.2,1), width 0.3s cubic-bezier(.4,0,.2,1);
    padding: 2rem 2.5rem;
    width: calc(100% - 260px);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ═══ 페이지 헤더 ═══ */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.75rem;
}
.page-header h2 {
    font-size: var(--fs-lg); font-weight: 700; color: var(--text-primary);
}
.page-header .breadcrumb { font-size: var(--fs-xs); color: var(--text-tertiary); }

/* ═══ 글래스 카드 (Liquid Glass) ═══ */
.card {
    position: relative;
    background: var(--glass-card-bg, rgba(12,12,16,0.75));
    backdrop-filter: blur(60px) saturate(1.6) brightness(1.08);
    -webkit-backdrop-filter: blur(60px) saturate(1.6) brightness(1.08);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--tr);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(255,255,255,0.02),
        0 8px 32px rgba(0,0,0,0.5),
        0 0 0 0.5px rgba(255,255,255,0.05);
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12) 30%, rgba(255,255,255,0.12) 70%, transparent);
    pointer-events: none;
}
.card::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
    border-radius: var(--radius);
}
.card:hover {
    border-color: rgba(255,255,255,0.09);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(255,255,255,0.03),
        0 16px 48px rgba(0,0,0,0.6),
        0 0 0 0.5px rgba(255,255,255,0.08);
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.04));
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.card-header h3 { font-size: var(--fs-md); font-weight: 700; color: var(--text-primary); }

/* ═══ Stat 카드 ═══ */
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 1.25rem; margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--glass-card-bg, rgba(12,12,16,0.75));
    backdrop-filter: blur(50px) saturate(1.5);
    -webkit-backdrop-filter: blur(50px) saturate(1.5);
    border: none;
    border-radius: var(--radius);
    padding: 1.75rem;
    position: relative; overflow: hidden;
    transition: var(--tr);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 4px 20px rgba(0,0,0,0.4);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 8px 32px rgba(0,0,0,0.5);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent, #E53935), transparent);
}
.stat-card.blue::before { background: linear-gradient(90deg, var(--accent, #E53935) 0%, rgba(var(--accent-rgb, 229,57,53), 0.3) 60%, transparent); }
.stat-card.green::before { background: linear-gradient(90deg, var(--accent, #E53935) 0%, rgba(var(--accent-rgb, 229,57,53), 0.3) 60%, transparent); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--accent, #E53935) 0%, rgba(var(--accent-rgb, 229,57,53), 0.3) 60%, transparent); }
.stat-card.red::before { background: linear-gradient(90deg, var(--accent, #E53935) 0%, rgba(var(--accent-rgb, 229,57,53), 0.3) 60%, transparent); }
.stat-card .stat-label { font-size: var(--fs-xs); color: var(--text-tertiary); font-weight: 500; margin-bottom: 0.375rem; }
.stat-card .stat-value { font-size: var(--fs-xl); font-weight: 800; color: var(--text-primary); letter-spacing: -1px; }
.stat-card .stat-sub { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 0.25rem; }
.stat-card.red .stat-value { color: var(--accent-text); }

/* ═══ 테이블 ═══ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.data-table th { color: var(--text-tertiary); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.03em; }
.data-table td { color: var(--text-primary); }
.data-table tbody tr:hover { background: rgba(var(--accent-rgb),0.04); }
table:not(.data-table) { width: 100%; border-collapse: collapse; }
table:not(.data-table) th, table:not(.data-table) td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
table:not(.data-table) th { color: var(--text-tertiary); font-weight: 600; font-size: var(--fs-xs); }
table:not(.data-table) td { color: var(--text-primary); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
thead th {
    background: rgba(255,255,255,0.07);
    color: var(--text-secondary);
    padding: 0.75rem; font-weight: 600;
    text-align: center; white-space: nowrap;
    font-size: var(--fs-sm);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-top: none; border-left: none; border-right: none;
}
thead th:first-child { border-radius: var(--radius-xs) 0 0 0; }
thead th:last-child { border-radius: 0 var(--radius-xs) 0 0; }
tbody td {
    padding: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.05);
    border-top: none; border-left: none; border-right: none;
    text-align: center; vertical-align: middle;
    color: var(--text-primary);
}
tbody tr { transition: var(--tr); }
tbody tr:hover { background: rgba(255,255,255,0.06); }
tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* ═══ 배지 ═══ */
.badge {
    display: inline-block; padding: 0.25rem 0.75rem;
    border-radius: 2rem; font-size: var(--fs-xs); font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--accent-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gray { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.stage-미진행 { background: rgba(255,23,68,0.15); color: #FF1744; }
.stage-리드 { background: var(--info-bg); color: var(--info); }
.stage-제안 { background: rgba(255,152,0,0.12); color: #FF9800; }
.stage-계약 { background: var(--success-bg); color: var(--success); }
.stage-촬영 { background: rgba(171,71,188,0.12); color: #CE93D8; }
.stage-방송완료 { background: rgba(38,166,154,0.12); color: #4DB6AC; }

/* ═══ 폼 ═══ */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-size: var(--fs-sm); font-weight: 600;
    color: var(--text-secondary); margin-bottom: 0.375rem;
}
.required { color: var(--accent-text); }

input[type="text"], input[type="number"], input[type="date"],
input[type="email"], input[type="password"], input[type="tel"],
input[type="month"], input[type="week"], select, textarea {
    width: 100%; padding: 0.625rem 0.25rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--form-line-color, rgba(255,255,255,0.12));
    border-radius: 0;
    font-size: var(--fs-sm); font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    color-scheme: dark;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}
input[type="date"],
input[type="month"],
input[type="week"] {
    color-scheme: dark;
    position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
input[type="date"],
input[type="month"],
input[type="week"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23AAAAAA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 1.25rem;
}
.login-page input[type="date"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23AAAAAA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 1.25rem;
}
textarea {
    min-height: 2.25rem;
    resize: none;
    overflow: hidden;
    line-height: 1.5;
    transition: height 0.1s ease;
}
input::placeholder, textarea::placeholder { color: var(--form-placeholder, rgba(255,255,255,0.3)); }
select { cursor: pointer; }
select option { background: #1a1a1a; color: var(--text-primary); }
input:hover, select:hover, textarea:hover {
    border-bottom-color: var(--accent, #E53935);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-bottom-color: var(--accent, #E53935);
    box-shadow: 0 1px 0 var(--accent, #E53935);
    background: transparent;
}
input:disabled, input[readonly],
select:disabled, select[readonly],
textarea:disabled, textarea[readonly] {
    background: transparent;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    opacity: 0.7;
    cursor: not-allowed;
}
input:disabled:hover, input[readonly]:hover {
    border-bottom-color: rgba(255,255,255,0.06);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 0.75rem; }

/* ═══ 버튼 ═══ */
.btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.625rem 1.25rem; border: none;
    border-radius: var(--radius-xs);
    font-size: var(--fs-sm); font-weight: 600;
    font-family: inherit; cursor: pointer;
    transition: var(--tr); white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
    filter: brightness(0.85);
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
}
.btn-success { background: rgba(76,175,80,0.15); color: var(--success); border: none; }
.btn-success:hover { background: rgba(76,175,80,0.25); }
.btn-danger { background: var(--danger-bg); color: var(--accent-text); border: none; }
.btn-danger:hover { background: rgba(229,57,53,0.2); }
.btn-outline {
    background: rgba(255,255,255,0.04); color: var(--text-secondary);
    border: none;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: var(--fs-xs); }
.btn-group { display: flex; gap: 0.25rem; flex-wrap: wrap; }

/* ═══ 알림 ═══ */
.alert {
    padding: 0.875rem 1rem; border-radius: var(--radius-sm);
    font-size: var(--fs-sm); margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
    backdrop-filter: blur(10px);
    border: none;
}
.alert-warning { background: var(--warning-bg); color: var(--warning);  }
.alert-danger { background: var(--danger-bg); color: var(--accent-text);  }
.alert-info { background: var(--info-bg); color: var(--info);  }
.alert-success { background: var(--success-bg); color: var(--success);  }

/* ═══ 필터 바 ═══ */
.filter-bar {
    background: var(--glass); padding: 0.75rem 1rem;
    border-radius: var(--radius-sm); margin-bottom: 1rem;
    border: none;
    display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap;
}
.filter-bar label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.filter-bar select, .filter-bar input {
    width: auto; min-width: 8.75rem;
    padding: 0.375rem 0.625rem; font-size: var(--fs-sm);
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: var(--radius-xs); color: var(--text-primary); font-family: inherit;
}
.filter-bar select:focus, .filter-bar input:focus {
    border-color: var(--accent); outline: none;
}
.filter-bar input[type="week"], .filter-bar input[type="date"] {
    color-scheme: dark;
}
.filter-bar input[type="week"]::-webkit-calendar-picker-indicator,
.filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7); cursor: pointer;
}

/* ═══ 파이프라인 바 ═══ */
.pipeline-bar {
    display: flex; height: 1.75rem; border-radius: 2rem;
    overflow: hidden; background: var(--bg-surface);
}
.pipeline-bar .seg {
    display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-xs); font-weight: 600; color: #fff;
}
.seg-리드 { background: #42A5F5; } .seg-제안 { background: #FF9800; }
.seg-계약 { background: #66BB6A; } .seg-촬영 { background: #AB47BC; }
.seg-방송완료 { background: #26A69A; }

/* ═══ 모달 ═══ */
.modal-overlay {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: rgba(16, 16, 20, 0.88);
    backdrop-filter: blur(80px) saturate(1.5);
    border: none;
    border-radius: var(--radius);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 32px 80px rgba(0,0,0,0.7);
    width: 90%; max-width: 40rem;
    max-height: 85vh; overflow-y: auto;
    padding: 1.75rem;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-header h3 { font-size: var(--fs-md); color: var(--text-primary); }
.modal-close {
    background: rgba(255,255,255,0.06); border: none;
    width: 2rem; height: 2rem; border-radius: 50%;
    font-size: 1rem; color: var(--text-secondary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--tr);
}
.modal-close:hover { background: var(--danger-bg); color: var(--accent-text); }
.modal textarea {
    width: 100%; padding: 0.625rem 0.875rem;
    background: rgba(255,255,255,0.04);
    border: none; border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xs);
    font-size: var(--fs-sm); font-family: inherit;
    color: var(--text-primary); resize: vertical;
}

/* ═══ 로그인 ═══ */
.login-page {
    min-height: 100vh;
    display: flex; justify-content: center; align-items: center;
    background: var(--bg-deep);
    position: relative; overflow: hidden;
}
.login-page .video-bg { position: absolute; top:0; left:0; right:0; bottom:0; z-index:0; }
.login-card {
    position: relative; z-index: 1;
    background: rgba(14, 14, 18, var(--login-card-opacity, 0.78));
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 32px 80px rgba(0,0,0,0.6);
    width: 100%; max-width: 26rem;
    position: relative; z-index: 2;
}
.login-card h1 {
    font-size: var(--fs-lg); color: var(--text-primary);
    margin-bottom: 0.375rem; text-align: center;
}
.login-card .subtitle {
    text-align: center; font-size: var(--fs-sm);
    color: var(--text-tertiary); margin-bottom: 1.75rem;
}
.login-card .btn {
    width: 100%; padding: 0.875rem; font-size: var(--fs-base); justify-content: center;
}

/* ═══ 비밀번호 변경 배너 ═══ */
.pw-force-banner {
    background: var(--warning-bg);
    border: none;
    border-radius: var(--radius); padding: 1.25rem;
    text-align: center; margin-bottom: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255,179,0,0.15);
}
.pw-force-banner h3 { color: var(--warning); margin-bottom: 0.5rem; }

/* ═══ 역할별 컬러 ═══ */
.role-sysadmin { color: var(--accent-text); font-weight: 700; }
.role-ceo { color: #FFD54F; font-weight: 700; }
.role-manager { color: #81C784; font-weight: 700; }
.role-team_leader { color: #64B5F6; font-weight: 700; }
.role-staff { color: var(--text-secondary); }

/* ═══ 유틸리티 ═══ */
.text-right { text-align: right; } .text-left { text-align: left; } .text-center { text-align: center; }
.text-warn { color: var(--accent-text); } .text-success { color: var(--success); } .text-muted { color: var(--text-tertiary); }
.font-mono { font-family: 'SF Mono', 'Consolas', monospace; }
.mt-8 { margin-top: 0.5rem; } .mt-16 { margin-top: 1rem; }
.mb-16 { margin-bottom: 1rem; } .hidden { display: none; }

/* ═══ 스크롤바 ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ═══ 반응형 ═══ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; padding: 1rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
}

/* ── 아이콘 단색 통일 (테마 연동) ── */
.sidebar-nav a .icon {
    color: var(--icon-color, var(--accent));
}

/* ── 대시보드 필터 ── */
.dash-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.dash-filter-label {
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
    font-weight: 600;
    white-space: nowrap;
}
.dash-filter {
    padding: 0.375rem 0.625rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: var(--fs-xs);
    font-family: inherit;
    outline: none;
    min-width: 0;
    width: auto;
}
.dash-filter:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}
select.dash-filter {
    cursor: pointer;
    appearance: auto;
}
input[type="week"].dash-filter,
input[type="date"].dash-filter {
    width: 10rem;
    color-scheme: dark;
}
input[type="week"].dash-filter::-webkit-calendar-picker-indicator,
input[type="date"].dash-filter::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
    cursor: pointer;
    width: 1.25rem; height: 1.25rem;
}
.dash-filter-btn {
    padding: 0.375rem 1rem;
    font-size: var(--fs-xs);
    white-space: nowrap;
}
