/* ============================================================
   PM PLATFORM — Main Stylesheet
   Font: Syne (headings) + DM Sans (body) + DM Mono (code)
   Theme: Dark industrial with electric teal accent
   ============================================================ */

:root {
    --bg-base:      #0d0f14;
    --bg-surface:   #13161e;
    --bg-elevated:  #1a1e2a;
    --bg-hover:     #1f2435;
    --border:       #252b3b;
    --border-light: #2e3650;

    --text-primary: #e8eaf2;
    --text-secondary: #8b92a8;
    --text-muted:   #545c74;

    --accent:       #00d4a0;
    --accent-dim:   rgba(0,212,160,0.12);
    --accent-hover: #00f0b8;

    --blue:         #4a9eff;
    --blue-dim:     rgba(74,158,255,0.12);
    --purple:       #9b72ff;
    --purple-dim:   rgba(155,114,255,0.12);
    --orange:       #ff8c42;
    --orange-dim:   rgba(255,140,66,0.12);
    --red:          #ff4d6d;
    --red-dim:      rgba(255,77,109,0.12);
    --yellow:       #ffd166;

    --sidebar-w:    260px;
    --topbar-h:     62px;
    --radius:       10px;
    --radius-lg:    16px;
    --radius-sm:    6px;

    --shadow:       0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg:    0 8px 48px rgba(0,0,0,0.6);
    --glow:         0 0 30px rgba(0,212,160,0.15);

    --font-head:    'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --font-mono:    'DM Mono', monospace;
    --transition:   all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-base); color: var(--text-primary); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--text-primary); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===================== LAYOUT ===================== */
.app-layout { display: flex; }

.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
}
.sidebar.collapsed { width: 70px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-label { display: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0 0; height: 48px; }

.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.brand-icon { width: 36px; height: 36px; flex-shrink: 0; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--font-head); font-size: 1.05rem; font-weight: 800; color: var(--text-primary); display: block; }
.brand-sub { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; display: block; }
.sidebar-toggle {
    margin-left: auto; background: none; border: none;
    color: var(--text-muted); font-size: 0.9rem; padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }

.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: #000; flex-shrink: 0;
}
.user-name { font-size: 0.85rem; font-weight: 600; display: block; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-section-label {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em;
    color: var(--text-muted); text-transform: uppercase;
    padding: 14px 8px 6px; margin-top: 4px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
    transition: var(--transition); margin-bottom: 2px;
    white-space: nowrap;
}
.nav-item i { width: 18px; text-align: center; font-size: 0.85rem; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-item.active i { color: var(--accent); }

/* ===================== MAIN WRAPPER ===================== */
.main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1; display: flex; flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}
.sidebar.collapsed ~ .main-wrapper { margin-left: 70px; }

/* ===================== TOP BAR ===================== */
.top-bar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-secondary); font-size: 1.1rem; padding: 6px; }
.breadcrumb { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.btn-icon {
    position: relative; background: none; border: 1px solid var(--border);
    color: var(--text-secondary); width: 36px; height: 36px;
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--red); color: white; font-size: 0.6rem;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; padding: 0 3px;
}

.product-selector select {
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-primary); padding: 6px 28px 6px 12px;
    border-radius: var(--radius-sm); font-size: 0.8rem;
    font-family: var(--font-body); cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b92a8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
    max-width: 200px;
}

.user-menu-wrap { position: relative; }
.user-menu-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-secondary); padding: 6px 12px;
    border-radius: var(--radius-sm); font-size: 0.8rem; transition: var(--transition);
}
.user-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.avatar-sm {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; color: #000;
}
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-elevated); border: 1px solid var(--border-light);
    border-radius: var(--radius); min-width: 180px;
    box-shadow: var(--shadow); display: none; z-index: 200;
    overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: var(--text-secondary); font-size: 0.875rem;
    transition: var(--transition);
}
.dropdown-menu a:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-menu a i { width: 16px; color: var(--text-muted); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ===================== PAGE CONTENT ===================== */
.page-content { padding: 28px 28px 40px; flex: 1; }

/* ===================== CARDS ===================== */
.card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.card-title { font-size: 1rem; font-weight: 700; font-family: var(--font-head); }
.card-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Stat Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--accent-color, var(--accent));
}
.stat-card.blue::before { --accent-color: var(--blue); }
.stat-card.purple::before { --accent-color: var(--purple); }
.stat-card.orange::before { --accent-color: var(--orange); }
.stat-card.red::before { --accent-color: var(--red); }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 8px; }
.stat-value { font-size: 1.9rem; font-weight: 800; font-family: var(--font-head); color: var(--text-primary); }
.stat-change { font-size: 0.75rem; color: var(--accent); margin-top: 4px; }

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 600; font-family: var(--font-body);
    border: none; cursor: pointer; transition: var(--transition);
    white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,160,0.3); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-light); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,77,109,0.2); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-ghost { background: none; color: var(--text-secondary); border: none; }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
