﻿html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;

    background: #f4f6f8;
    color: #17202a;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
}


/* =========================
   APPLICATION SHELL
   ========================= */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}


/* =========================
   SIDEBAR
   ========================= */

.sidebar {
    width: 270px;
    min-width: 270px;

    background: #111827;
    color: #fff;

    display: flex;
    flex-direction: column;

    min-height: 100vh;

    position: sticky;
    top: 0;

    height: 100vh;

    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 24px 20px 18px;
}

.brand-mark {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #d6a84f;
    color: #111827;

    font-size: 23px;
    font-weight: 800;
}

.brand-name {
    font-size: 14px;
    font-weight: 800;

    letter-spacing: .4px;

    white-space: nowrap;
}

.brand-subtitle {
    color: #9ca3af;
    font-size: 11px;

    margin-top: 3px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,.08);

    margin: 0 18px 12px;
}

.main-navigation {
    padding: 0 12px;
}

.nav-section-title {
    color: #6b7280;

    font-size: 11px;
    font-weight: 700;

    margin: 22px 10px 7px;
}

.nav-link-custom {
    min-height: 43px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 9px 12px;

    margin-bottom: 3px;

    border-radius: 9px;

    color: #d1d5db;

    font-size: 14px;

    transition:
        background .15s ease,
        color .15s ease;
}

.nav-link-custom:hover {
    background: #1f2937;
    color: #fff;
}

.nav-icon {
    width: 22px;
    text-align: center;

    font-size: 17px;

    opacity: .9;
}

.nav-disabled {
    opacity: .65;
    cursor: default;
}

.nav-disabled:hover {
    background: transparent;
}

.coming-soon {
    margin-right: auto;

    font-size: 9px;

    color: #9ca3af;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 18px 15px;
}

.platform-status {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    border-radius: 10px;

    background: rgba(255,255,255,.05);
}

.status-dot,
.check-status {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #35c46b;

    flex: 0 0 auto;
}

.status-title {
    font-size: 12px;
    font-weight: 700;
}

.status-text {
    color: #9ca3af;
    font-size: 10px;

    margin-top: 2px;
}


/* =========================
   MAIN AREA
   ========================= */

.main-area {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
}


/* =========================
   TOPBAR
   ========================= */

.topbar {
    height: 78px;

    background: #fff;

    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;
}

.page-context {
    color: #9ca3af;

    font-size: 11px;
}

.page-title {
    font-size: 19px;
    font-weight: 700;

    margin-top: 2px;
}

.topbar-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.header-button {
    border: 1px solid #e5e7eb;
    background: #fff;

    width: 38px;
    height: 38px;

    border-radius: 9px;

    cursor: pointer;
}

.header-button:hover {
    background: #f8fafc;
}

.user-profile {
    display: flex;
    align-items: center;

    gap: 9px;

    margin-right: 8px;

    padding-right: 12px;

    border-right: 1px solid #e5e7eb;
}

.user-avatar {
    width: 37px;
    height: 37px;

    border-radius: 50%;

    background: #111827;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
}

.user-name {
    font-size: 12px;
    font-weight: 700;
}

.user-role {
    font-size: 10px;
    color: #9ca3af;
}


/* =========================
   CONTENT
   ========================= */

.content-area {
    flex: 1;

    padding: 30px;
}


/* =========================
   DASHBOARD
   ========================= */

.dashboard {
    max-width: 1500px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.dashboard-header h1 {
    margin: 0;

    font-size: 27px;
    font-weight: 800;
}

.dashboard-header p {
    margin: 7px 0 0;

    color: #6b7280;

    font-size: 13px;
}

.primary-action {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 11px 19px;

    border-radius: 9px;

    background: #111827;
    color: #fff;

    font-size: 13px;
    font-weight: 700;
}

.primary-action:hover {
    color: #fff;
    background: #1f2937;
}


/* =========================
   STATS
   ========================= */

.stat-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 20px;
}

.stat-card {
    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 15px;
}

.stat-icon {
    width: 45px;
    height: 45px;

    border-radius: 10px;

    background: #f3f4f6;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.stat-label {
    color: #6b7280;

    font-size: 12px;
}

.stat-value {
    font-size: 23px;
    font-weight: 800;

    margin-top: 3px;
}


/* =========================
   DASHBOARD CARDS
   ========================= */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, 1fr);

    gap: 20px;

    margin-bottom: 20px;
}

.dashboard-card,
.roadmap-card {
    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    padding: 22px;
}

.card-header {
    margin-bottom: 18px;
}

.card-header h2 {
    font-size: 16px;

    margin: 0;

    font-weight: 800;
}

.card-header p {
    margin: 5px 0 0;

    color: #9ca3af;

    font-size: 11px;
}


/* =========================
   QUICK ACTIONS
   ========================= */

.quick-actions {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.quick-action {
    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 15px;

    display: flex;
    align-items: center;

    gap: 11px;

    color: #17202a;
}

.quick-action:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.quick-icon {
    width: 38px;
    height: 38px;

    border-radius: 8px;

    background: #f3f4f6;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
}

.quick-action strong {
    display: block;

    font-size: 12px;
}

.quick-action small {
    display: block;

    color: #9ca3af;

    font-size: 10px;

    margin-top: 3px;
}


/* =========================
   SYSTEM CHECK
   ========================= */

.check-row {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 13px 0;

    border-bottom: 1px solid #f0f2f4;

    font-size: 12px;
}

.check-row:last-child {
    border-bottom: 0;
}

.check-row strong {
    margin-right: auto;

    color: #198754;

    font-size: 11px;
}


/* =========================
   ROADMAP
   ========================= */

.roadmap-title {
    font-size: 16px;
    font-weight: 800;
}

.roadmap-subtitle {
    color: #9ca3af;

    font-size: 11px;

    margin-top: 5px;
}

.roadmap {
    display: flex;
    align-items: center;

    margin-top: 25px;
}

.roadmap-step {
    display: flex;
    align-items: center;

    gap: 7px;

    white-space: nowrap;

    color: #9ca3af;
}

.roadmap-step span {
    width: 28px;
    height: 28px;

    border-radius: 50%;

    border: 1px solid #d1d5db;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 11px;
}

.roadmap-step strong {
    font-size: 10px;
}

.roadmap-step.active {
    color: #111827;
}

.roadmap-step.active span {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.roadmap-line {
    height: 1px;

    background: #e5e7eb;

    flex: 1;

    margin: 0 10px;
}


/* =========================
   FOOTER
   ========================= */

.app-footer {
    min-height: 50px;

    border-top: 1px solid #e5e7eb;

    background: #fff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;

    color: #9ca3af;

    font-size: 10px;
}

.app-footer a {
    color: #6b7280;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1100px) {

    .sidebar {
        width: 230px;
        min-width: 230px;
    }

    .stat-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 800px) {

    .sidebar {
        width: 70px;
        min-width: 70px;
    }

    .brand {
        justify-content: center;
        padding: 18px 8px;
    }

    .brand > div:not(.brand-mark) {
        display: none;
    }

    .nav-section-title,
    .nav-link-custom span:not(.nav-icon),
    .sidebar-bottom {
        display: none;
    }

    .nav-link-custom {
        justify-content: center;
    }

    .nav-icon {
        width: auto;
    }

    .topbar {
        padding: 0 15px;
    }

    .user-info {
        display: none;
    }

    .content-area {
        padding: 18px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .roadmap {
        overflow-x: auto;
        padding-bottom: 8px;
    }

}

@media (max-width: 600px) {

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .page-context {
        display: none;
    }

}
