@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

/* ===== LOGIN SCREEN ===== */
#login-screen {
    position: fixed; inset: 0; z-index: 10000;
    background: linear-gradient(135deg, #01295e 0%, #01377d 30%, #2276d3 70%, #9ac4fc 100%);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
#login-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.login-container { width: 100%; max-width: 420px; padding: 20px; }

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px 40px 36px;
    box-shadow: 0 20px 60px rgba(1,41,94,0.3), 0 0 0 1px rgba(255,255,255,0.1);
    text-align: center;
    animation: loginSlideUp 0.6s ease;
}
@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo { height: 48px; margin-bottom: 24px; }

.login-title {
    font-size: 1.4rem; font-weight: 700; color: #01377d;
    margin-bottom: 6px;
}
.login-subtitle {
    font-size: 0.85rem; color: #8892ab; margin-bottom: 32px;
}

.login-field { text-align: left; margin-bottom: 20px; }
.login-field label {
    display: block; font-size: 0.75rem; font-weight: 600;
    color: #4a5578; margin-bottom: 6px; letter-spacing: 0.3px;
}
.login-field label i { color: #2276d3; margin-right: 4px; }
.login-field input {
    width: 100%; padding: 12px 16px;
    background: #f7f8fc;
    border: 1.5px solid #e2e6ef;
    border-radius: 10px;
    font-size: 0.9rem; font-family: 'Inter', sans-serif;
    color: #1a2340;
    transition: all 0.2s;
    outline: none;
}
.login-field input:focus {
    border-color: #2276d3;
    box-shadow: 0 0 0 3px rgba(34,118,211,0.12);
    background: #ffffff;
}
.login-field input::placeholder { color: #b0b8cc; }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.toggle-password {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #8892ab; cursor: pointer;
    font-size: 0.9rem; transition: color 0.2s;
}
.toggle-password:hover { color: #2276d3; }

.login-error {
    background: rgba(249,124,75,0.08);
    border: 1px solid rgba(249,124,75,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.8rem; color: #e05a2b;
    display: flex; align-items: center; gap: 8px;
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.login-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #01377d, #2276d3);
    color: white; border: none;
    border-radius: 10px;
    font-size: 0.95rem; font-weight: 600; font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.login-btn:hover { background: linear-gradient(135deg, #01295e, #01377d); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(1,55,125,0.25); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.login-footer {
    margin-top: 24px;
    font-size: 0.7rem;
    color: #8892ab;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.login-footer i { color: #2276d3; }

@media (max-width: 500px) {
    .login-card { padding: 36px 24px 28px; }
    .login-container { padding: 16px; }
}

:root {
    /* DoubleX Brand Colors - Primary */
    --blue-darkest: #01295e;
    --blue-dark: #01377d;
    --blue: #2276d3;
    --blue-light: #9ac4fc;
    --blue-lightest: #dbeafe;

    /* DoubleX Brand Colors - Secondary */
    --teal: #59fcd2;
    --teal-bg: rgba(89,252,210,0.12);
    --teal-dark: #2dd4a8;
    --orange: #f97c4b;
    --orange-bg: rgba(249,124,75,0.12);
    --gray: #999999;
    --gray-light: #f2f2f2;

    /* Light Theme */
    --bg-body: #f7f8fc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f0f3f9;
    --bg-hover: #e8ecf5;
    --border: #e2e6ef;
    --border-light: #d0d5e3;
    --text: #1a2340;
    --text-secondary: #4a5578;
    --text-muted: #8892ab;

    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 1px 3px rgba(1,55,125,0.06), 0 1px 2px rgba(1,55,125,0.04);
    --shadow-md: 0 4px 12px rgba(1,55,125,0.08);
    --shadow-lg: 0 8px 32px rgba(1,55,125,0.12);
    --sidebar-width: 260px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
#loader {
    position: fixed; inset: 0; z-index: 9999;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s, visibility 0.6s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { text-align: center; }
.loader-ring {
    width: 48px; height: 48px;
    border: 3px solid var(--blue-lightest);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
.loader-logo { height: 48px; display: block; margin: 0 auto 12px; }
.loader-sub { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; }

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

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--shadow);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.brand-logo { height: 36px; }

.sidebar-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
    font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 1.5px; padding: 16px 16px 6px; font-weight: 600;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border: none; background: none;
    color: var(--text-secondary); border-radius: 10px;
    cursor: pointer; font-size: 0.85rem; font-family: inherit;
    transition: var(--transition); position: relative;
    text-align: left; width: 100%;
}
.nav-item i { width: 20px; text-align: center; font-size: 0.9rem; }
.nav-item:hover { background: var(--bg-elevated); color: var(--text); }
.nav-item.active { background: rgba(34,118,211,0.1); color: var(--blue); }
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 24px; background: var(--blue); border-radius: 0 4px 4px 0;
}
.nav-item span:first-of-type { flex: 1; }
.nav-badge {
    background: var(--blue); color: white;
    font-size: 0.6rem; padding: 2px 8px;
    border-radius: 10px; font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px; border-top: 1px solid var(--border);
    font-size: 0.7rem; color: var(--text-muted); text-align: center;
}
.footer-logo { height: 24px; margin-bottom: 6px; opacity: 0.6; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; transition: margin 0.3s; }

/* ===== HEADER ===== */
header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247,248,252,0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex; justify-content: space-between; align-items: center;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.mobile-menu { display: none; background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.2rem; }
header h1 { font-size: 1.3rem; font-weight: 600; color: var(--blue-dark); }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-status {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px; background: var(--bg-elevated);
    border-radius: 20px; font-size: 0.8rem; color: var(--text-secondary);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-dark); }
.status-dot.pulse { animation: pulse-dot 2s infinite; }
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45,212,168,0.4); }
    50% { box-shadow: 0 0 0 6px transparent; }
}
.btn-export {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 18px; background: var(--blue);
    color: white; border: none;
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.85rem; font-family: inherit; transition: var(--transition);
}
.btn-export:hover { background: var(--blue-dark); }

/* ===== MAIN ===== */
main { padding: 28px 32px; max-width: 1400px; }
.section { display: none; }
.section.active { display: block; animation: fadeInUp 0.4s ease; }

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

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== CARD ===== */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
    transition: var(--transition); box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-light); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-size: 1rem; font-weight: 600; color: var(--blue-dark); display: flex; align-items: center; gap: 8px; }