.btn-ai {
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: #000; font-weight: 700; position: relative; overflow: hidden;
}
.btn-ai::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 60%, transparent 100%);
    transform: translateX(-100%); transition: transform 0.5s;
}
.btn-ai:hover::after { transform: translateX(100%); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; letter-spacing: 0.03em; }
.form-control {
    width: 100%; padding: 10px 14px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.875rem; font-family: var(--font-body);
    transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b92a8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* ===================== TABLES ===================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-elevated); }
th { padding: 12px 16px; text-align: left; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; font-size: 0.875rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); color: var(--text-primary); }

/* ===================== BADGES / PILLS ===================== */
.badge-pill {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.pill-green { background: rgba(0,212,160,0.12); color: var(--accent); }
.pill-blue { background: var(--blue-dim); color: var(--blue); }
.pill-purple { background: var(--purple-dim); color: var(--purple); }
.pill-orange { background: var(--orange-dim); color: var(--orange); }
.pill-red { background: var(--red-dim); color: var(--red); }
.pill-gray { background: var(--bg-hover); color: var(--text-muted); }

/* ===================== PAGE HEADERS ===================== */
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-header-title h1 { font-size: 1.6rem; font-weight: 800; }
.page-header-title p { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===================== GRID LAYOUTS ===================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ===================== AI OUTPUT ===================== */
.ai-output {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-height: 600px;
    overflow-y: auto;
}
.ai-output h1, .ai-output h2 { color: var(--text-primary); font-size: 1.1rem; margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.ai-output h3 { color: var(--accent); font-size: 0.95rem; margin: 16px 0 8px; }
.ai-output h4 { color: var(--text-primary); font-size: 0.875rem; margin: 12px 0 6px; }
.ai-output ul, .ai-output ol { padding-left: 20px; margin: 8px 0; }
.ai-output li { margin-bottom: 4px; }
.ai-output strong { color: var(--text-primary); font-weight: 600; }
.ai-output em { color: var(--accent); font-style: normal; font-weight: 500; }
.ai-output code { background: var(--bg-hover); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.ai-output blockquote { border-left: 3px solid var(--accent); padding-left: 14px; color: var(--text-muted); margin: 12px 0; }
.ai-output table { width: 100%; margin: 12px 0; }
.ai-output th { background: var(--bg-hover); }
.ai-output hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.ai-output p { margin-bottom: 10px; }

.ai-output-actions {
    display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}

/* ===================== TABS ===================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
    padding: 10px 18px; background: none; border: none;
    font-size: 0.875rem; font-weight: 600; font-family: var(--font-body);
    color: var(--text-muted); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: var(--transition);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===================== PROGRESS ===================== */
.progress { background: var(--bg-hover); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-bar {
    height: 100%; background: var(--accent);
    border-radius: 4px; transition: width 0.6s ease;
}
.progress-bar.blue { background: var(--blue); }
.progress-bar.orange { background: var(--orange); }

/* ===================== MODALS ===================== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
    z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); width: 100%;
    box-shadow: var(--shadow-lg); overflow: hidden;
    animation: modalIn 0.2s ease;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 640px; }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1100px; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 4px; transition: var(--transition); border-radius: 4px; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.modal-body { padding: 24px; max-height: 75vh; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===================== AI OVERLAY ===================== */
.ai-overlay {
    position: fixed; inset: 0;
    background: rgba(13,15,20,0.92); backdrop-filter: blur(8px);
    z-index: 3000; display: none;
    align-items: center; justify-content: center;
}
.ai-overlay.active { display: flex; }
.ai-loader { text-align: center; }
.ai-brain { width: 80px; height: 80px; margin: 0 auto 20px; animation: rotateBrain 3s linear infinite; }
@keyframes rotateBrain {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.brain-ring { animation: dashRotate 2s linear infinite; }
@keyframes dashRotate { to { stroke-dashoffset: -40; } }
.brain-pulse { animation: pulse 1.5s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.3; } to { opacity: 1; } }
.ai-loader-text { color: var(--text-primary); font-size: 1rem; font-weight: 600; font-family: var(--font-head); margin-bottom: 16px; }
.ai-progress { width: 240px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin: 0 auto; }
.ai-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--blue)); border-radius: 2px; animation: progressPulse 2s ease-in-out infinite; }
@keyframes progressPulse {
    0% { width: 10%; } 50% { width: 80%; } 100% { width: 10%; }
}

/* ===================== TOAST ===================== */
#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-light);
    border-radius: var(--radius); padding: 14px 18px;
    min-width: 280px; max-width: 420px;
    box-shadow: var(--shadow); animation: toastIn 0.3s ease;
    font-size: 0.875rem;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left: 3px solid var(--accent); }
.toast.error { border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--orange); }
.toast.info { border-left: 3px solid var(--blue); }
.toast-icon { font-size: 1rem; }
.toast.success .toast-icon { color: var(--accent); }
.toast.error .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--orange); }
.toast.info .toast-icon { color: var(--blue); }
.toast-msg { flex: 1; color: var(--text-primary); }

