/* ============================================================
   MTN IQ — MTN Investment Intelligence Platform
   Stylesheet v1.0
   ============================================================ */

:root {
    --mtn-yellow:   #FFCB05;
    --mtn-dark:     #1A1A1A;
    --mtn-blue:     #1B4F8A;
    --mtn-blue-lt:  #2563EB;
    --sidebar-w:    260px;
    --topbar-h:     60px;
    --body-bg:      #F4F6F9;
    --card-bg:      #FFFFFF;
    --border:       #E5E7EB;
    --text-main:    #111827;
    --text-muted:   #6B7280;
    --radius:       10px;
    --shadow:       0 1px 4px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--body-bg);
    color: var(--text-main);
    font-size: 14px;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--mtn-dark);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}
.brand-mtn  { color: var(--mtn-yellow); }
.brand-iq   { color: #FFFFFF; }
.brand-sub  {
    display: block;
    color: rgba(255,255,255,.45);
    font-size: 11px;
    margin-top: 4px;
    letter-spacing: .5px;
}

.sidebar-nav { flex: 1; padding: 12px 12px 0; }

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    padding: 8px 8px 4px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 7px;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--mtn-yellow); color: var(--mtn-dark); font-weight: 700; }
.nav-item i { font-size: 16px; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--mtn-yellow);
    color: var(--mtn-dark);
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.user-name  { color: #fff; font-weight: 600; font-size: 13px; }
.user-role  { color: rgba(255,255,255,.45); font-size: 11px; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-h);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text-main); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page-body { padding: 24px; flex: 1; }

/* ── CARDS / PANELS ───────────────────────────────────────── */
.card-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-title { font-weight: 700; font-size: 14px; color: var(--text-main); }

/* ── STAT CARDS ───────────────────────────────────────────── */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-main); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── KPI CARDS ────────────────────────────────────────────── */
.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--kpi-color, var(--mtn-yellow));
}
.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.kpi-value { font-size: 30px; font-weight: 800; color: var(--text-main); margin: 6px 0 2px; line-height: 1; }
.kpi-sub   { font-size: 12px; color: var(--text-muted); }
.kpi-icon  { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 36px; opacity: .08; }

/* ── TEMPLATE BADGES ──────────────────────────────────────── */
.template-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--tc) 12%, transparent);
    color: var(--tc);
    border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent);
}

/* ── QUICK ACTION BUTTONS ─────────────────────────────────── */
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: all .15s;
    font-size: 13px;
}
.quick-action-btn:hover {
    border-color: var(--mtn-yellow);
    background: rgba(255,203,5,.06);
    color: var(--text-main);
}
.quick-action-btn i:first-child { font-size: 18px; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; opacity: .3; display: block; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }

/* ── BTN MTN ──────────────────────────────────────────────── */
.btn-mtn {
    background: var(--mtn-yellow);
    color: var(--mtn-dark);
    border: none;
    font-weight: 700;
}
.btn-mtn:hover { background: #e6b800; color: var(--mtn-dark); }

/* ── TABLES ───────────────────────────────────────────────── */
.table th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    background: var(--body-bg);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
}
.table td { padding: 12px 16px; vertical-align: middle; border-color: var(--border); }
.table tbody tr:hover { background: rgba(255,203,5,.04); }

/* ── TABS ─────────────────────────────────────────────────── */
.nav-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
}
.nav-tabs .nav-link.active {
    color: var(--mtn-blue);
    border-bottom-color: var(--mtn-blue);
    background: transparent;
}
.nav-tabs { border-bottom: 1px solid var(--border); }
.tab-content { padding: 20px 0; }