.card-badge {
    font-size: 0.7rem; padding: 4px 12px; border-radius: 20px; font-weight: 600;
}
.card-badge.blue { background: rgba(34,118,211,0.1); color: var(--blue); }
.card-badge.teal { background: var(--teal-bg); color: var(--teal-dark); }
.card-badge.orange { background: var(--orange-bg); color: var(--orange); }

.section-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-top: -8px; margin-bottom: 20px; }

/* Icon colors */
.icon-primary { color: var(--blue); }
.icon-teal { color: var(--teal-dark); }
.icon-blue { color: var(--blue); }
.icon-dark-blue { color: var(--blue-dark); }
.icon-orange { color: var(--orange); }
.icon-gray { color: var(--gray); }

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ===== KPI CARDS ===== */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 24px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: var(--transition); position: relative; overflow: hidden;
    box-shadow: var(--shadow);
}
.kpi-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    opacity: 0; transition: opacity 0.3s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-card:hover::before { opacity: 1; }
.kpi-card.highlight::before { background: linear-gradient(90deg, var(--teal-dark), var(--teal)); opacity: 1; }

.kpi-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1.2rem;
}
.kpi-icon.blue { background: rgba(34,118,211,0.1); color: var(--blue); }
.kpi-icon.dark-blue { background: rgba(1,55,125,0.1); color: var(--blue-dark); }
.kpi-icon.teal { background: var(--teal-bg); color: var(--teal-dark); }
.kpi-icon.orange { background: var(--orange-bg); color: var(--orange); }
.kpi-icon.gray { background: rgba(153,153,153,0.1); color: var(--gray); }

