/* ==========================================================================
   BARUN CAR CENTER - PREMIUM DESIGN SYSTEM & CUSTOM CSS
   ========================================================================== */

/* =========================================================
   v2 Design Tokens — Barun Clean (네이비 사이드바 · 골드 액센트 · Pretendard)
   ========================================================= */
:root {
    /* --- v2 핵심 컬러 (Barun clean palette) --- */
    --bg-app: #F4F6F8;
    --bg-2: #EAEFF2;
    --bg-3: #DFE6EA;
    --cream: #FFFFFF;
    --bg-card: #FFFFFF;
    --ink: #1B2A32;
    --text-main: #1B2A32;
    --ink-2: #3D4D55;
    --ink-3: #687781;
    --text-muted: #687781;
    --ink-4: #9BAAB2;
    --line: #E4E9ED;
    --line-2: #D2DADF;
    --border-color: #E4E9ED;

    /* --- Brand --- */
    --navy: #103A52;          /* 사이드바 다크 네이비 */
    --navy-2: #0A2A3C;
    --walnut: #155A7D;        /* 액센트 (시안-블루) — primary 역할 */
    --walnut-2: #0E4159;
    --gold: #F2C200;          /* 로고 골드 */
    --gold-2: #E0A800;

    /* --- 호환 매핑 (기존 변수명 유지) --- */
    --primary-hue: 200;
    --primary: var(--walnut);
    --primary-hover: var(--walnut-2);
    --primary-light: rgba(21, 90, 125, 0.1);
    --accent: var(--gold);
    --success: #2E7D5B;
    --success-light: #DDF1E7;
    --warning: #C2410C;
    --warning-light: #FFEDD5;
    --danger: #B91C1C;
    --sidebar-bg: var(--navy);
    --sidebar-text: rgba(250, 247, 241, 0.85);
    --sidebar-active: var(--cream);

    /* --- Font Weight --- */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    /* --- Transitions & Shadows --- */
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 0 rgba(28, 26, 23, 0.04), 0 2px 8px rgba(28, 26, 23, 0.04);
    --shadow-card: 0 1px 0 rgba(28, 26, 23, 0.04), 0 12px 28px -12px rgba(28, 26, 23, 0.12);
    --shadow-md: var(--shadow-card);
    --shadow-lg: 0 20px 50px -20px rgba(28, 26, 23, 0.25);
    --shadow-float: 0 20px 50px -20px rgba(28, 26, 23, 0.25);
    --shadow-kakao: 0 2px 6px rgba(0, 0, 0, 0.15);

    /* --- Border Radius --- */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
    letter-spacing: -0.01em;
}

/* App Container Layout — 시뮬레이터 제거 후 2컬럼(사이드바 + 본문) */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* 1. MAIN HEADER / SIDEBAR NAV */
.main-header {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.25rem;
    font-weight: var(--fw-black);
    color: #fff;
    margin-bottom: 1.6rem;
    letter-spacing: -0.03em;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.header-logo:hover { opacity: 0.85; }
.logo-sub {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: rgba(250, 247, 241, 0.5);
    font-weight: 500;
    margin-top: 2px;
}
.mobile-topbar-logo { text-decoration: none; cursor: pointer; }

.logo-icon {
    font-size: 1.4rem;
    /* logo3.png 자체에 골드 링이 포함되어 있어 배경 제거 */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-text span {
    color: var(--gold);
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
}

.nav-item {
    background: transparent;
    border: none;
    color: rgba(250, 247, 241, 0.72);
    padding: 0.7rem 0.85rem;
    text-align: left;
    font-size: 0.92rem;
    font-weight: var(--fw-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: var(--transition-fast);
    letter-spacing: -0.01em;
}

.nav-item:hover {
    background: rgba(250, 247, 241, 0.07);
    color: #fff;
}

.nav-item.active {
    background: var(--cream);
    color: var(--ink);
    font-weight: var(--fw-bold);
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.header-footer {
    font-size: 0.85rem;
    opacity: 0.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* --- Mobile navigation chrome (hidden on desktop, activated < 768px) --- */
.mobile-topbar { display: none; }
.mobile-nav-toggle { display: none; }
.nav-backdrop { display: none; }
.drawer-close-btn { display: none; }

/* 2. MAIN CONTENT AREA */
.main-content {
    padding: 2.5rem;
    overflow-y: auto;
    background-image: radial-gradient(at 0% 0%, hsl(210, 30%, 94%) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, hsl(220, 20%, 92%) 0px, transparent 50%);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
    display: block;
}

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

/* v2 앱 리스킨 — 페이지 헤더 (eyebrow + 큰 타이틀 + sub) */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.section-header::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--walnut);
    margin-bottom: 0.85rem;
    border-radius: 2px;
}

.section-header h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: var(--fw-bold);
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.section-header p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Brand Hero Layout */
.brand-hero {
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, hsl(220, 85%, 20%) 0%, hsl(220, 90%, 10%) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.brand-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-hero .badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.brand-hero h1 {
    font-size: 2.75rem;
    line-height: 1.25;
    font-weight: var(--fw-black);
    margin-bottom: 1.5rem;
}

.brand-hero h1 .highlight {
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-hero .hero-desc {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Philosophy Section */
.philosophy-section {
    margin-bottom: 3rem;
}

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.section-tag {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 0.75rem;
}

.philosophy-content h3 {
    font-size: 1.65rem;
    font-weight: var(--fw-bold);
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.philosophy-content p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

.philosophy-badge-grid {
    display: grid;
    gap: 1rem;
}

.mini-badge {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition-smooth);
}

.mini-badge:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08);
}

.mini-badge .badge-num {
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    color: var(--primary);
}

.mini-badge .badge-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: var(--fw-semibold);
}

/* Comparison Section */
.comparison-container {
    margin-bottom: 4rem;
}

.comparison-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.comparison-title h2 {
    font-size: 1.75rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.5rem;
}

.comparison-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.comparison-card {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.comparison-card h4 {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    margin-bottom: 1.5rem;
}

.comparison-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.comparison-card li {
    font-size: 0.92rem;
    line-height: 1.55;
    position: relative;
    padding-left: 1.6rem;
    color: var(--text-main);
}

.comparison-card.legacy {
    background: rgba(241, 245, 249, 0.4);
    border-left: 4px solid #cbd5e1;
}

.comparison-card.legacy h4 {
    color: #64748b;
}

.comparison-card.legacy li::before {
    content: '•';
    color: #94a3b8;
    font-size: 1.2rem;
    position: absolute;
    left: 4px;
    top: -1px;
}

.comparison-card.barun {
    background: rgba(14, 165, 233, 0.02);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.05);
}

.comparison-card.barun h4 {
    color: var(--primary);
}

.comparison-card.barun li::before {
    content: '✓';
    color: var(--primary);
    font-weight: var(--fw-bold);
    position: absolute;
    left: 2px;
    top: 1px;
}

/* Synergy Showcase Section */
.synergy-showcase {
    margin-bottom: 3.5rem;
}

.synergy-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.synergy-header h2 {
    font-size: 1.75rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.5rem;
}

.synergy-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.synergy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.synergy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.synergy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(14, 165, 233, 0.35);
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.card-icon-wrapper.b-biz {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
}

.card-icon-wrapper.b-car {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.card-icon-wrapper.o-pro {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.synergy-card h4 {
    font-size: 1.15rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.75rem;
}

.synergy-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Glowing Primary Button Extra Class */
.btn-glow {
    position: relative;
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 24px rgba(14, 165, 233, 0.6);
}

/* 3. CARDS & FORMS */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.4);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: var(--fw-bold);
    color: var(--text-main);
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Grid Layout for portals */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Form Styles */
.form-card {
    padding: 0;
}

#intake-form {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h4 {
    font-size: 0.95rem;
    font-weight: var(--fw-bold);
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: var(--fw-semibold);
    color: var(--text-main);
}

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

.form-group input,
.form-group textarea,
.form-group select,
.search-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background-color: #fff;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-hue), 85%, 48%, 0.12);
}

.form-group textarea {
    resize: none;
}

/* Buttons */
/* === v2 BUTTONS — pill shape, navy primary, cream secondary === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    font-size: 0.88rem;
    font-weight: var(--fw-bold);
    border-radius: 100px;          /* v2: pill */
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: var(--navy);
    color: var(--cream);
}
.btn-primary:hover {
    background-color: var(--navy-2);
    transform: translateY(-1px);
}

.btn-walnut {
    background-color: var(--walnut);
    color: var(--cream);
}
.btn-walnut:hover {
    background-color: var(--walnut-2);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--cream);
    color: var(--ink);
    border: 1px solid var(--line-2);
}
.btn-secondary:hover {
    background-color: #ffffff;
    border-color: var(--walnut);
}

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

.btn-success:hover {
    background-color: hsl(142, 70%, 40%);
}

.btn-block {
    width: 100%;
}

.btn-xs {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 1rem 1.25rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem !important;
}

/* Badges / Status styling */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
}

.status-badge.RECEIVED {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-badge.REPAIRING {
    background-color: var(--primary-light);
    color: var(--primary);
}

.status-badge.COMPLETED {
    background-color: var(--success-light);
    color: var(--success);
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.received { background-color: var(--warning-light); }
.stat-icon.repairing { background-color: var(--primary-light); }
.stat-icon.completed { background-color: var(--success-light); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: var(--fw-bold);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    gap: 0.35rem;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border-color);
    background: transparent;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}

/* 4. CUSTOMER SEARCH & TIMELINE */
.customer-search-area {
    margin-bottom: 2rem;
}

.search-card {
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.search-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

.search-form-row {
    display: flex;
    gap: 0.75rem;
}

.search-form-row .search-input {
    flex-grow: 1;
}

.customer-detail-container {
    animation: fadeIn 0.4s ease-out;
    padding: 0 0.25rem 3rem;
}
#tab-customer { padding-bottom: 4rem; }
.customer-search-area { padding: 0 0.25rem; }
@media (max-width: 768px) {
    #tab-customer { padding-bottom: 5rem; }
    .customer-detail-container { padding: 0 0.25rem 4rem; }
}

/* 사이드바 외부 링크 nav 항목 */
.nav-item.nav-item-ext {
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
}
.nav-item.nav-item-ext:hover { opacity: 1; }

/* 커미션 검색 입력줄 */
.commission-search-row {
    padding: 0 1rem 0.75rem;
}
.commission-search-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-app);
    color: var(--text-main);
    transition: var(--transition-smooth);
}
.commission-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px hsla(220, 85%, 48%, 0.12);
}

