/* CompAxes — Admin styles (on top of shared axes-theme.css) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #EDEAE2;
    --surface: #FFFFFF;
    --border: #E2DFD6;
    --border-focus: #C8271A;
    --text-primary: #1A1816;
    --text-secondary: #5C5850;
    --text-muted: #9C9890;
    --accent: #C8271A;
    --accent-dark: #9E1F14;
    --accent-bg: #FBF0EF;
    --success-bg: #EEF8F2;
    --success-text: #1A6E40;
    --warning-bg: #FEF9EC;
    --warning-text: #8A5A00;
    --radius: 14px;
    --radius-sm: 9px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 20px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #F0EDE3 0%, #E8E4D8 100%) !important;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}
html.hub-mode.dark-theme body,
.hub-mode.dark-theme body {
    background: linear-gradient(180deg, #1A1816 0%, #0F0E0D 100%) !important;
}

/* ── Header ───────────────────────────────────────── */
.site-header {
    background: #1A1816;
    position: sticky; top: 0; z-index: 100;
}
.site-header-inner {
    max-width: 100%; margin: 0;
    padding: 0 48px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo-wrap {
    font-size: 16px; font-weight: 800; letter-spacing: 2px;
    color: #FFFFFF;
    padding: 6px 10px; border-radius: 6px;
    background: var(--accent);
}
.header-badge {
    font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: rgba(255,255,255,0.42);
}

/* ── Page ─────────────────────────────────────────── */
.page-wrapper {
    max-width: 100%; margin: 0; padding: 48px 48px 80px;
}
.hero-wrap {
    display: flex; justify-content: space-between; align-items: center;
    gap: 28px; margin-bottom: 32px; flex-wrap: wrap;
    background: var(--surface);
    border: none;
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.02);
}
.hero { flex: 1; min-width: 260px; }
.hero-cta {
    padding: 14px 28px !important; font-size: 15px;
    white-space: nowrap; flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(200,39,26,0.22);
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(200,39,26,0.28); }
.hero-eyebrow {
    font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.hero-name {
    font-size: 34px; font-weight: 800; letter-spacing: -0.8px;
    color: var(--text-primary); line-height: 1.1; margin-bottom: 6px;
}
.hero-subtitle { font-size: 14px; color: var(--text-secondary); max-width: 700px; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border: none; border-radius: 8px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
    background: var(--surface); color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
    background: transparent; color: var(--text-secondary);
    border: 1px solid transparent;
}
.btn-ghost:hover { background: #F3F1EB; color: var(--text-primary); }
.btn-danger {
    background: transparent; color: #C41A1A;
    border: 1px solid rgba(196,26,26,0.3);
}
.btn-danger:hover { background: #FEF1F1; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Projects grid ─────────────────────────────────── */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.project-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}
.project-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--accent);
    transform: scaleY(0); transform-origin: top;
    transition: transform 0.25s;
}
.project-card:hover {
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}
.project-card:hover::before { transform: scaleY(1); }
.project-card h3 {
    font-size: 19px; font-weight: 700;
    color: var(--text-primary); margin-bottom: 6px; padding-right: 36px;
    letter-spacing: -0.3px; line-height: 1.3;
    transition: color 0.15s;
}
.project-card:hover h3 { color: var(--accent); }
.project-card .client {
    font-size: 14px; color: var(--text-secondary); margin-bottom: 18px;
    display: inline-flex; align-items: center; gap: 6px;
}
.project-card .progress-wrap {
    margin: 14px 0 10px;
    background: #F3EFE4; border-radius: 100px; overflow: hidden; height: 8px;
}
.project-card .progress-bar {
    height: 100%; background: var(--accent);
    border-radius: 100px;
    transition: width 0.4s ease;
}
.project-card .meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.project-card .meta strong { color: var(--accent); font-weight: 700; }
.project-card .delete-btn {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border: none; background: transparent;
    color: var(--text-muted); font-size: 22px; line-height: 1;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s;
}
.project-card .delete-btn:hover { background: #FEF1F1; color: #C41A1A; }

/* ── Empty state ─────────────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-secondary);
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.empty-state .empty-icon { font-size: 42px; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 6px; font-size: 18px; }
.empty-state p { margin-bottom: 18px; }

/* ── Modal ─────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 480px;
    max-height: 85vh; overflow: auto;
}
.modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close {
    background: none; border: none; font-size: 22px;
    color: var(--text-muted); cursor: pointer; line-height: 1;
    padding: 0; width: 28px; height: 28px;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 16px 24px; border-top: 1px solid var(--border);
    background: #FAFAF8;
}

/* ── Form fields ─────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 6px;
}
.field input, .field textarea, .field select {
    width: 100%; padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-family: inherit; font-size: 14px;
    background: #FAFAF8; color: var(--text-primary);
    transition: all 0.15s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200,39,26,0.1);
    background: #FFFFFF;
}

/* Dark-theme overrides for hub-mode */
html.hub-mode.dark-theme body { background: transparent; color: #E8E6E1; }
html.hub-mode.dark-theme .hero-wrap {
    background: rgba(30,30,30,0.75);
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}
html.hub-mode.dark-theme .project-card { background: rgba(30,30,30,0.75); border-color: rgba(255,255,255,0.08); }
html.hub-mode.dark-theme .project-card h3 { color: #EF4444; }
html.hub-mode.dark-theme .project-card .client,
html.hub-mode.dark-theme .hero-subtitle,
html.hub-mode.dark-theme .hero-eyebrow { color: #94a3b8; }
html.hub-mode.dark-theme .hero-name { color: #F1F5F9; }
html.hub-mode.dark-theme .empty-state { background: rgba(30,30,30,0.75); border-color: rgba(255,255,255,0.08); color: #94a3b8; }
html.hub-mode.dark-theme .empty-state h3 { color: #F1F5F9; }
html.hub-mode.dark-theme .modal { background: #1E1E1E; color: #F1F5F9; }
html.hub-mode.dark-theme .modal-head { border-bottom-color: rgba(255,255,255,0.08); }
html.hub-mode.dark-theme .modal-foot { background: rgba(0,0,0,0.2); border-top-color: rgba(255,255,255,0.08); }
html.hub-mode.dark-theme .field input,
html.hub-mode.dark-theme .field textarea {
    background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.12); color: #F1F5F9;
}
html.hub-mode.dark-theme .btn-secondary { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: #F1F5F9; }