.kpi-info { flex: 1; min-width: 0; }
.kpi-label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value-row { display: flex; align-items: baseline; gap: 4px; }
.kpi-value { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--blue-dark); }
.kpi-value.teal { color: var(--teal-dark); }
.kpi-unit { font-size: 0.8rem; color: var(--text-muted); }
.kpi-mini-bar { height: 4px; background: var(--bg-elevated); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.kpi-mini-fill { height: 100%; border-radius: 2px; width: 0; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.kpi-mini-fill.blue { background: var(--blue); }
.kpi-mini-fill.teal { background: var(--teal-dark); }
.kpi-mini-fill.orange { background: var(--orange); }
.kpi-mini-fill.dark-blue { background: var(--blue-dark); }

/* ===== HERO BANNER ===== */
.hero-banner {
    background: linear-gradient(135deg, rgba(34,118,211,0.06), rgba(89,252,210,0.06));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 40px; margin-bottom: 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
    position: relative; overflow: hidden;
}
.hero-banner::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue-dark), var(--blue), var(--teal));
}
.hero-content { flex: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.7rem; padding: 4px 14px; border-radius: 20px;
    background: rgba(34,118,211,0.1); color: var(--blue);
    font-weight: 600; letter-spacing: 0.5px; margin-bottom: 16px;
}
.hero-content h2 {
    font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px;
    color: var(--blue-dark);
}
.hero-content p { color: var(--text-secondary); font-size: 0.9rem; max-width: 600px; }
.hero-visual { flex-shrink: 0; }
.hero-logo-img { height: 80px; animation: float 6s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===== VISION BOX ===== */
.vision-box {
    padding: 20px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin-bottom: 20px; border-left: 3px solid var(--blue);
}
.vision-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; font-style: italic; }
.vision-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.vision-pillar {
    text-align: center; padding: 16px 12px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); transition: var(--transition);
}
.vision-pillar:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.vision-pillar i { font-size: 1.5rem; color: var(--blue); margin-bottom: 8px; display: block; }
.vision-pillar span { font-size: 0.8rem; font-weight: 600; color: var(--blue-dark); }

/* ===== AI AREAS ===== */
.ai-areas-list { display: flex; flex-direction: column; gap: 12px; }
.ai-area-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.ai-area-item:hover { border-color: var(--blue); transform: translateX(4px); }
.ai-area-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(34,118,211,0.1); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.ai-area-item strong { font-size: 0.85rem; display: block; margin-bottom: 2px; color: var(--blue-dark); }
.ai-area-item p { font-size: 0.75rem; color: var(--text-secondary); }

/* ===== MATURITY SCALE ===== */
.maturity-scale { display: flex; flex-direction: column; gap: 12px; }
.maturity-level {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 20px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.maturity-level:hover { border-color: var(--blue-light); transform: translateX(4px); }
.maturity-num {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; flex-shrink: 0; color: white;
}
.maturity-num.level-1 { background: var(--orange); }
.maturity-num.level-2 { background: #e8a04c; }
.maturity-num.level-3 { background: var(--blue); }
.maturity-num.level-4 { background: var(--blue-dark); }
.maturity-num.level-5 { background: var(--teal-dark); }
.maturity-info { flex: 1; }
.maturity-info strong { font-size: 0.9rem; display: block; margin-bottom: 2px; color: var(--blue-dark); }
.maturity-info p { font-size: 0.75rem; color: var(--text-secondary); }
.maturity-bar {
    width: 120px; height: 6px; background: var(--bg-elevated);
    border-radius: 3px; overflow: hidden; flex-shrink: 0;
    border: 1px solid var(--border);
}
.maturity-fill { height: 100%; border-radius: 3px; }

/* ===== DEPARTMENT CARDS ===== */
.filter-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn {
    padding: 8px 18px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 20px;
    color: var(--text-secondary); cursor: pointer;
    font-size: 0.8rem; font-family: inherit; transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: rgba(34,118,211,0.1); border-color: var(--blue); color: var(--blue); }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-bottom: 20px; }
.dept-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    transition: var(--transition); position: relative; overflow: hidden;
    box-shadow: var(--shadow);
}
.dept-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    transform: scaleX(0); transition: transform 0.3s ease;
}
.dept-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.dept-card:hover::after { transform: scaleX(1); }
.dept-card.hidden { display: none; }

.dept-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dept-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.dept-icon.blue { background: rgba(34,118,211,0.1); color: var(--blue); }
.dept-icon.dark-blue { background: rgba(1,55,125,0.1); color: var(--blue-dark); }
.dept-icon.orange { background: var(--orange-bg); color: var(--orange); }
.dept-icon.teal { background: var(--teal-bg); color: var(--teal-dark); }
.dept-icon.gray { background: rgba(153,153,153,0.1); color: var(--gray); }

.dept-level-badge { font-size: 0.7rem; padding: 4px 12px; border-radius: 20px; font-weight: 700; }
.dept-level-badge.level-1 { background: var(--orange-bg); color: var(--orange); }
.dept-level-badge.level-2 { background: rgba(232,160,76,0.12); color: #c78030; }
.dept-level-badge.level-3 { background: rgba(34,118,211,0.1); color: var(--blue); }
.dept-level-badge.level-4 { background: rgba(1,55,125,0.1); color: var(--blue-dark); }
.dept-level-badge.level-5 { background: var(--teal-bg); color: var(--teal-dark); }

.dept-card h4 { font-size: 1rem; margin-bottom: 6px; color: var(--blue-dark); }
.dept-card > p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 14px; }