/* 모바일: 버튼/뱃지/액션 텍스트 줄바꿈 방지 (한글 단어 단위) */
@media (max-width: 768px) {
    .btn,
    .filter-btn,
    .vtype-btn,
    .segment-btn,
    .nav-item,
    .grade-chip,
    .role-badge,
    .claim-badge,
    .ohpro-badge,
    .alimtalk-share-btn,
    .alimtalk-btn,
    .lock-user-pill,
    .org-toggle-btn {
        white-space: nowrap;
        word-break: keep-all;
    }
    /* 폼 행에서 인라인 input + button 이 깨지지 않게 */
    .form-row, .hero-actions { flex-wrap: wrap; }
    .form-row > * { min-width: 0; }
    /* 터치 영역 (모바일에서 핑거 친화적인 최소 높이) */
    .btn, .filter-btn, .nav-item, .vtype-btn { min-height: 38px; }
}

.hidden {
    display: none !important;
}

/* Timeline display */
.status-timeline-card {
    padding: 1.5rem;
}

.timeline-visual {
    margin: 3rem 1rem;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-connector {
    flex-grow: 1;
    height: 4px;
    background-color: var(--border-color);
    align-self: center;
    position: relative;
    top: -12px;
    z-index: 1;
    transition: var(--transition-smooth);
}

.timeline-connector.active {
    background-color: var(--primary);
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
    width: 120px;
}

.timeline-step .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid var(--border-color);
    color: var(--text-muted);
    font-weight: var(--fw-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.timeline-step.active .step-circle {
    border-color: var(--primary);
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 12px rgba(var(--primary-hue), 85%, 48%, 0.4);
}

.timeline-step.completed .step-circle {
    border-color: var(--success);
    background-color: var(--success);
    color: #fff;
}

.timeline-step h4 {
    font-size: 0.9rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.25rem;
}

.timeline-step .step-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.vehicle-info-box {
    background-color: rgba(0,0,0,0.02);
    border: 1px dashed var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
}

.vehicle-info-box h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    font-size: 0.85rem;
}

/* PDF Display Panel */
.pdf-display-area {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background-color: rgba(0,0,0,0.01);
}

.pdf-not-ready {
    text-align: center;
    color: var(--text-muted);
}

.pdf-not-ready .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.pdf-ready-view {
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pdf-header {
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.pdf-header h4 {
    font-size: 1.25rem;
    font-weight: var(--fw-black);
}

.pdf-body {
    flex-grow: 1;
    font-size: 0.85rem;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.pdf-table th, .pdf-table td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    font-size: 0.8rem;
}

.pdf-table th {
    background-color: rgba(0,0,0,0.03);
}

.pdf-total {
    text-align: right;
    font-size: 1rem;
    font-weight: var(--fw-bold);
    margin-top: 1rem;
    color: var(--primary);
}


/* ==========================================================================
   5. KAKAOTALK SIMULATOR SIDE PANEL
   ========================================================================== */
.simulator-panel {
    background-color: hsl(220, 20%, 93%);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.simulator-header h3 {
    font-size: 1.1rem;
    font-weight: var(--fw-bold);
    color: var(--text-main);
}

.simulator-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tabs inside phone simulator */
.phone-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px;
    border-radius: var(--radius-sm);
}

.phone-tab {
    background: transparent;
    border: none;
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.phone-tab span {
    font-size: 0.65rem;
    display: block;
    opacity: 0.7;
}

.phone-tab.active {
    background: #fff;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

/* Smartphone Mockup Frame */
.phone-frame {
    width: 100%;
    max-width: 320px;
    height: 580px;
    background-color: #1e293b;
    border: 10px solid #0f172a;
    border-radius: 36px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Notch at the top */
.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 18px;
    background-color: #0f172a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 100;
}

/* Internal phone screen */
.phone-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #bac1ec; /* Classic KakaoTalk Chatroom bg */
}

/* Screen Status Bar */
.phone-status-bar {
    height: 28px;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 16px 0;
    font-size: 0.7rem;
    font-weight: var(--fw-semibold);
    color: #1e293b;
    z-index: 99;
}

/* Push Notification Toast (Dynamic Alert) */
.phone-push-toast {
    position: absolute;
    top: -80px; /* Hidden state */
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    z-index: 200;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.phone-push-toast.active {
    transform: translateY(95px);
}

.push-icon {
    font-size: 1.25rem;
}

.push-content {
    flex-grow: 1;
    font-size: 0.75rem;
    overflow: hidden;
}

.push-title {
    display: block;
    font-weight: var(--fw-bold);
    margin-bottom: 0.1rem;
}

.push-body {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* KakaoTalk Shell */
.kakao-app {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: calc(100% - 28px);
}

.kakao-header {
    background-color: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kakao-back-btn {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
}

.kakao-channel-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.kakao-channel-name {
    font-size: 0.85rem;
    font-weight: var(--fw-bold);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.verified-badge {
    background-color: #fee500;
    color: #1e293b;
    font-size: 0.55rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kakao-sub-text {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.kakao-header-menu {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Chat Messages */
.kakao-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kakao-empty-chat {
    text-align: center;
    padding: 3rem 1rem;
    color: hsl(220, 20%, 50%);
}

.kakao-avatar {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 40%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.kakao-empty-chat h4 {
    font-size: 0.85rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.kakao-empty-chat p {
    font-size: 0.75rem;
}

/* Custom Alimtalk UI Template */
.alimtalk-container {
    max-width: 85%;
    align-self: flex-start;
}

.alimtalk-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-left: 0.25rem;
}

.alimtalk-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-kakao);
}

.alimtalk-header {
    background-color: #f9f9f9;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.7rem;
    font-weight: var(--fw-bold);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.alimtalk-badge {
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.6rem;
}

.alimtalk-body {
    padding: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
}

.alimtalk-body strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: #000;
}

.alimtalk-details {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #eee;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #444;
}

.alimtalk-actions {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eee;
}

.alimtalk-btn {
    background-color: #fff;
    border: none;
    padding: 0.65rem 0.5rem;
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    color: #4b5563;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.alimtalk-btn:last-child {
    border-bottom: none;
}

.alimtalk-btn:hover {
    background-color: #f3f4f6;
}

/* Kakao Share button — 실제 카카오톡으로 공유 */
.alimtalk-share-btn {
    margin: 0.5rem 0.75rem 0.75rem;
    background: #fee500; /* 카카오 옐로우 */
    color: #181600;
    border: none;
    width: calc(100% - 1.5rem);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: filter 0.15s, transform 0.05s;
    box-shadow: 0 2px 6px rgba(254, 229, 0, 0.35);
}
.alimtalk-share-btn:hover { filter: brightness(0.97); }
.alimtalk-share-btn:active { transform: scale(0.98); }
.alimtalk-share-btn .kakao-icon { font-size: 1.05rem; }

/* 알림톡 발송 액션 토스트 — 시뮬레이터 제거 후, 발송 알림 + 카톡 공유 */
.alim-toast {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: min(360px, calc(100vw - 36px));
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 2400;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}
.alim-toast.active { opacity: 1; transform: translateY(0); }
.alim-toast-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.alim-toast-icon { font-size: 1.4rem; }
.alim-toast-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.alim-toast-meta strong { font-size: 0.88rem; color: #0f172a; }
.alim-toast-to { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.alim-toast-close {
    background: transparent; border: none; font-size: 1.4rem; line-height: 1;
    color: #94a3b8; cursor: pointer; padding: 0 0.25rem;
}
.alim-toast-title { padding: 0.6rem 0.85rem 0.2rem; font-weight: 800; font-size: 0.92rem; color: #0f172a; }
.alim-toast-body { padding: 0 0.85rem 0.75rem; font-size: 0.82rem; color: var(--text-main); line-height: 1.55; max-height: 8rem; overflow-y: auto; }
.alim-toast-share {
    width: 100%;
    background: #fee500;
    color: #181600;
    border: none;
    padding: 0.7rem 0.9rem;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 0;
    transition: filter 0.15s;
}
.alim-toast-share:hover { filter: brightness(0.97); }
.alim-toast-share:active { transform: scale(0.99); }
@media (max-width: 600px) {
    .alim-toast { right: 12px; left: 12px; width: auto; bottom: 16px; }
}

/* 공유 결과 토스트 */
.share-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.45;
    white-space: pre-line;
    text-align: center;
    max-width: 86vw;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    z-index: 2200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.share-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Kakao Input styling */
.kakao-input-bar {
    background-color: #fff;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid #eee;
}

.kakao-plus {
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}

.kakao-input-field {
    flex-grow: 1;
    background-color: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.kakao-emoji {
    font-size: 1.2rem;
    cursor: pointer;
}

/* Simulator controls at bottom */
.simulator-controls {
    text-align: center;
}


/* ==========================================================================
   6. MODAL STYLES
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #fff;
    padding: 2.25rem;
    border-radius: var(--radius-md);
    max-width: 550px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-main);
}

.modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* File Upload drag-and-drop box */
.pdf-upload-box {
    border: 2px dashed var(--border-color);
    padding: 2rem;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    background-color: rgba(0,0,0,0.01);
    transition: var(--transition-smooth);
    margin-bottom: 0.75rem;
}

.pdf-upload-box:hover, .pdf-upload-box.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.upload-text {
    font-size: 0.85rem;
    font-weight: var(--fw-medium);
}

.file-name-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: var(--fw-bold);
    color: var(--primary);
}

.mock-pdf-option {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.mock-pdf-option label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
/* ==========================================================================
   7. RESPONSIVENESS AND COLLAPSIBLE ADAPTATIONS
   ========================================================================== */

/* Simulator Close Button (hidden on desktop) */
.simulator-close-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
}

/* Floating Mobile Simulator Button */
.mobile-simulator-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #fee500; /* Kakao Yellow */
    color: #1e293b;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.9rem 1.4rem;
    font-size: 0.9rem;
    font-weight: var(--fw-bold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.mobile-simulator-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.badge-dot {
    display: none;
    width: 10px;
    height: 10px;
    background-color: var(--danger);
    border: 2px solid #fee500;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    right: 6px;
    box-shadow: 0 0 8px var(--danger);
}

.badge-dot.active {
    display: block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

@media (max-width: 1200px) {
    .app-container { grid-template-columns: 240px 1fr; }
}

@media (max-width: 768px) {
    /* Single-column shell; the sidebar becomes an off-canvas drawer (BarunBiz pattern) */
    body { height: auto; }
    .app-container {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    /* --- Mobile top app bar (fixed, glass) --- */
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 0.85rem 0;
        background: rgba(15, 23, 42, 0.92);
        backdrop-filter: saturate(160%) blur(12px);
        -webkit-backdrop-filter: saturate(160%) blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 1100;
    }
    .mobile-topbar-logo {
        display: flex; align-items: center; gap: 0.5rem;
        font-size: 1.15rem; font-weight: var(--fw-black); color: #fff;
    }
    .mobile-topbar-logo .logo-icon { font-size: 1.3rem; }
    .mobile-topbar-logo .logo-text span { color: var(--accent); }
    .mobile-topbar-status { margin-left: auto; display: inline-flex; align-items: center; }

    /* Hamburger */
    .mobile-nav-toggle {
        display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
        width: 42px; height: 42px; padding: 9px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius-sm);
        cursor: pointer;
    }
    .mobile-nav-toggle span {
        display: block; height: 2px; width: 100%;
        background: #fff; border-radius: 2px;
    }

    /* --- Sidebar → left slide-out drawer --- */
    .main-header {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 84vw; max-width: 320px; height: 100%;
        padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.25rem 1.5rem;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1200;
    }
    .main-header.drawer-open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
    }

    .drawer-close-btn {
        display: block;
        position: absolute; top: 0.75rem; right: 0.85rem;
        width: 38px; height: 38px;
        background: rgba(255, 255, 255, 0.06);
        border: none; border-radius: var(--radius-sm);
        color: #fff; font-size: 1.6rem; line-height: 1;
        cursor: pointer;
    }

    .header-logo { margin-bottom: 2rem; }
    .main-nav { flex-direction: column; overflow: visible; gap: 0.35rem; }
    .nav-item { padding: 0.85rem 1rem; font-size: 0.98rem; opacity: 0.9; }

    /* --- Drawer backdrop --- */
    .nav-backdrop {
        display: block;
        position: fixed; inset: 0;
        background: rgba(2, 6, 23, 0.55);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 1150;
        opacity: 0; pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .nav-backdrop.active { opacity: 1; pointer-events: auto; }

    /* Lock page scroll while drawer is open */
    body.nav-open { overflow: hidden; }

    /* --- Content sits below the fixed top bar --- */
    .main-content {
        padding: calc(56px + env(safe-area-inset-top, 0px) + 1rem) 1rem 3rem;
        overflow-y: visible;
    }

    /* --- Spacing / typography down-scaling --- */
    .section-header { margin-bottom: 1.25rem; }
    .section-header h2 { font-size: 1.3rem; }
    .section-header p { font-size: 0.9rem; }
    .brand-hero { padding: 2rem 1.4rem; margin-bottom: 1.75rem; border-radius: var(--radius-md); }
    .brand-hero h1 { font-size: 1.6rem; line-height: 1.3; }
    .brand-hero .hero-desc { font-size: 0.9rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .form-section { padding: 1rem; }

    /* --- Stacking grids (fixed multi-col grids that caused horizontal page-scroll) --- */
    .grid-layout,
    .features-grid,
    .synergy-grid,
    .stats-row,
    .form-row { grid-template-columns: 1fr; }
    .synergy-card { padding: 1.5rem 1.4rem; }
    .stats-row { gap: 0.75rem; }

    /* Process flow: 2-column grid (01|02 / 03|04 / 05 centered, arrows hidden) */
    .process-flow {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        align-items: stretch;
    }
    .process-step {
        width: auto; max-width: none; flex: unset;
        padding: 1rem 0.85rem;
    }
    .process-step h4 { font-size: 0.95rem; }
    .process-step p  { font-size: 0.74rem; line-height: 1.45; }
    .process-arrow { display: none; }
    /* 5th (lone) step spans both columns, centered, same visual weight as the others */
    .process-flow .process-step:last-child {
        grid-column: 1 / -1;
        max-width: 48%;
        justify-self: center;
    }

    /* Philosophy card: stack text over the metric badges (was a cramped 2-col) */
    .philosophy-card { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
    .philosophy-content h3 { font-size: 1.3rem; }
    .philosophy-badge-grid { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
    .mini-badge { padding: 0.9rem 0.7rem; }
    .mini-badge .badge-num { font-size: 1.2rem; }
    .mini-badge .badge-lbl { font-size: 0.7rem; }

    /* Filter buttons: keep labels on one horizontal line (was breaking per-char on mobile).
       Also let the card header wrap so the title sits on its own row and buttons get the full row. */
    .card-header.flex-header {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        align-items: flex-start;
    }
    .filter-buttons {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.4rem;
    }
    .filter-btn {
        white-space: nowrap;
        word-break: keep-all;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Comparison: stack the two cards (was crushing text to 1-2 chars per line) */
    .comparison-container { margin-bottom: 2.5rem; }
    .comparison-title { margin-bottom: 1.5rem; }
    .comparison-title h2 { font-size: 1.3rem; }
    .comparison-grid { grid-template-columns: 1fr; gap: 1rem; }
    .comparison-card { padding: 1.4rem 1.3rem; }
    .comparison-card h4 { font-size: 1.1rem; margin-bottom: 1rem; }
    .form-row { gap: 0.5rem; margin-bottom: 0.5rem; }
    .workflow-steps { grid-template-columns: 1fr; gap: 1.5rem; }
    .workflow-steps::after { display: none; }

    /* Customer search: stack inputs + button (was overflowing horizontally) */
    .search-card { padding: 1.25rem; }
    .search-card h3 { font-size: 1.1rem; }
    .search-form-row { flex-direction: column; }
    .search-form-row .search-input,
    .search-form-row .btn { width: 100%; }

    /* --- Tables: horizontal scroll instead of squashing --- */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Segment buttons (3D viewer view switch) wrap & shrink */
    .view-segment-control { flex-wrap: wrap; }
    .segment-btn { font-size: 0.68rem; padding: 0.45rem 0.4rem; }

    /* Notification simulator drawer must sit above the fixed top bar when open */
    .simulator-panel { z-index: 1300; padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)); }
}

/* Phones: trim further */
@media (max-width: 480px) {
    .main-content { padding-left: 0.75rem; padding-right: 0.75rem; }
    .brand-hero { padding: 1.6rem 1.15rem; }
    .brand-hero h1 { font-size: 1.4rem; }
    .section-header h2 { font-size: 1.18rem; }
    .mobile-topbar-logo { font-size: 1.05rem; }
}

/* --------------------------------------------------------------------------
   DAMAGE SCANNER & OHPRO PREMIUM WASH INTEGRATION STYLES
   -------------------------------------------------------------------------- */

/* Vehicle type selector (sedan / SUV / truck / sports) */
.vehicle-type-control {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.5rem 0 0.75rem;
    flex-wrap: wrap;
}
.vehicle-type-label {
    font-size: 0.78rem;
    font-weight: var(--fw-bold);
    color: var(--text-muted);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.vehicle-type-tabs {
    display: flex;
    flex: 1 1 auto;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(14, 165, 233, 0.25);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    gap: 0.2rem;
    flex-wrap: wrap;
}
.vtype-btn {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    word-break: keep-all;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.vtype-btn:hover { color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.04); }
.vtype-btn.active {
    background: linear-gradient(135deg, hsl(195, 92%, 55%), hsl(220, 85%, 55%));
    color: #fff;
    box-shadow: 0 4px 12px -2px rgba(56, 189, 248, 0.45);
}

.view-segment-control {
    display: flex;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(14, 165, 233, 0.25);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.85rem;
    gap: 0.25rem;
}

.segment-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.segment-btn:hover {
    color: #fff;
    background: rgba(14, 165, 233, 0.1);
}

.segment-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.damage-scanner-canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0.5rem auto;
}

.damage-scanner-canvas-wrapper::before,
.damage-scanner-canvas-wrapper::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 5;
    border-color: rgba(14, 165, 233, 0.8);
    border-style: solid;
}
.damage-scanner-canvas-wrapper::before {
    top: 0px;
    left: 0px;
    border-width: 2px 0 0 2px;
    border-top-left-radius: 4px;
}
.damage-scanner-canvas-wrapper::after {
    bottom: 0px;
    right: 0px;
    border-width: 0 2px 2px 0;
    border-bottom-right-radius: 4px;
}

.damage-scanner-canvas {
    position: relative;
    width: 100%;
    border: 1px solid #d4d4d8;
    border-radius: var(--radius-md);
    background: #ffffff;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: center;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    cursor: crosshair;
    user-select: none;
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.damage-scanner-canvas.viewer-mode {
    cursor: default;
    background: #fafafa;
}

.damage-scanner-canvas::before {
    content: 'INSPECTION DIAGRAM';
    position: absolute;
    top: 10px;
    left: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem;
    color: rgba(0, 0, 0, 0.35);
    font-weight: 700;
    letter-spacing: 1px;
    pointer-events: none;
}

.damage-scanner-canvas::after {
    content: 'MODEL: ' attr(data-model);
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem;
    color: rgba(0, 0, 0, 0.35);
    font-weight: 700;
    letter-spacing: 1px;
    pointer-events: none;
}

.damage-scanner-canvas.viewer-mode::before {
    content: 'STATUS: DIAGNOSTIC_VIEW';
}

.damage-scanner-canvas svg {
    width: 100%;
    height: 100%;
    padding: 10px 15px;
}

/* Custom interactive pins (futuristic radar beacons) */
.damage-pin {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.damage-pin::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    opacity: 0;
    animation: pinRadarRipple 1.8s cubic-bezier(0.25, 0, 0, 1) infinite;
    pointer-events: none;
}

@keyframes pinRadarRipple {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.damage-pin:hover {
    transform: translate(-50%, -50%) scale(1.35);
    z-index: 15;
}

/* Colors and glow animations by damage type */
.damage-pin.scratch {
    background-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}
.damage-pin.dent {
    background-color: #f97316;
    color: #f97316;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
}
.damage-pin.broken {
    background-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}
.damage-pin.other {
    background-color: #94a3b8;
    color: #94a3b8;
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.8);
}

/* Clean technical line-drawing style (matches automotive damage report diagrams) */
.car-svg {
    width: 100%;
    height: 100%;
}

.car-svg .blueprint-grid { display: none; }

.car-svg .outline {
    stroke: #1a1a1a;
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-linecap: round;
    fill: #ffffff;
    transition: all 0.2s ease;
}

.car-svg .details {
    stroke: #1a1a1a;
    stroke-width: 1;
    stroke-linejoin: round;
    stroke-linecap: round;
    fill: none;
    transition: all 0.2s ease;
}

.car-svg .glow-headlight {
    stroke: #1a1a1a;
    stroke-width: 1;
    fill: #ffffff;
}

.car-svg .glow-taillight {
    stroke: #1a1a1a;
    stroke-width: 1;
    fill: #ffffff;
}

.car-svg .guide-text {
    font-family: inherit;
    font-size: 8px;
    fill: #6b6b6b;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Pulsing radar scan bar effect overlay */
.scanner-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, rgba(56, 189, 248, 0.7), rgba(56, 189, 248, 0));
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    pointer-events: none;
    z-index: 3;
    animation: scanAnimation 5s linear infinite;
}

@keyframes scanAnimation {
    0% { top: 0%; opacity: 0; }
    5% { opacity: 0.8; }
    95% { opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

/* Smart Pin Creation Popover */
.pin-bubble-popover {
    display: none; /* hidden initially */
    position: absolute;
    background-color: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    width: 250px;
    padding: 1rem;
    z-index: 999;
    font-size: 0.8rem;
    animation: slideUpFade 0.25s ease-out;
}

.pin-bubble-popover.active {
    display: block;
}

.popover-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
    top: -8px;
    left: 20px; /* adjusted dynamically via JS */
}

.pin-bubble-popover h5 {
    font-size: 0.85rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-group-sm {
    margin-bottom: 0.5rem;
}

.form-group-sm label {
    display: block;
    font-size: 0.7rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.form-group-sm select,
.form-group-sm input {
    width: 100%;
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #fff;
    color: var(--text-main);
    outline: none;
}

.form-group-sm select:focus,
.form-group-sm input:focus {
    border-color: var(--primary);
}

.photo-upload-wrapper {
    cursor: pointer;
}

.photo-preview-box {
    border: 1px dashed var(--border-color);
    background-color: rgba(0, 0, 0, 0.01);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: var(--transition-fast);
    max-height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview-box:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
}

.photo-preview-box img {
    max-width: 100%;
    max-height: 70px;
    object-fit: cover;
    border-radius: 2px;
}

.popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

/* Hover Details Tooltip (Read-only Viewer) */
.pin-hover-tooltip {
    display: none;
    position: absolute;
    background-color: rgba(9, 15, 29, 0.96);
    backdrop-filter: blur(10px);
    color: #f8fafc;
    border: 1px solid rgba(14, 165, 233, 0.45);
    border-radius: var(--radius-md);
    width: 230px;
    padding: 0.85rem;
    z-index: 1000;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75), 0 0 15px rgba(14, 165, 233, 0.15);
    pointer-events: none;
    animation: fadeIn 0.25s ease-out;
}

.pin-hover-tooltip.active {
    display: block;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 0.25rem;
}

.tooltip-type-badge {
    font-size: 0.65rem;
    font-weight: var(--fw-bold);
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.tooltip-type-badge.scratch { background-color: hsl(45, 100%, 40%); color: #fff; }
.tooltip-type-badge.dent { background-color: hsl(25, 95%, 45%); color: #fff; }
.tooltip-type-badge.broken { background-color: hsl(0, 85%, 50%); color: #fff; }
.tooltip-type-badge.other { background-color: hsl(210, 15%, 45%); color: #fff; }

.tooltip-date {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
}

.tooltip-note {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.tooltip-photo {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

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

.ohpro-option-box {
    background: linear-gradient(135deg, hsl(45, 100%, 97%) 0%, hsl(40, 100%, 93%) 100%);
    border: 1.5px dashed hsl(40, 60%, 75%);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.ohpro-option-box:hover {
    border-color: hsl(40, 70%, 65%);
}

.ohpro-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
}

.ohpro-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: hsl(40, 95%, 45%);
}

.ohpro-badge {
    background: linear-gradient(135deg, hsl(40, 95%, 45%) 0%, hsl(45, 95%, 40%) 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: var(--fw-bold);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.ohpro-desc {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: hsl(30, 25%, 35%);
    line-height: 1.45;
    margin-left: 1.75rem;
}

.badge-ohpro-active {
    display: inline-flex;
    align-items: center;
    background-color: hsl(45, 100%, 92%);
    color: hsl(40, 90%, 30%);
    border: 1px solid hsl(40, 70%, 75%);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* User Simulator Widget */
.login-simulator {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    margin: 0.5rem 0 1rem 0;
    border: 1px solid var(--border-color);
}

.simulator-title {
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    letter-spacing: 0.5px;
}

.user-select-dropdown {
    width: 100%;
    padding: 0.45rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    font-weight: var(--fw-semibold);
    outline: none;
    transition: var(--transition-smooth);
}

.user-select-dropdown:focus {
    border-color: var(--primary);
}

.current-user-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.4rem;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.current-user-card .avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: var(--fw-bold);
}

.current-user-card .info {
    display: flex;
    flex-direction: column;
}

.current-user-card .name {
    font-size: 0.8rem;
    font-weight: var(--fw-bold);
    color: var(--text-main);
}

.current-user-card .role-badge {
    font-size: 0.65rem;
    font-weight: var(--fw-semibold);
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 4px;
    border-radius: 2px;
    width: fit-content;
    margin-top: 1px;
}

/* User system/role badge colors */
.current-user-card .role-badge.BARUN_BIZ, 
.current-user-card .role-badge.AGENT {
    color: hsl(210, 90%, 35%);
    background-color: hsl(210, 100%, 93%);
}
.current-user-card .role-badge.OHPRO, 
.current-user-card .role-badge.DETAILER {
    color: hsl(40, 85%, 30%);
    background-color: hsl(45, 100%, 92%);
}
.current-user-card .role-badge.GARAGE, 
.current-user-card .role-badge.MECHANIC {
    color: hsl(142, 60%, 25%);
    background-color: hsl(142, 70%, 93%);
}
.current-user-card .role-badge.ADMIN {
    color: hsl(280, 80%, 35%);
    background-color: hsl(280, 90%, 94%);
}

/* Member Management Tab Styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.admin-stats-grid .stat-icon {
    font-size: 1.8rem;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
}

.admin-stats-grid .stat-info {
    display: flex;
    flex-direction: column;
}

.admin-stats-grid .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: var(--fw-semibold);
}

.admin-stats-grid .stat-value {
    font-size: 1.4rem;
    font-weight: var(--fw-bold);
    color: var(--text-main);
    margin-top: 0.15rem;
}

.member-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.member-table-controls .filter-group {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.member-filter-btn {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.member-filter-btn:hover {
    background-color: rgba(0,0,0,0.02);
}

.member-filter-btn.active {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

#member-search-input {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 220px;
    background-color: var(--card-bg);
    color: var(--text-main);
}

#member-search-input:focus {
    border-color: var(--primary);
    outline: none;
}

/* User table role badges */
.system-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.system-tag.BARUN_BIZ {
    background-color: hsl(210, 100%, 94%);
    color: hsl(210, 95%, 35%);
    border: 1px solid hsl(210, 80%, 85%);
}
.system-tag.OHPRO {
    background-color: hsl(45, 100%, 92%);
    color: hsl(40, 90%, 30%);
    border: 1px solid hsl(40, 70%, 80%);
}
.system-tag.GARAGE {
    background-color: hsl(142, 70%, 93%);
    color: hsl(142, 60%, 25%);
    border: 1px solid hsl(142, 50%, 82%);
}
.system-tag.ADMIN {
    background-color: hsl(280, 90%, 94%);
    color: hsl(280, 80%, 35%);
    border: 1px solid hsl(280, 60%, 85%);
}

.member-grade-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.03);
    color: var(--text-main);
}

.member-grade-badge.VIP {
    background-color: hsl(280, 100%, 95%);
    color: hsl(280, 95%, 40%);
    border: 1px solid hsl(280, 80%, 88%);
}
.member-grade-badge.Premium {
    background-color: hsl(200, 100%, 93%);
    color: hsl(200, 95%, 35%);
    border: 1px solid hsl(200, 80%, 85%);
}
.member-grade-badge.Gold {
    background-color: hsl(45, 100%, 93%);
    color: hsl(40, 95%, 35%);
    border: 1px solid hsl(40, 75%, 82%);
}

.member-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
}
.member-status-tag.active {
    color: var(--success);
}
.member-status-tag.pending {
    background: hsl(38, 92%, 92%);
    color: hsl(28, 80%, 35%);
    border: 1px solid hsl(38, 92%, 78%);
}
.member-status-tag.inactive {
    color: var(--text-muted);
}

/* Glassmorphism Locked Overlay for Tab Panel Access Control */
.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 450px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: var(--radius-lg);
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.lock-container {
    max-width: 460px;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lock-icon-wrapper {
    width: 70px;
    height: 70px;
    background: hsl(0, 100%, 96%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
    animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15); }
    50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15); }
}

.lock-title {
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.lock-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.lock-hint-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    width: 100%;
    font-size: 0.8rem;
    text-align: left;
}

.lock-hint-title {
    font-weight: var(--fw-bold);
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.lock-user-pill {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    margin: 2px;
    font-weight: var(--fw-semibold);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lock-user-pill:hover {
    background: var(--primary);
    color: #fff;
}

/* ==========================================================================
   3D INTERACTIVE VEHICLE SCANNER (Three.js Slicer-style Viewer)
   ========================================================================== */

/* The WebGL canvas is injected into the existing .damage-scanner-canvas container.
   The cyber grid + radial background of that container shows through (renderer alpha). */
.damage-scanner-canvas.three-active {
    cursor: grab;
}
.damage-scanner-canvas.three-active.is-dragging {
    cursor: grabbing;
}
.damage-scanner-canvas.three-active.is-readonly {
    cursor: default;
}

.three-viewport-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
    z-index: 2;
    outline: none;
    touch-action: none; /* allow drag/zoom gestures without page scroll */
}

/* On-canvas navigation hint */
.three-nav-hint {
    position: absolute;
    bottom: 10px;
    left: 12px;
    z-index: 4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: rgba(56, 189, 248, 0.7);
    text-shadow: 0 0 6px rgba(14, 165, 233, 0.4);
    pointer-events: none;
    user-select: none;
}

/* Loading spinner shown while Three.js downloads from CDN */
.three-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(56, 189, 248, 0.85);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
    pointer-events: none;
}
.three-loading-overlay .three-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(56, 189, 248, 0.18);
    border-top-color: rgba(56, 189, 248, 0.9);
    border-radius: 50%;
    animation: threeSpin 0.9s linear infinite;
}
@keyframes threeSpin {
    to { transform: rotate(360deg); }
}

/* The 3D viewer benefits from a taller stage than the flat 2D blueprint */
.damage-scanner-canvas.three-active {
    aspect-ratio: 16 / 10;
}

/* ==========================================================================
   초정밀 정비 프로세스 (브랜드 카피)
   ========================================================================== */
.process-showcase { margin: 2.5rem 0; }
.process-headline { text-align: center; max-width: 760px; margin: 0 auto 1.5rem; }
.process-headline h2 { font-size: 2rem; font-weight: var(--fw-black); line-height: 1.25; margin: 0.5rem 0; }
.process-headline h2 .accent { color: var(--primary); }
.process-headline p { color: var(--text-muted); line-height: 1.7; }
.process-flow { display: flex; align-items: stretch; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.process-step {
    flex: 1 1 150px; max-width: 200px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 1.1rem 0.9rem; text-align: center; position: relative;
    box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.process-step .ps-no { position: absolute; top: 8px; right: 10px; font-size: 0.7rem; font-weight: var(--fw-black); color: var(--border-color); }
.process-step .ps-ic { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }
.process-step h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.process-step p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.process-arrow { display: flex; align-items: center; color: var(--primary); font-weight: var(--fw-black); font-size: 1.2rem; }
.principle-band { margin-top: 1.5rem; }
.principle-card {
    background: linear-gradient(135deg, hsl(var(--primary-hue), 85%, 48%), hsl(200, 95%, 48%));
    color: #fff; border-radius: 16px; padding: 1.5rem 1.75rem; text-align: center; box-shadow: var(--shadow-md);
}
.principle-card .pc-ic { font-size: 2rem; }
.principle-card h4 { font-size: 1.2rem; margin: 0.4rem 0; font-weight: var(--fw-black); }
.principle-card p { opacity: 0.95; line-height: 1.7; max-width: 680px; margin: 0 auto; }
@media (max-width: 720px) { .process-arrow { transform: rotate(90deg); } }

/* ==========================================================================
   예상 커미션(캐시백) 게시판
   ========================================================================== */
.commission-hero {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: linear-gradient(120deg, hsl(220, 85%, 30%), hsl(200, 95%, 38%));
    color: #fff; border-radius: 18px; padding: 1.6rem 1.9rem; margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.commission-hero::after {
    content: "💰"; position: absolute; right: -10px; bottom: -18px; font-size: 7rem; opacity: 0.12; transform: rotate(-12deg);
}
.ch-tag { font-size: 0.85rem; font-weight: var(--fw-semibold); opacity: 0.95; }
.ch-amount { font-size: 2.6rem; font-weight: var(--fw-black); letter-spacing: -1px; margin: 0.2rem 0; text-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.ch-sub { font-size: 0.82rem; opacity: 0.92; }
.ch-muted { opacity: 0.7; }
.ch-countdown { text-align: center; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); border-radius: 14px; padding: 0.9rem 1.4rem; backdrop-filter: blur(4px); }
.ch-dday { display: block; font-size: 2rem; font-weight: var(--fw-black); }
.ch-dlabel { display: block; font-size: 0.72rem; opacity: 0.9; }
.ch-date { display: block; font-size: 0.85rem; font-weight: var(--fw-semibold); margin-top: 0.2rem; }

.commission-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.85rem; margin-bottom: 1.25rem; }
.ckpi { display: flex; align-items: center; gap: 0.75rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.ckpi-ic { font-size: 1.6rem; }
.ckpi-val { display: block; font-size: 1.25rem; font-weight: var(--fw-black); color: var(--text-main); }
.ckpi-lbl { display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }

.commission-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 860px) { .commission-layout { grid-template-columns: 1fr; } }
.commission-leaderboard { padding: 0.5rem 0.75rem 0.9rem; }
.lb-row { display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 0.6rem; padding: 0.55rem 0.5rem; border-bottom: 1px dashed var(--border-color); }
.lb-row:last-child { border-bottom: none; }
.lb-row.lb-top { background: linear-gradient(90deg, hsla(38,92%,50%,0.08), transparent); border-radius: 8px; }
.lb-rank { font-size: 1.1rem; font-weight: var(--fw-black); text-align: center; }
.lb-name { font-weight: var(--fw-semibold); }
.lb-count { font-size: 0.78rem; color: var(--text-muted); }
.lb-amt { font-weight: var(--fw-bold); color: var(--primary); }
.commission-formula { padding: 0.5rem 1rem 1rem; }
.commission-formula p { font-size: 0.86rem; line-height: 1.9; color: var(--text-main); border-bottom: 1px dashed var(--border-color); padding: 0.2rem 0; }
.commission-formula p:last-child { border-bottom: none; }
.cf-note { color: var(--text-muted); font-size: 0.76rem; }

.commission-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; padding: 0.5rem; }
.commission-card { border: 1px solid var(--border-color); border-radius: 14px; padding: 1rem 1.1rem; background: #fff; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.7rem; }
.cc-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.cc-car strong { font-size: 1.05rem; }
.cc-model { color: var(--text-muted); font-size: 0.85rem; }
.cc-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; }
.cc-agent { text-align: right; font-size: 0.82rem; }
.cc-agent .cc-up { display: block; color: var(--text-muted); font-size: 0.74rem; margin-top: 2px; }
.claim-badge { font-size: 0.7rem; font-weight: var(--fw-bold); padding: 2px 8px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.claim-badge.none { background: var(--warning-light); color: hsl(38, 80%, 35%); }
.claim-badge.claimed { background: hsl(200, 90%, 94%); color: hsl(200, 80%, 35%); }
.claim-badge.paid { background: var(--success-light); color: hsl(142, 70%, 28%); }

/* 단계 진행바 */
.commission-stage-bar { display: flex; align-items: center; justify-content: space-between; margin: 0.2rem 0; }
.cs-step { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 auto; }
.cs-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; background: var(--bg-app); border: 2px solid var(--border-color); }
.cs-lbl { font-size: 0.64rem; color: var(--text-muted); }
.cs-step.done .cs-dot { background: var(--success-light); border-color: var(--success); }
.cs-step.current .cs-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px hsla(220,85%,48%,0.15); }
.cs-step.current .cs-lbl { color: var(--primary); font-weight: var(--fw-bold); }
.cs-line { flex: 1 1 auto; height: 2px; background: var(--border-color); margin: 0 2px; margin-bottom: 14px; }

/* 캐시백 표 */
.cashback-table { border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; font-size: 0.8rem; }
.cbt-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0.4rem; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border-color); }
.cbt-row:last-child { border-bottom: none; }
.cbt-row span:first-child { color: var(--text-muted); }
.cbt-row b { text-align: right; font-weight: var(--fw-semibold); }
.cbt-head { background: var(--bg-app); font-weight: var(--fw-bold); }
.cbt-head span { color: var(--text-main) !important; text-align: right; }
.cbt-head span:first-child { text-align: left; }
.cbt-emph { background: hsla(220,85%,48%,0.05); }
.cbt-emph b { color: var(--primary); }

.cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cb-hint { font-size: 0.74rem; color: var(--text-muted); }
.rec-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: var(--fw-semibold); color: hsl(142,70%,30%); background: var(--success-light); border-radius: 999px; padding: 3px 9px; text-decoration: none; transition: var(--transition-smooth); }
.rec-chip:hover { background: hsl(142,70%,88%); }
.rec-chip.rec-none { color: var(--text-muted); background: var(--bg-app); }

/* 캐시백 입력(수리완료 모달) */
.cashback-input-section { background: hsla(220,85%,48%,0.04); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1rem; margin: 0.5rem 0 1rem; }
.cashback-input-section h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.cashback-preview { margin-top: 0.6rem; background: #fff; border: 1px dashed var(--primary); border-radius: 8px; padding: 0.5rem 0.75rem; }
.cbp-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 0.2rem 0; }
.cbp-row.cbp-emph { font-weight: var(--fw-bold); color: var(--primary); border-top: 1px dashed var(--border-color); margin-top: 2px; padding-top: 0.35rem; }

/* ==========================================================================
   조직도
   ========================================================================== */
.org-toggle { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.org-toggle-btn { padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-card); font-weight: var(--fw-semibold); font-size: 0.85rem; cursor: pointer; transition: var(--transition-smooth); }
.org-toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.org-chart-wrap { overflow-x: auto; padding: 1.5rem 0.5rem; }
.org-tree { display: flex; justify-content: center; gap: 1.5rem; min-width: max-content; margin: 0 auto; }
.org-branch { display: flex; flex-direction: column; align-items: center; }
.org-children { display: flex; justify-content: center; gap: 1rem; margin-top: 26px; position: relative; }
.org-children::before { content: ""; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); width: 2px; height: 13px; background: var(--border-color); }
.org-children > .org-branch { position: relative; }
.org-children > .org-branch::before { content: ""; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); width: 2px; height: 13px; background: var(--border-color); }
.org-children > .org-branch::after { content: ""; position: absolute; top: -13px; left: 0; right: 0; height: 2px; background: var(--border-color); }
.org-children > .org-branch:first-child::after { left: 50%; }
.org-children > .org-branch:last-child::after { right: 50%; }
.org-children > .org-branch:only-child::after { display: none; }
.org-node {
    display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 130px;
    background: #fff; border: 2px solid var(--border-color); border-top-width: 4px; border-radius: 12px;
    padding: 0.7rem 0.9rem; box-shadow: var(--shadow-sm); transition: var(--transition-smooth);
}
.org-node:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.org-node.sys-ADMIN { border-top-color: hsl(260, 60%, 55%); }
.org-node.sys-BARUN_BIZ { border-top-color: hsl(220, 85%, 50%); }
.org-node.sys-GARAGE { border-top-color: hsl(28, 90%, 50%); }
.org-node.sys-OHPRO { border-top-color: hsl(190, 80%, 45%); }
.org-node.org-me { box-shadow: 0 0 0 3px hsla(220,85%,48%,0.25); border-color: var(--primary); }
.org-node.org-dim { opacity: 0.35; filter: grayscale(0.5); }
.org-sys { font-size: 1.3rem; }
.org-name { font-weight: var(--fw-bold); font-size: 0.92rem; }
.org-name em { color: var(--primary); font-style: normal; font-size: 0.75rem; }
.org-title { font-size: 0.7rem; color: var(--text-muted); text-align: center; }
.org-grade { font-size: 0.62rem; font-weight: var(--fw-bold); padding: 1px 7px; border-radius: 999px; background: var(--bg-app); color: var(--text-muted); margin-top: 2px; }
.org-grade.VIP { background: hsl(280,60%,95%); color: hsl(280,50%,45%); }
.org-grade.Premium { background: hsl(38,92%,92%); color: hsl(38,80%,38%); }
.org-grade.Gold { background: hsl(45,90%,90%); color: hsl(40,70%,35%); }

/* ==========================================================================
   마이페이지
   ========================================================================== */
.mypage-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0.85rem; align-items: stretch; }
/* 태블릿/모바일: 프로필은 전체폭 헤더, KPI 카드는 내용 높이대로(stretch 금지) */
@media (max-width: 900px) {
    .mypage-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
    .mypage-grid .mp-profile { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .mypage-grid .mp-stat { padding: 0.8rem 0.7rem; }
    .mypage-grid .mp-stat-val { font-size: 1.02rem; }
    .mypage-grid .mp-stat-lbl { font-size: 0.68rem; }
}
.mp-profile { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; }
.mp-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-size: 1.5rem; font-weight: var(--fw-black); flex: 0 0 auto; }
.mp-id h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 0.4rem; }
.mp-id p { font-size: 0.82rem; color: var(--text-main); margin-top: 2px; }
.mp-sub { font-size: 0.74rem; color: var(--text-muted) !important; }
.mp-stat { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 1.1rem 1.2rem; }
.mp-stat-lbl { font-size: 0.76rem; color: var(--text-muted); }
.mp-stat-val { font-size: 1.35rem; font-weight: var(--fw-black); color: var(--primary); }
.csm { opacity: 0.3; font-size: 0.85rem; }
.csm.on { opacity: 1; }

.mp-team-summary { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: 0.5rem 0.25rem 1rem; }
.mp-team-summary > div { display: flex; flex-direction: column; gap: 2px; }
.mp-team-summary b { font-size: 1.1rem; font-weight: var(--fw-black); color: var(--primary); }

/* ==========================================================================
   로그인 화면 (정식 로그인 게이트)
   ========================================================================== */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at 30% 20%, hsl(220, 60%, 22%), hsl(222, 47%, 11%) 70%);
}
.login-screen.active { display: flex; }
.login-box {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 20px;
    padding: 2.2rem 2rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    animation: slideUpFade 0.35s ease-out;
}
.login-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.login-logo { font-size: 1.8rem; }
.login-logo-img { max-width: 220px; width: 100%; height: auto; display: block; }
.login-title { font-size: 1.6rem; font-weight: var(--fw-black); color: var(--text-main); }
.login-title span { color: var(--primary); }
/* 헤더/모바일 상단 BS 로고 (logo3.png 사용) — 노란 배지 안에 들어가는 이미지 */
.logo-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}
.login-sub { text-align: center; color: var(--text-muted); font-size: 0.82rem; margin: 0.4rem 0 1.6rem; }
.login-field { margin-bottom: 0.9rem; }
.login-field label { display: block; font-size: 0.8rem; font-weight: var(--fw-semibold); color: var(--text-main); margin-bottom: 0.35rem; }
.login-field input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--bg-app);
    transition: var(--transition-smooth);
}
.login-field input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px hsla(220, 85%, 48%, 0.12); }
.login-error { color: var(--danger); font-size: 0.8rem; min-height: 1.1rem; margin-bottom: 0.4rem; }
.login-demo {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
    text-align: center;
}
.login-demo-title { font-size: 0.74rem; color: var(--text-muted); font-weight: var(--fw-semibold); }
.login-demo-btns { display: flex; gap: 0.5rem; justify-content: center; margin: 0.6rem 0; flex-wrap: wrap; }
.login-demo-hint { font-size: 0.74rem; color: var(--text-muted); }
.login-demo-hint strong { color: var(--primary); }

/* 회원가입 진입 링크 */
.login-signup-row {
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.65);
}
.login-signup-row a {
    color: hsl(195, 90%, 70%);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.25rem;
}
.login-signup-row a:hover { text-decoration: underline; }

/* ==========================================================================
   🏠 HOME — v2 브랜드소개 (Home = Brand Intro)
   ========================================================================== */
/* main-content가 padding: 2.5rem를 갖는데, home-intro는 풀블리드 hero를 위해 무효화 */
.tab-panel.home-intro { padding: 0 !important; margin: -2.5rem -2.5rem 0 !important; }
@media (max-width: 768px) { .tab-panel.home-intro { margin: -1rem -0.75rem 0 !important; } }

.home-intro { color: var(--ink); }
.home-intro .hi-container { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.home-intro img { display: block; max-width: 100%; }

/* ----- HERO ----- */
.home-intro .hi-hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.home-intro .hi-hero-bg {
    position: absolute; inset: 0;
    background: url('hero-shop.png') center 38% / cover no-repeat, linear-gradient(135deg, #0f172a, #1e293b);
}
.home-intro .hi-hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(20,18,15,0.88) 0%, rgba(20,18,15,0.36) 42%, rgba(20,18,15,0.12) 70%, rgba(20,18,15,0.32) 100%);
}
.home-intro .hi-hero .hi-container { width: 100%; padding-bottom: 64px; padding-top: 120px; position: relative; z-index: 2; }

.home-intro .hi-hero-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px; background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 100px; font-size: 12px; font-weight: 600;
    color: #fff; letter-spacing: 0.1em; margin-bottom: 32px;
    backdrop-filter: blur(4px);
}
.home-intro .hi-hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: hi-pulse 2s ease-in-out infinite; }
@keyframes hi-pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.45;transform:scale(0.7);} }

