/* ZENI SHELF — Premium Light Mode Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #F8F9FB;
    --surface: #FFFFFF;
    --surface-2: #F1F3F5;
    --border: #E5E7EB;
    --border-2: #D1D5DB;
    --text: #111827;
    --text-2: #374151;
    --text-3: #6B7280;
    --text-4: #9CA3AF;
    --primary: #2563EB;
    --primary-light: #EFF6FF;
    --green: #059669;
    --green-light: #ECFDF5;
    --red: #DC2626;
    --red-light: #FEF2F2;
    --gold: #D97706;
    --gold-light: #FEF3C7;
    --purple: #7C3AED;
    --purple-light: #F5F3FF;
    --cyan: #0891B2;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
}

.nav-section {
    padding: 10px 16px 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-4);
    text-transform: uppercase;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-3);
    text-align: left;
    border-radius: 0;
    transition: all 0.15s;
    font-family: inherit;
}

.nav-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav-btn.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.main-area {
    flex: 1;
    overflow-y: auto;
    max-height: 100vh;
    min-width: 0;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.15s;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.15s;
}

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

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.showcase-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s;
}

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

.showcase-card .card-body {
    padding: 18px;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-active {
    background: #ECFDF5;
    color: #059669;
}

.badge-prototype {
    background: #F5F3FF;
    color: #7C3AED;
}

.badge-concept {
    background: #EFF6FF;
    color: #2563EB;
}

.badge-retired {
    background: #FEF2F2;
    color: #DC2626;
}

.badge-future {
    background: #ECFEFF;
    color: #0891B2;
}

.badge-internal {
    background: #F1F3F5;
    color: #6B7280;
}

.badge-brand {
    background: #FDF2F8;
    color: #DB2777;
}

.priority-vh {
    color: #DC2626;
}

.priority-h {
    color: #D97706;
}

.priority-m {
    color: #2563EB;
}

.priority-l {
    color: #6B7280;
}

/* Forms */
.input {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    width: 100%;
    transition: border-color 0.15s;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.field-label {
    font-size: 11px;
    color: var(--text-3);
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    background: var(--surface);
    color: var(--text-2);
}

.btn:hover {
    background: var(--surface-2);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #1D4ED8;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--surface-2);
}

.btn-gold {
    background: var(--gold-light);
    color: var(--gold);
    border-color: var(--gold);
}

.btn-danger {
    background: var(--red-light);
    color: var(--red);
    border-color: var(--red);
}

.btn-success {
    background: var(--green-light);
    color: var(--green);
    border-color: var(--green);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    background: var(--surface);
    border-radius: 18px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s ease;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-3);
    padding: 4px;
}

@keyframes slideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Progress */
.progress-bar {
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Tabs */
.tab-btn {
    padding: 10px 18px;
    border: none;
    background: none;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-3);
    font-family: inherit;
    transition: all 0.15s;
}

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

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

/* Stage badges */
.stage-lead {
    background: #EFF6FF;
    color: #2563EB;
}

.stage-proposal {
    background: #FEF3C7;
    color: #D97706;
}

.stage-negotiation {
    background: #F5F3FF;
    color: #7C3AED;
}

.stage-won {
    background: #ECFDF5;
    color: #059669;
}

.stage-lost {
    background: #FEF2F2;
    color: #DC2626;
}

/* Deal row */
.deal-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

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

/* Chart bar */
.chart-bar {
    border-radius: 4px 4px 0 0;
    transition: height 0.4s ease, background 0.2s;
    cursor: pointer;
    position: relative;
    min-width: 20px;
}

.chart-bar:hover {
    opacity: 0.85;
}

.chart-bar-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

/* Gantt */
.gantt-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    min-height: 40px;
}

.gantt-label {
    width: 240px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
}

.gantt-bar-area {
    flex: 1;
    position: relative;
    height: 40px;
    padding: 6px 4px;
}

.gantt-bar {
    position: absolute;
    height: 24px;
    border-radius: 6px;
    top: 8px;
    font-size: 10px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: white;
    font-weight: 600;
    min-width: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.gantt-bar.todo {
    background: var(--primary);
}

.gantt-bar.in_progress {
    background: var(--gold);
}

.gantt-bar.done {
    background: var(--green);
}

.gantt-milestone {
    position: absolute;
    top: 8px;
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
    border-radius: 3px;
    cursor: pointer;
}

/* Task Board */
.task-col {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 12px;
    min-height: 200px;
}

.col-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

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

/* Site thumbnails */
.site-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--surface-2);
    position: relative;
}

.site-thumb iframe {
    width: 200%;
    height: 200%;
    transform: scale(0.5);
    transform-origin: top left;
    pointer-events: none;
    border: none;
}

.site-thumb-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s;
}

.site-thumb-overlay:hover {
    background: rgba(37, 99, 235, 0.08);
}

/* Loading spinner */
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-4);
}