.dept-maturity-bar { height: 6px; background: var(--bg-elevated); border-radius: 3px; margin-bottom: 16px; overflow: hidden; border: 1px solid var(--border); }
.dept-maturity-fill { height: 100%; border-radius: 3px; }

/* AI Section in dept cards */
.dept-ai-section { margin-bottom: 14px; padding: 14px; background: var(--bg-elevated); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.dept-ai-title { font-size: 0.75rem; font-weight: 700; color: var(--blue); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.dept-ai-current, .dept-ai-potential { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ai-tag {
    font-size: 0.65rem; padding: 3px 10px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 4px; font-weight: 500;
}
.ai-tag.current { background: var(--teal-bg); color: var(--teal-dark); }
.ai-tag.potential { background: rgba(34,118,211,0.08); color: var(--blue); border: 1px dashed rgba(34,118,211,0.3); }
.ai-tag.none { background: var(--orange-bg); color: var(--orange); }

.dept-stats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dept-stat {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.78rem; padding: 4px 0;
    border-bottom: 1px solid var(--border);
}
.dept-stat:last-child { border-bottom: none; }
.dept-stat-label { color: var(--text-secondary); }
.dept-stat-value { font-weight: 600; color: var(--text); }
.dept-stat-value.good { color: var(--teal-dark); }
.dept-stat-value.warning { color: var(--orange); }
.dept-stat-value.critical { color: #d63031; }

.dept-detail-btn {
    width: 100%; padding: 10px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--blue); cursor: pointer; font-size: 0.82rem;
    font-family: inherit; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.dept-detail-btn:hover { background: rgba(34,118,211,0.1); border-color: var(--blue); }

/* ===== DEPT DETAIL PANEL ===== */
.close-detail { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; transition: var(--transition); }
.close-detail:hover { color: var(--text); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-metric { padding: 16px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.detail-metric h5 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.detail-metric .value { font-size: 1.5rem; font-weight: 800; }
.detail-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.detail-list li {
    font-size: 0.82rem; color: var(--text-secondary);
    padding: 8px 12px; background: var(--bg-elevated);
    border-radius: 6px; display: flex; align-items: center; gap: 8px;
}

/* ===== SCORE HERO ===== */
.score-hero {
    background: linear-gradient(135deg, rgba(34,118,211,0.04), rgba(89,252,210,0.04));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 40px; margin-bottom: 24px; box-shadow: var(--shadow);
}
.score-circle-container { display: flex; align-items: center; gap: 40px; justify-content: center; flex-wrap: wrap; }
.score-circle { position: relative; width: 180px; height: 180px; }
.score-circle svg { width: 100%; height: 100%; }
.score-text {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-value { font-size: 2.5rem; font-weight: 800; color: var(--blue-dark); }
.score-label { font-size: 0.8rem; color: var(--text-muted); }
.score-classification { max-width: 400px; }
.score-class-badge {
    display: inline-block; font-size: 0.7rem; padding: 6px 16px;
    border-radius: 20px; font-weight: 700; letter-spacing: 1px; margin-bottom: 12px;
}
.score-class-badge.emergente { background: rgba(232,160,76,0.12); color: #c78030; }
.score-class-badge.pronto { background: rgba(34,118,211,0.1); color: var(--blue); }
.score-class-badge.ativo { background: var(--teal-bg); color: var(--teal-dark); }
.score-classification p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== TABLES ===== */
.styled-table { width: 100%; border-collapse: collapse; }
.styled-table th, .styled-table td {
    padding: 12px 14px; text-align: left;
    border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.styled-table th {
    color: var(--text-muted); font-weight: 500;
    text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.5px;
    background: var(--bg-elevated);
}
.styled-table tr:hover td { background: rgba(34,118,211,0.02); }
.styled-table tr.total td { border-top: 2px solid var(--blue-light); border-bottom: none; font-weight: 600; }
.table-badge { font-size: 0.65rem; padding: 3px 10px; border-radius: 6px; font-weight: 600; display: inline-block; }
.table-badge.good-badge { background: var(--teal-bg); color: var(--teal-dark); }
.table-badge.warning-badge { background: var(--orange-bg); color: var(--orange); }
.table-badge.critical-badge { background: rgba(214,48,49,0.1); color: #d63031; }
.table-badge.active-ai { background: rgba(34,118,211,0.1); color: var(--blue); }
.table-badge.no-ai { background: rgba(153,153,153,0.1); color: var(--gray); }

/* ===== INSIGHTS ===== */
.insights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.insight-card {
    padding: 20px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.insight-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.insight-card.quickwin { border-left: 3px solid var(--teal-dark); }
.insight-dept-tag {
    display: inline-block; font-size: 0.6rem; font-weight: 700;
    color: var(--blue); letter-spacing: 1px; margin-bottom: 8px;
    padding: 2px 8px; background: rgba(34,118,211,0.08); border-radius: 4px;
}
.insight-card h4 { font-size: 0.9rem; margin-bottom: 8px; color: var(--blue-dark); display: flex; align-items: center; gap: 6px; }
.insight-card h4 i { color: var(--blue); }
.insight-card p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.insight-metrics { display: flex; gap: 8px; flex-wrap: wrap; }
.metric-tag {
    font-size: 0.68rem; padding: 4px 10px; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); display: flex; align-items: center; gap: 4px;
}
.metric-tag.teal-tag { background: var(--teal-bg); color: var(--teal-dark); border-color: transparent; font-weight: 600; }

/* ===== RISKS ===== */
.risks-list { display: flex; flex-direction: column; gap: 12px; }
.risk-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px 20px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.risk-item:hover { border-color: var(--border-light); box-shadow: var(--shadow); }
.risk-level {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 1px;
    padding: 4px 10px; border-radius: 4px; white-space: nowrap;
}
.risk-item.high .risk-level { background: var(--orange-bg); color: var(--orange); }
.risk-item.medium .risk-level { background: rgba(232,160,76,0.12); color: #c78030; }
.risk-item.low .risk-level { background: var(--teal-bg); color: var(--teal-dark); }
.risk-content { flex: 1; }
.risk-content strong { font-size: 0.88rem; display: block; margin-bottom: 4px; color: var(--blue-dark); }
.risk-content p { font-size: 0.78rem; color: var(--text-secondary); }
.risk-mitigation {
    font-size: 0.75rem; color: var(--text-secondary); margin-top: 8px;
    padding: 8px 12px; background: var(--bg-card); border-radius: 6px;
}
.risk-mitigation span { color: var(--blue); font-weight: 600; }

/* ===== TRANSFORM MAP ===== */
.transform-map { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 10px 0; }
.map-phase { flex: 1; min-width: 200px; }
.map-phase-header {
    padding: 16px; text-align: center; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid var(--border);
}
.map-phase-header.foundation { background: rgba(34,118,211,0.06); border-color: rgba(34,118,211,0.2); }
.map-phase-header.foundation h4, .map-phase-header.foundation i { color: var(--blue); }
.map-phase-header.digitize { background: var(--teal-bg); border-color: rgba(45,212,168,0.2); }
.map-phase-header.digitize h4, .map-phase-header.digitize i { color: var(--teal-dark); }
.map-phase-header.intelligence { background: rgba(1,55,125,0.06); border-color: rgba(1,55,125,0.2); }
.map-phase-header.intelligence h4, .map-phase-header.intelligence i { color: var(--blue-dark); }
.map-phase-header.optimize { background: rgba(154,196,252,0.15); border-color: rgba(154,196,252,0.3); }
.map-phase-header.optimize h4, .map-phase-header.optimize i { color: var(--blue-dark); }
.map-phase-header i { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.map-phase-header h4 { font-size: 0.88rem; margin-bottom: 4px; }
.map-phase-header span { font-size: 0.7rem; color: var(--text-muted); }

.map-items {
    padding: 14px; background: var(--bg-card);
    border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.map-item {
    padding: 8px 0; font-size: 0.78rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--border);
}
.map-item:last-child { border-bottom: none; }
.map-item i { font-size: 0.5rem; color: var(--blue-light); }
.map-arrow { display: flex; align-items: center; padding: 0 8px; color: var(--blue); font-size: 1.2rem; }

/* ===== TECH STACK ===== */
.tech-stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.tech-item-card {
    padding: 20px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.tech-item-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tech-icon { font-size: 1.5rem; color: var(--blue); margin-bottom: 12px; }
.tech-item-card h4 { font-size: 0.95rem; color: var(--blue-dark); margin-bottom: 6px; }
.tech-item-card p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.tech-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tech-tags span {
    font-size: 0.65rem; padding: 3px 8px; border-radius: 4px;
    background: rgba(34,118,211,0.08); color: var(--blue); font-weight: 500;
}

/* ===== ACTION PLANS ===== */
.dept-selector { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.dept-sel-btn {
    padding: 8px 16px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 20px;
    color: var(--text-secondary); cursor: pointer;
    font-size: 0.8rem; font-family: inherit; transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.dept-sel-btn:hover { border-color: var(--blue); color: var(--blue); }
.dept-sel-btn.active { background: rgba(34,118,211,0.1); border-color: var(--blue); color: var(--blue); }

.action-plan-card.hidden { display: none; }

.action-list { display: flex; flex-direction: column; gap: 12px; }
.action-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.action-item:hover { border-color: var(--blue-light); transform: translateX(4px); box-shadow: var(--shadow); }

.action-priority {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800; flex-shrink: 0; color: white;
}
.action-priority.high { background: var(--orange); }
.action-priority.medium { background: var(--blue); }
.action-priority.low { background: var(--blue-light); color: var(--blue-dark); }

.action-content { flex: 1; }
.action-content strong { font-size: 0.88rem; display: block; margin-bottom: 4px; color: var(--blue-dark); }
.action-content p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 8px; }
.action-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.action-meta span { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.action-meta span i { color: var(--blue); }

.action-status {
    font-size: 0.65rem; padding: 4px 12px; border-radius: 20px;
    font-weight: 600; white-space: nowrap; align-self: center;
}
.action-status.pending { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.action-status.progress { background: rgba(34,118,211,0.1); color: var(--blue); }
.action-status.done { background: var(--teal-bg); color: var(--teal-dark); }

/* ===== ROADMAP PHASES ===== */
.roadmap-phases { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.phase {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: var(--transition);
    box-shadow: var(--shadow);
}
.phase:hover { box-shadow: var(--shadow-md); }
.phase-header {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
}
.phase-header.in-progress { background: rgba(34,118,211,0.04); }
.phase-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-weight: 700; font-size: 0.8rem;
}
.phase-icon.in-progress { background: rgba(34,118,211,0.1); color: var(--blue); }
.phase-icon.pending { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.mini-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(34,118,211,0.2);
    border-top-color: var(--blue);
    border-radius: 50%; animation: spin 1s linear infinite;
}
.phase-title-group { flex: 1; }
.phase-number { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; display: block; }
.phase-title { font-weight: 600; font-size: 0.95rem; color: var(--blue-dark); }
.phase-period { font-size: 0.78rem; color: var(--text-muted); }
.phase-status { font-size: 0.72rem; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.phase-status.in-progress { background: rgba(34,118,211,0.1); color: var(--blue); }
.phase-status.pending { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.phase-body { padding: 4px 20px 16px; }

.step {
    padding: 10px 0; font-size: 0.85rem;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.step:last-child { border-bottom: none; }
.step:hover { padding-left: 4px; }
.step.current { color: var(--blue); font-weight: 500; }
.step.pending { color: var(--text-muted); }
.step-icon {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; flex-shrink: 0;
}
.step-icon.current { background: var(--blue); box-shadow: 0 0 10px rgba(34,118,211,0.3); animation: pulse-dot 2s infinite; }
.step-icon.pending { background: var(--bg-elevated); border: 1px solid var(--border); }

/* ===== CHARTS ===== */
.chart-wrapper { position: relative; }
.chart-wrapper.large { height: 350px; }

/* ===== REPORT FOOTER ===== */
.report-footer { text-align: center; padding: 40px 20px; }
.report-footer-logo { height: 40px; margin-bottom: 12px; opacity: 0.5; }
.report-footer p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-wrapper { margin-left: 0; }
    .mobile-menu { display: block; }
    main { padding: 20px 16px; }
    .hero-banner { flex-direction: column; text-align: center; padding: 30px 20px; }
    .hero-visual { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .dept-grid { grid-template-columns: 1fr; }
    .vision-pillars { grid-template-columns: repeat(2, 1fr); }
    .transform-map { flex-direction: column; }
    .map-arrow { transform: rotate(90deg); justify-content: center; padding: 8px 0; }
    .score-circle-container { flex-direction: column; text-align: center; }
    .detail-grid { grid-template-columns: 1fr; }
    .tech-stack-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
    .kpi-row { grid-template-columns: 1fr; }
    .vision-pillars { grid-template-columns: 1fr 1fr; }
}