.home-intro .hi-hero h1 {
    color: #fff; font-weight: 700;
    font-size: clamp(38px, 5.6vw, 78px);
    line-height: 1.08; letter-spacing: -0.04em;
    max-width: 18ch; margin-bottom: 28px;
    text-wrap: balance;
}
.home-intro .hi-hero h1 em { font-style: normal; font-weight: 800; color: var(--gold); }
.home-intro .hi-hero-sub { font-size: 18px; color: rgba(255,255,255,0.88); max-width: 56ch; line-height: 1.65; margin-bottom: 40px; }
.home-intro .hi-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.home-intro .hi-btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 15px 28px; border-radius: 100px;
    font-size: 15px; font-weight: 700;
    cursor: pointer; border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
}
.home-intro .hi-btn-primary { background: #fff; color: var(--ink); }
.home-intro .hi-btn-primary:hover { transform: translateY(-2px); background: #fff; }
.home-intro .hi-btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.42); }
.home-intro .hi-btn-ghost:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }

.home-intro .hi-hero-meta {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255,255,255,0.22);
    margin-top: 56px; padding-top: 28px;
}
.home-intro .hi-hero-meta > div { padding-right: 24px; border-right: 1px solid rgba(255,255,255,0.22); }
.home-intro .hi-hero-meta > div:last-child { border-right: none; }
.home-intro .hi-hero-meta .mv { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.home-intro .hi-hero-meta .ml { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 6px; }
@media (max-width: 720px) {
    .home-intro .hi-hero-meta { grid-template-columns: 1fr 1fr; gap: 22px 0; }
    .home-intro .hi-hero-meta > div:nth-child(2) { border-right: none; }
}

/* ----- SECTION SCAFFOLD ----- */
.home-intro .hi-section { padding: 100px 0; position: relative; }
.home-intro .hi-eyebrow {
    font-size: 12px; letter-spacing: 0.16em;
    color: var(--walnut); font-weight: 600;
    text-transform: uppercase; margin-bottom: 26px;
    display: flex; align-items: center; gap: 10px;
}
.home-intro .hi-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--line-2); }
.home-intro .hi-section-header {
    margin-bottom: 56px;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 56px; padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.home-intro .hi-section-title { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; max-width: 22ch; text-wrap: balance; }
.home-intro .hi-section-title em { font-style: normal; font-weight: 800; color: var(--walnut); }
.home-intro .hi-section-desc { color: var(--ink-3); font-size: 16px; max-width: 34ch; line-height: 1.65; flex-shrink: 0; }
@media (max-width: 860px) {
    .home-intro .hi-section-header { flex-direction: column; align-items: flex-start; gap: 18px; }
    .home-intro .hi-section-desc { max-width: 48ch; }
}

/* ----- PHILOSOPHY ----- */
.home-intro .hi-philo { background: var(--bg-2); }
.home-intro .hi-philo-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.home-intro .hi-philo-statement { font-weight: 600; font-size: clamp(24px, 3vw, 38px); line-height: 1.3; letter-spacing: -0.025em; max-width: 18ch; margin-bottom: 28px; }
.home-intro .hi-philo-statement em { font-style: normal; font-weight: 800; color: var(--walnut); }
.home-intro .hi-philo p { font-size: 16px; color: var(--ink-3); line-height: 1.75; }
.home-intro .hi-badge-stack { display: grid; gap: 14px; }
.home-intro .hi-mbadge {
    background: var(--cream); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 24px 26px;
    box-shadow: var(--shadow-card);
}
.home-intro .hi-mbadge .num { font-size: 34px; font-weight: 800; color: var(--walnut); letter-spacing: -0.03em; line-height: 1; }
.home-intro .hi-mbadge .lbl { font-size: 14px; color: var(--ink-3); font-weight: 500; margin-top: 10px; }
@media (max-width: 860px) { .home-intro .hi-philo-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ----- COMPARISON ----- */
.home-intro .hi-cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.home-intro .hi-cmp { border-radius: var(--radius-lg); padding: 40px 38px; }
.home-intro .hi-cmp h4 { font-size: 20px; font-weight: 700; margin-bottom: 26px; letter-spacing: -0.02em; }
.home-intro .hi-cmp ul { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.home-intro .hi-cmp li { font-size: 15px; line-height: 1.6; padding-left: 30px; position: relative; }
.home-intro .hi-cmp li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.home-intro .hi-cmp.legacy { background: var(--bg-2); border: 1px solid var(--line); }
.home-intro .hi-cmp.legacy h4 { color: var(--ink-3); }
.home-intro .hi-cmp.legacy li { color: var(--ink-3); }
.home-intro .hi-cmp.legacy li::before { content: '—'; color: var(--ink-4); }
.home-intro .hi-cmp.barun { background: var(--navy); color: var(--cream); box-shadow: var(--shadow-float); }
.home-intro .hi-cmp.barun h4 { color: var(--gold); }
.home-intro .hi-cmp.barun li { color: rgba(250,247,241,0.86); }
.home-intro .hi-cmp.barun li::before { content: '✓'; color: var(--gold); }
.home-intro .hi-cmp.barun li strong { color: #fff; }
@media (max-width: 760px) { .home-intro .hi-cmp-grid { grid-template-columns: 1fr; } }

/* ----- PROCESS ----- */
.home-intro .hi-process { background: var(--bg-2); }
.home-intro .hi-process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.home-intro .hi-pcard {
    background: var(--cream); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.home-intro .hi-pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.home-intro .hi-pcard-img { width: 100%; height: 200px; display: grid; place-items: center; font-size: 64px; color: rgba(0,0,0,0.4); }
.home-intro .hi-pcard-body { padding: 24px 26px 28px; }
.home-intro .hi-pcard-num { font-size: 12px; color: var(--walnut); letter-spacing: 0.1em; font-weight: 600; margin-bottom: 12px; }
.home-intro .hi-pcard-body h4 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 9px; }
.home-intro .hi-pcard-body p { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin: 0; }
@media (max-width: 900px) { .home-intro .hi-process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .home-intro .hi-process-grid { grid-template-columns: 1fr; } }

.home-intro .hi-principle {
    margin-top: 28px;
    background: var(--cream); border: 1px solid var(--line);
    border-left: 4px solid var(--walnut);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    display: flex; gap: 24px; align-items: flex-start;
    box-shadow: var(--shadow-card);
}
.home-intro .hi-principle .pic { font-size: 34px; line-height: 1; }
.home-intro .hi-principle h4 { font-size: 19px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.home-intro .hi-principle p { font-size: 15px; color: var(--ink-3); line-height: 1.7; max-width: 70ch; margin: 0; }

/* ----- SYNERGY ----- */
.home-intro .hi-syn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home-intro .hi-syn {
    background: var(--cream); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 34px 32px;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.home-intro .hi-syn:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.home-intro .hi-syn .ic {
    width: 50px; height: 50px; border-radius: 13px;
    display: grid; place-items: center; font-size: 24px;
    margin-bottom: 20px;
    background: var(--bg-2); border: 1px solid var(--line);
}
.home-intro .hi-syn h4 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.home-intro .hi-syn p { font-size: 14px; color: var(--ink-3); line-height: 1.65; margin: 0; }
.home-intro .hi-syn-sub { color: var(--ink-4); font-weight: 600; font-size: 14px; }
.home-intro .hi-syn-link {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--walnut);
    text-decoration: none;
}
.home-intro .hi-syn-link:hover { gap: 9px; }
.home-intro .hi-syn-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ink-4); letter-spacing: 0.04em; margin-bottom: 12px; }
@media (max-width: 900px) { .home-intro .hi-syn-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .home-intro .hi-syn-grid { grid-template-columns: 1fr; } }

/* ----- CTA ----- */
.home-intro .hi-cta { background: var(--navy); color: var(--cream); text-align: center; }
.home-intro .hi-cta .hi-eyebrow { justify-content: center; color: var(--gold); }
.home-intro .hi-cta .hi-eyebrow::before { background: rgba(242,194,0,0.55); }
.home-intro .hi-cta h2 { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.14; letter-spacing: -0.035em; font-weight: 700; max-width: 20ch; margin: 0 auto 40px; text-wrap: balance; }
.home-intro .hi-cta h2 em { font-style: normal; font-weight: 800; color: var(--gold); }
.home-intro .hi-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.home-intro .hi-cta .hi-btn-ghost { background: transparent; color: var(--cream); border-color: rgba(250,247,241,0.4); }
.home-intro .hi-cta .hi-btn-ghost:hover { background: rgba(250,247,241,0.1); }
.home-intro .hi-cta .hi-btn-primary { background: #fff; color: var(--ink); }

@media (max-width: 768px) {
    .home-intro .hi-container { padding: 0 22px; }
    .home-intro .hi-section { padding: 70px 0; }
}

/* ==========================================================================
   🏭 SHOP TAB (공장·공구·부품 — carcenter_program 내부 통합)
   ========================================================================== */
.shop-subtabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}
.shop-subtab {
    flex: 0 0 auto;
    padding: 0.5rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    word-break: keep-all;
    transition: all 0.2s;
}
.shop-subtab:hover { color: var(--text-main); border-color: var(--primary); }
.shop-subtab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px -2px hsla(220, 85%, 48%, 0.35);
}
.shop-content { animation: fadeIn 0.25s ease-out; }
.shop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-sm);
}
.shop-card > h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.shop-card .muted { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.shop-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.shop-card-head > div { flex: 1 1 220px; }
.shop-card-head .muted { margin-bottom: 0; }

/* 공구 부서 탭 (기능부/판금부/도장부) */
.tool-dept-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}
.tool-dept-tab {
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-app);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.tool-dept-tab:hover { color: var(--text-main); border-color: var(--primary); }
.tool-dept-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 약도 SVG */
.shop-svg {
    width: 100%;
    height: auto;
    max-height: 480px;
    display: block;
    margin: 0.5rem 0 0.85rem;
    border-radius: var(--radius-md);
}
.shop-legend { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.leg-item { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.leg-item::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.leg-blue   { background: #dbeafe; color: #1e3a8a; } .leg-blue::before   { background: #3b82f6; }
.leg-green  { background: #dcfce7; color: #14532d; } .leg-green::before  { background: #16a34a; }
.leg-orange { background: #fef3c7; color: #78350f; } .leg-orange::before { background: #d97706; }
.leg-pink   { background: #fce7f3; color: #831843; } .leg-pink::before   { background: #db2777; }
.leg-indigo { background: #e0e7ff; color: #312e81; } .leg-indigo::before { background: #4f46e5; }

/* 부서 / 팀 카드 */
.team-section { margin-top: 1.25rem; }
.team-section-head { font-size: 0.95rem; margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--border-color); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.team-card {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}
.team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; flex-wrap: wrap; }
.team-head strong { font-size: 0.95rem; color: var(--primary); }
.team-leader { font-size: 0.78rem; color: var(--text-main); font-weight: 700; }
.team-members { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.45rem; }
.member-chip { background: #fff; border: 1px solid var(--border-color); border-radius: 999px; padding: 2px 9px; font-size: 0.72rem; font-weight: 600; color: var(--text-main); }
.team-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

/* 공통 테이블 + 검색 */
.shop-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    background: var(--bg-app);
    margin-bottom: 0.85rem;
}
.shop-search:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px hsla(220, 85%, 48%, 0.12); }
.shop-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.shop-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.shop-table thead th { background: var(--bg-app); padding: 0.65rem 0.7rem; text-align: left; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.shop-table tbody td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.shop-table tbody tr:last-child td { border-bottom: none; }
.shop-table tbody tr:hover { background: hsla(220, 85%, 48%, 0.03); }
.shop-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.shop-table .mono { font-family: 'Courier New', Courier, monospace; font-size: 0.82rem; }
.shop-table .empty-row { text-align: center; padding: 2rem 0; color: var(--text-muted); }
.shop-table .row-out { background: hsla(0, 80%, 50%, 0.04); }
.shop-table .row-low { background: hsla(38, 92%, 50%, 0.05); }

.stock-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; }
.stock-pill.ok     { background: #dcfce7; color: #166534; }
.stock-pill.low    { background: #fef3c7; color: #92400e; }
.stock-pill.out    { background: #fee2e2; color: #991b1b; }
.stock-pill.broken { background: #fee2e2; color: #991b1b; }

.shop-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-app);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-main);
}

.tool-note-input { width: 100%; min-width: 120px; padding: 4px 8px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.78rem; background: #fff; }
.tool-checkout-sel { padding: 4px 6px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.78rem; background: #fff; }

/* 점호 상태 박스 */
.rollcall-status {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    background: var(--bg-app);
}
.rollcall-status.overdue { border-color: hsl(0, 80%, 60%); background: hsla(0, 80%, 50%, 0.04); }
.rollcall-status.ok { border-color: hsl(142, 60%, 45%); background: hsla(142, 60%, 50%, 0.04); }
.rollcall-stat-line { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--text-main); }
.rollcall-flag { font-weight: 800; }

/* 공장 순서 — 약도 + 카드 그리드 */
.shop-flow-map { max-height: 360px; border: 1px solid var(--border-color); background: #fff; }
.flow-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
    margin-top: 0.85rem;
}
.flow-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem;
}
.flow-card-no {
    width: 32px; height: 32px;
    background: var(--primary); color: #fff;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800; font-size: 0.9rem;
    flex: 0 0 auto;
}
.flow-card-body h5 { font-size: 0.92rem; margin: 0 0 2px; }
.flow-card-body .flow-team { font-size: 0.74rem; color: var(--primary); font-weight: 700; margin: 0; }
.flow-card-body .flow-desc { font-size: 0.74rem; color: var(--text-muted); margin: 2px 0 0; line-height: 1.45; }

/* (구) 세로 flow 스타일 — 호환 유지 */
.shop-flow { display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem; margin-top: 0.5rem; }
.flow-step {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}
.flow-step-num {
    width: 36px; height: 36px;
    background: var(--primary); color: #fff;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1rem;
    flex: 0 0 auto;
}
.flow-step-body { flex: 1 1 auto; }
.flow-step-body h5 { font-size: 0.95rem; margin: 0; }
.flow-step-body .flow-team { font-size: 0.78rem; color: var(--primary); font-weight: 700; margin: 2px 0; }
.flow-step-body .flow-desc { font-size: 0.78rem; color: var(--text-muted); }
.flow-arrow { text-align: center; color: var(--primary); font-size: 1.2rem; font-weight: 800; padding: 0.15rem 0; }

@media (max-width: 768px) {
    .shop-card { padding: 1rem 0.85rem; }
    .shop-subtab { padding: 0.45rem 0.7rem; font-size: 0.76rem; }
    .shop-table { font-size: 0.78rem; }
    .shop-table thead th, .shop-table tbody td { padding: 0.5rem 0.55rem; }
}

/* === 보험금 견적 흐름 안내 (설계사 전용) === */
.insurance-guide-card { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1px solid #bae6fd; }
.insurance-guide-head h3 { color: #075985; margin-bottom: 0.3rem; }
.insurance-guide-head p  { color: #0c4a6e; font-size: 0.85rem; margin-bottom: 1rem; }
.insurance-flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin: 0.85rem 0;
}
.insurance-flow-cell {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    display: flex; flex-direction: column; gap: 4px;
    min-width: 0;
}
.insurance-flow-cell.parts { border-left: 4px solid #f59e0b; }
.insurance-flow-cell.glass { border-left: 4px solid #06b6d4; }
.insurance-flow-cell.labor { border-left: 4px solid #8b5cf6; }
.insurance-flow-cell.total { border-left: 4px solid #16a34a; background: #f0fdf4; }
.insurance-flow-cell .cell-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 700; }
.insurance-flow-cell .cell-num   { font-size: 1.5rem; font-weight: 800; color: var(--text-main); line-height: 1.1; }
.insurance-flow-cell .cell-num small { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.insurance-flow-cell .cell-sub   { font-size: 0.72rem; color: var(--text-muted); }
.insurance-guide-foot {
    font-size: 0.82rem;
    color: #0c4a6e;
    padding: 0.65rem 0.9rem;
    background: rgba(186, 230, 253, 0.4);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

/* === 사진 서비스 어필 카드 === */
.photo-service-card { background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%); border: 1px solid #fde68a; margin-top: 1rem; }
.photo-service-card h3 { color: #854d0e; margin-bottom: 0.3rem; }
.photo-service-card p  { color: #713f12; font-size: 0.85rem; margin-bottom: 1rem; }
.photo-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin: 0.85rem 0; }
.photo-stage  { background: #fff; border: 1px solid #fde68a; border-radius: var(--radius-md); padding: 0.85rem 1rem; }
.photo-stage strong { display: block; color: #854d0e; margin-bottom: 0.4rem; font-size: 0.92rem; }
.photo-stage ul { margin: 0; padding-left: 1.2rem; font-size: 0.82rem; color: #713f12; line-height: 1.7; }
.photo-service-foot { font-size: 0.82rem; color: #713f12; padding: 0.65rem 0.9rem; background: rgba(253, 230, 138, 0.4); border-radius: var(--radius-sm); margin-top: 0.5rem; line-height: 1.6; }

/* === 예상 과실 상담 카드 === */
.fault-consult-card { background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%); border: 1px solid #f0abfc; margin-top: 1rem; }
.fault-consult-card h3 { color: #86198f; margin-bottom: 0.3rem; }
.fault-consult-card p  { color: #701a75; font-size: 0.85rem; margin-bottom: 1rem; }
.fault-consult-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* === 가입 승인 대기 패널 (회원관리 탭 상단) === */
.pending-approval-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.pending-approval-head h3 {
    font-size: 1.05rem;
    color: #78350f;
    display: flex; align-items: center; gap: 0.4rem;
    margin-bottom: 0.25rem;
}
.pending-approval-head p {
    font-size: 0.82rem;
    color: #92400e;
    margin-bottom: 0.85rem;
}
.pending-count-pill {
    background: #f59e0b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 999px;
    margin-left: 0.3rem;
}
.pending-approval-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.pending-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.pending-info strong { font-size: 0.95rem; color: var(--text-main); }
.pending-sub { font-size: 0.78rem; color: var(--text-muted); }
.pending-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .pending-row { flex-direction: column; align-items: stretch; }
    .pending-actions { justify-content: flex-end; }
}

/* === 조직도 툴바 (필터 + 회원 추가 버튼) === */
.org-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.org-crud-actions { display: flex; gap: 0.4rem; }

/* === 조직도 노드 인라인 액션 (관리자 전용) === */
.org-node-actions {
    display: flex;
    gap: 4px;
    margin-top: 0.5rem;
    justify-content: center;
}
.org-act-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}
.org-act-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.org-act-btn.org-act-del:hover { background: var(--danger); border-color: var(--danger); }
.org-node:hover .org-node-actions { opacity: 1; }
@media (min-width: 769px) {
    .org-node-actions { opacity: 0; transition: opacity 0.18s; }
}

/* ==========================================================================
   INTAKE MEDIA UPLOADER (Photos + Blackbox Video)
   ========================================================================== */
.media-uploader-box > label {
    display: block;
    font-size: 0.92rem;
    font-weight: var(--fw-bold);
    color: var(--text-main);
    margin-bottom: 0.25rem;
}
.media-uploader-box .field-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}
.media-drop-zone {
    border: 2px dashed rgba(14, 165, 233, 0.35);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.04), rgba(14, 165, 233, 0.01));
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.media-drop-zone:hover,
.media-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.07);
    transform: translateY(-1px);
}
.media-drop-zone .media-drop-icon { font-size: 1.8rem; display: block; margin-bottom: 0.25rem; }
.media-drop-zone .media-drop-title { font-size: 0.92rem; font-weight: var(--fw-semibold); color: var(--text-main); margin: 0.1rem 0; }
.media-drop-zone .media-drop-hint  { font-size: 0.74rem; color: var(--text-muted); }

.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-top: 0.85rem;
}
.media-preview-grid:empty { display: none; }

.media-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #0f172a;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.media-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.media-thumb-video {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0.5rem;
    text-align: center;
}
.media-thumb-video .media-play {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.95);
    color: #0f172a;
    display: grid; place-items: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.45);
    margin-bottom: 2px;
}
.media-thumb-video .media-name { font-size: 0.66rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.media-thumb-video .media-size { font-size: 0.6rem; opacity: 0.7; }
.media-thumb-badge {
    position: absolute;
    top: 5px; left: 5px;
    font-size: 0.6rem; font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    letter-spacing: 0.3px;
}
.media-thumb-remove {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.95);
    color: #fff; border: none;
    font-size: 1rem; line-height: 1; font-weight: 700;
    cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s;
}
.media-thumb-remove:hover { transform: scale(1.1); }
.media-thumb-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 4px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex; justify-content: space-between; align-items: center;
    gap: 4px;
}

/* ==========================================================================
   LOGIN SCREEN — Glass-card redesign (BarunBiz pattern, carcenter brand)
   ========================================================================== */
.login-screen {
    background:
        radial-gradient(at 18% 12%, rgba(56, 189, 248, 0.22), transparent 55%),
        radial-gradient(at 80% 85%, rgba(99, 102, 241, 0.18), transparent 60%),
        linear-gradient(135deg, #050b1c 0%, #0a1530 50%, #050b1c 100%);
}
.login-box {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.04);
    padding: 2rem 1.85rem;
}
.login-brand { gap: 0.55rem; }
.login-logo { font-size: 2rem; filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.45)); }
.login-title { color: #fff; letter-spacing: -0.5px; }
.login-title span { color: hsl(195, 90%, 65%); }
.login-sub {
    color: rgba(226, 232, 240, 0.65);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 0.7rem;
    margin: 0.45rem 0 1.6rem;
}
.login-field label {
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.login-field input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
}
.login-field input::placeholder { color: rgba(148, 163, 184, 0.7); }
.login-field input:focus {
    border-color: hsl(195, 90%, 60%);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.login-error {
    color: hsl(355, 90%, 80%);
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 8px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.18s, padding 0.18s, margin 0.18s;
}
.login-error:not(:empty) { padding: 0.55rem 0.75rem; margin-bottom: 0.6rem; max-height: 80px; }
.login-box .btn-primary {
    background: linear-gradient(135deg, hsl(200, 95%, 55%), hsl(220, 85%, 55%));
    border: none;
    color: #fff;
    font-weight: 800;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 26px -8px rgba(56, 189, 248, 0.55);
    transition: filter 0.15s, transform 0.05s;
}
.login-box .btn-primary:hover { filter: brightness(1.08); }
.login-box .btn-primary:active { transform: scale(0.98); }
.login-demo {
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.login-demo-title {
    color: rgba(226, 232, 240, 0.55);
    letter-spacing: 1.3px;
    text-transform: uppercase;
    font-size: 0.66rem;
}
.login-demo-btns .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(226, 232, 240, 0.92);
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.login-demo-btns .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.login-demo-hint { color: rgba(148, 163, 184, 0.85); font-size: 0.72rem; }
.login-demo-hint strong { color: hsl(195, 90%, 70%); }

/* ==========================================================================
   SIDEBAR USER CARD — Polished profile (BarunBiz pattern)
   ========================================================================== */
.login-simulator {
    padding: 0;
    background: transparent;
    border: none;
    margin: 0 0 1.25rem;
}
.current-user-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    padding: 0.85rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.current-user-card .avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(200, 95%, 55%), hsl(220, 85%, 55%));
    color: #fff;
    display: grid; place-items: center;
    font-size: 1.05rem;
    font-weight: 800;
    flex: 0 0 40px;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}
.current-user-card .info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}
.current-user-card .name {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    flex-wrap: wrap;
}
.current-user-card .name .grade-chip {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: hsl(45, 95%, 75%);
    border: 1px solid rgba(250, 204, 21, 0.32);
    letter-spacing: 0.3px;
}
.current-user-card .role-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    width: fit-content;
    margin: 0;
    background: rgba(56, 189, 248, 0.16);
    color: hsl(195, 90%, 75%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    letter-spacing: 0.2px;
}
.current-user-card .role-badge.BARUN_BIZ,
.current-user-card .role-badge.AGENT {
    background: rgba(56, 189, 248, 0.16);
    color: hsl(195, 90%, 78%);
    border-color: rgba(56, 189, 248, 0.3);
}
.current-user-card .role-badge.OHPRO,
.current-user-card .role-badge.DETAILER {
    background: rgba(250, 204, 21, 0.14);
    color: hsl(45, 95%, 75%);
    border-color: rgba(250, 204, 21, 0.28);
}
.current-user-card .role-badge.GARAGE,
.current-user-card .role-badge.MECHANIC {
    background: rgba(34, 197, 94, 0.14);
    color: hsl(142, 75%, 75%);
    border-color: rgba(34, 197, 94, 0.28);
}
.current-user-card .role-badge.ADMIN {
    background: rgba(168, 85, 247, 0.16);
    color: hsl(280, 90%, 80%);
    border-color: rgba(168, 85, 247, 0.3);
}
.current-user-card .title {
    color: rgba(203, 213, 225, 0.65);
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar logout button (under the user card) */
#logout-btn {
    margin-top: 0.5rem !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(226, 232, 240, 0.85);
    font-weight: 700;
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
    transition: background 0.15s;
}
#logout-btn:hover {
    background: rgba(244, 63, 94, 0.18);
    border-color: rgba(244, 63, 94, 0.35);
    color: hsl(355, 90%, 88%);
}