/* ── FORMS ────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    padding: 8px 12px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--mtn-yellow);
    box-shadow: 0 0 0 3px rgba(255,203,5,.15);
}
.form-text { font-size: 11px; color: var(--text-muted); }
.input-group-text { background: var(--body-bg); border-color: var(--border); font-weight: 600; }

/* ── WIZARD STEPS ─────────────────────────────────────────── */
.wizard-steps {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    gap: 0;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.wizard-step-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    background: var(--border); color: var(--text-muted);
    flex-shrink: 0;
}
.wizard-step.active   .wizard-step-num { background: var(--mtn-yellow); color: var(--mtn-dark); }
.wizard-step.done     .wizard-step-num { background: #10b981; color: #fff; }
.wizard-step-label { font-weight: 600; font-size: 13px; color: var(--text-muted); }
.wizard-step.active .wizard-step-label { color: var(--text-main); }
.wizard-connector { flex: 1; height: 2px; background: var(--border); margin: 0 8px; max-width: 60px; }

/* ── TEMPLATE SELECT CARDS ────────────────────────────────── */
.template-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.template-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
    background: var(--card-bg);
}
.template-card:hover { border-color: var(--mtn-yellow); box-shadow: var(--shadow-md); }
.template-card.selected { border-color: var(--mtn-yellow); background: rgba(255,203,5,.06); }
.template-card i { font-size: 32px; margin-bottom: 10px; display: block; }
.template-card strong { font-size: 13px; display: block; }
.template-card small { color: var(--text-muted); font-size: 11px; }

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-body { background: var(--body-bg); min-height: 100vh; display: flex; }
.login-wrapper { display: flex; min-height: 100vh; width: 100%; }

.login-left {
    width: 420px;
    background: var(--mtn-dark);
    display: flex;
    flex-direction: column;
    padding: 48px 40px;
    flex-shrink: 0;
}
.login-logo { font-size: 40px; font-weight: 900; letter-spacing: -2px; }
.brand-iq-dark { color: #FFFFFF; }
.login-tagline { color: rgba(255,255,255,.5); font-size: 13px; margin-top: 8px; }

.login-features { flex: 1; margin-top: 48px; display: flex; flex-direction: column; gap: 24px; }
.login-feature { display: flex; gap: 16px; align-items: flex-start; }
.login-feature i { font-size: 24px; color: var(--mtn-yellow); flex-shrink: 0; margin-top: 2px; }
.login-feature strong { display: block; color: #fff; font-size: 14px; margin-bottom: 3px; }
.login-feature p { color: rgba(255,255,255,.45); font-size: 12px; margin: 0; }
.login-footer-text { color: rgba(255,255,255,.25); font-size: 11px; margin-top: 32px; }

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.login-card { width: 100%; max-width: 400px; }
.login-title { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.login-subtitle { color: var(--text-muted); margin-bottom: 28px; }
.login-card-footer { text-align: center; margin-top: 24px; }

/* ── REPORT PAGES ─────────────────────────────────────────── */
.report-body { font-family: 'Segoe UI', Arial, sans-serif; background: #fff; color: #111; }
.report-header {
    background: var(--mtn-dark);
    color: #fff;
    padding: 32px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.report-logo { font-size: 32px; font-weight: 900; }
.report-logo span { color: var(--mtn-yellow); }
.report-body-content { padding: 40px 48px; max-width: 1100px; margin: 0 auto; }

.metric-box {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.metric-box .label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; }
.metric-box .value { font-size: 28px; font-weight: 800; margin: 6px 0; }
.metric-box.positive .value { color: #10b981; }
.metric-box.highlight { background: var(--mtn-yellow); border-color: var(--mtn-yellow); }
.metric-box.highlight .label { color: rgba(0,0,0,.5); }
.metric-box.highlight .value { color: #000; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; }
}

/* ── MISC ─────────────────────────────────────────────────── */
.text-mtn  { color: var(--mtn-yellow) !important; }
.bg-mtn    { background: var(--mtn-yellow) !important; }
.border-mtn{ border-color: var(--mtn-yellow) !important; }

.badge { font-weight: 600; font-size: 11px; }

.section-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .login-left { display: none; }
}