/* ===================== AUTH LAYOUT ===================== */
.auth-layout {
    min-height: 100vh; display: flex;
    background: var(--bg-base);
}
.auth-panel {
    width: 100%; max-width: 440px; margin: auto;
    padding: 40px 20px;
}
.auth-logo { text-align: center; margin-bottom: 36px; }
.auth-logo .brand-name { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--text-primary); display: block; }
.auth-logo .brand-sub { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; display: block; margin-top: 4px; }
.auth-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.auth-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-muted); }

/* ===================== IMPACT/EFFORT MATRIX ===================== */
.ie-matrix {
    display: grid; grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px; height: 400px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.ie-quadrant {
    padding: 16px; display: flex; flex-direction: column;
    position: relative;
}
.ie-q1 { background: rgba(0,212,160,0.08); }
.ie-q2 { background: rgba(74,158,255,0.08); }
.ie-q3 { background: rgba(255,140,66,0.08); }
.ie-q4 { background: rgba(255,77,109,0.08); }
.ie-quadrant-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.ie-q1 .ie-quadrant-label { color: var(--accent); }
.ie-q2 .ie-quadrant-label { color: var(--blue); }
.ie-q3 .ie-quadrant-label { color: var(--orange); }
.ie-q4 .ie-quadrant-label { color: var(--red); }
.ie-item {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 6px; padding: 8px 10px;
    font-size: 0.75rem; margin-bottom: 6px; cursor: pointer;
    transition: var(--transition);
}
.ie-item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* ===================== KANBAN ===================== */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col {
    min-width: 240px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px; flex-shrink: 0;
}
.kanban-col-header { font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.kanban-count { background: var(--bg-hover); border-radius: 20px; padding: 2px 8px; font-size: 0.7rem; color: var(--text-muted); }
.kanban-item {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
    margin-bottom: 8px; cursor: grab; font-size: 0.8rem;
    transition: var(--transition);
}
.kanban-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.kanban-item-title { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.kanban-item-meta { display: flex; justify-content: space-between; align-items: center; }

/* ===================== ROADMAP GANTT ===================== */
.gantt-wrap { overflow-x: auto; }
.gantt-bar {
    height: 32px; border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--blue));
    display: flex; align-items: center; padding: 0 12px;
    font-size: 0.75rem; font-weight: 600; color: #000;
    cursor: pointer; transition: var(--transition);
}
.gantt-bar:hover { opacity: 0.85; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-wrapper { margin-left: 0 !important; }
    .mobile-menu-btn { display: block; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .tabs { overflow-x: auto; }
}