/* ==========================================================
   DASHBOARD
   Sistem Manajemen Proyek AC
   ========================================================== */

:root {
    --dashboard-bg: #f5f7fa;

    --dashboard-white: #ffffff;

    --dashboard-border: #e8edf3;

    --dashboard-text: #1e2937;

    --dashboard-text-secondary: #667485;

    --dashboard-muted: #9aa5b1;

    --dashboard-primary: #1467b2;

    --dashboard-primary-dark: #0c4f91;

    --dashboard-primary-soft: #edf5fd;

    --dashboard-green: #198754;

    --dashboard-green-soft: #eaf8f0;

    --dashboard-orange: #e88424;

    --dashboard-orange-soft: #fff4e8;

    --dashboard-red: #d64545;

    --dashboard-red-soft: #fdefef;

    --dashboard-purple: #7257c7;

    --dashboard-purple-soft: #f1eefb;

    --dashboard-cyan: #16889b;

    --dashboard-cyan-soft: #e9f7f9;

    --dashboard-radius: 12px;

    --dashboard-shadow:
        0 2px 12px rgba(32, 52, 72, 0.045);
}


/* ==========================================================
   BODY
   ========================================================== */

html,
body {
    margin: 0;

    min-height: 100%;

    background: var(--dashboard-bg);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--dashboard-text);
}


body {
    min-height: 100vh;
}


body.sidebar-mobile-open {
    overflow: hidden;
}


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

.main-content {
    min-height: 100vh;

    background: var(--dashboard-bg);
}


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

.dashboard-topbar {
    height: 76px;

    padding: 0 28px;

    background: #ffffff;

    border-bottom: 1px solid var(--dashboard-border);

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

    position: sticky;

    top: 0;

    z-index: 100;
}


.topbar-left {
    display: flex;

    align-items: center;

    min-width: 0;
}


.topbar-title {
    min-width: 0;
}


.topbar-title h1 {
    margin: 0;

    color: var(--dashboard-text);

    font-size: 20px;

    font-weight: 700;

    line-height: 1.25;
}


.topbar-title p {
    margin: 4px 0 0;

    color: var(--dashboard-muted);

    font-size: 11px;

    line-height: 1.3;
}


.mobile-menu-button {
    display: none;

    width: 40px;
    height: 40px;

    margin-right: 12px;

    padding: 0;

    border: 1px solid var(--dashboard-border);

    border-radius: 9px;

    background: #ffffff;

    color: #526171;

    cursor: pointer;

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


.mobile-menu-button svg {
    width: 21px;
    height: 21px;

    fill: currentColor;
}


.mobile-menu-button:hover {
    background: #f5f8fb;

    color: var(--dashboard-primary);
}


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

.topbar-right {
    display: flex;

    align-items: center;

    gap: 12px;
}


.topbar-action-button {
    position: relative;

    width: 40px;
    height: 40px;

    padding: 0;

    border: 1px solid var(--dashboard-border);

    border-radius: 9px;

    background: #ffffff;

    color: #667485;

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

    cursor: pointer;
}


.topbar-action-button:hover {
    background: #f5f8fb;

    color: var(--dashboard-primary);
}


.topbar-action-button svg {
    width: 19px;
    height: 19px;

    fill: currentColor;
}


.notification-badge {
    position: absolute;

    top: -5px;
    right: -5px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    border: 2px solid #ffffff;

    border-radius: 20px;

    background: #d94949;

    color: #ffffff;

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

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


.topbar-date {
    min-height: 40px;

    padding: 0 13px;

    border: 1px solid var(--dashboard-border);

    border-radius: 9px;

    background: #ffffff;

    color: var(--dashboard-text-secondary);

    display: flex;
    align-items: center;

    font-size: 11px;

    white-space: nowrap;
}


.topbar-date svg {
    width: 16px;
    height: 16px;

    margin-right: 8px;

    fill: var(--dashboard-primary);
}


/* ==========================================================
   CONTAINER
   ========================================================== */

.dashboard-container {
    width: 100%;

    padding: 24px 28px 40px;
}


/* ==========================================================
   WELCOME
   ========================================================== */

.dashboard-welcome {
    min-height: 130px;

    margin-bottom: 22px;

    padding: 24px 28px;

    border-radius: 14px;

    background:
        linear-gradient(
            120deg,
            #0e589c 0%,
            #146bb5 55%,
            #1a78c5 100%
        );

    color: #ffffff;

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

    gap: 24px;

    box-shadow:
        0 5px 20px rgba(20, 103, 178, 0.13);
}


.welcome-content {
    max-width: 670px;
}


.welcome-label {
    display: block;

    margin-bottom: 8px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 9px;

    font-weight: 750;

    letter-spacing: 1.3px;
}


.welcome-content h2 {
    margin: 0;

    font-size: 25px;

    font-weight: 720;

    line-height: 1.25;
}


.welcome-content p {
    max-width: 640px;

    margin: 7px 0 0;

    color: rgba(255, 255, 255, 0.82);

    font-size: 12px;

    line-height: 1.6;
}


.welcome-actions {
    display: flex;

    align-items: center;

    gap: 9px;

    flex-shrink: 0;
}


/* ==========================================================
   BUTTON
   ========================================================== */

.button {
    min-height: 39px;

    padding: 0 16px;

    border-radius: 8px;

    text-decoration: none;

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

    font-size: 11px;

    font-weight: 650;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.button svg {
    width: 16px;
    height: 16px;

    margin-right: 7px;

    fill: currentColor;
}


.button-primary {
    background: #ffffff;

    color: #105b9f;

    border: 1px solid #ffffff;
}


.button-primary:hover {
    background: #f3f7fb;
}


.button-secondary {
    background: rgba(255, 255, 255, 0.08);

    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.35);
}


.button-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}


/* ==========================================================
   SUMMARY
   ========================================================== */

.summary-grid {
    display: grid;

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

    gap: 14px;

    margin-bottom: 20px;
}


.summary-card {
    min-width: 0;

    min-height: 140px;

    padding: 17px;

    background: var(--dashboard-white);

    border: 1px solid var(--dashboard-border);

    border-radius: var(--dashboard-radius);

    box-shadow: var(--dashboard-shadow);
}


.summary-card-header {
    display: flex;

    align-items: center;

    gap: 10px;
}


.summary-icon {
    width: 35px;
    height: 35px;

    min-width: 35px;

    border-radius: 9px;

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


.summary-icon svg {
    width: 17px;
    height: 17px;

    fill: currentColor;
}


.summary-icon-project {
    background: var(--dashboard-primary-soft);

    color: var(--dashboard-primary);
}


.summary-icon-workorder {
    background: var(--dashboard-orange-soft);

    color: var(--dashboard-orange);
}


.summary-icon-service {
    background: var(--dashboard-red-soft);

    color: var(--dashboard-red);
}


.summary-icon-maintenance {
    background: var(--dashboard-green-soft);

    color: var(--dashboard-green);
}


.summary-icon-customer {
    background: var(--dashboard-purple-soft);

    color: var(--dashboard-purple);
}


.summary-icon-asset {
    background: var(--dashboard-cyan-soft);

    color: var(--dashboard-cyan);
}


.summary-label {
    min-width: 0;

    color: var(--dashboard-text-secondary);

    font-size: 11px;

    font-weight: 600;

    line-height: 1.3;
}


.summary-value {
    margin-top: 15px;

    color: var(--dashboard-text);

    font-size: 25px;

    font-weight: 750;

    line-height: 1;
}


.summary-footer {
    margin-top: 8px;

    color: var(--dashboard-muted);

    font-size: 9px;

    line-height: 1.4;
}


/* ==========================================================
   FINANCE SUMMARY
   ========================================================== */

.finance-summary {
    display: grid;

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

    gap: 14px;

    margin-bottom: 20px;
}


.finance-card {
    min-height: 112px;

    padding: 19px 20px;

    border: 1px solid var(--dashboard-border);

    border-radius: var(--dashboard-radius);

    background: #ffffff;

    box-shadow: var(--dashboard-shadow);
}


.finance-content {
    display: flex;

    flex-direction: column;
}


.finance-title {
    color: var(--dashboard-text-secondary);

    font-size: 10px;

    font-weight: 600;
}


.finance-content strong {
    margin-top: 9px;

    color: var(--dashboard-text);

    font-size: 20px;

    font-weight: 720;

    line-height: 1.2;
}


.finance-description {
    margin-top: 7px;

    color: var(--dashboard-muted);

    font-size: 9px;
}


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

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(280px, 1fr);

    gap: 14px;

    margin-bottom: 14px;
}


.dashboard-panel-project {
    grid-row: span 2;
}


.dashboard-bottom-grid {
    display: grid;

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

    gap: 14px;
}


/* ==========================================================
   PANEL
   ========================================================== */

.dashboard-panel {
    min-width: 0;

    background: #ffffff;

    border: 1px solid var(--dashboard-border);

    border-radius: var(--dashboard-radius);

    box-shadow: var(--dashboard-shadow);
}


.panel-header {
    min-height: 68px;

    padding: 15px 18px;

    border-bottom: 1px solid #edf1f5;

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

    gap: 15px;
}


.panel-header h3 {
    margin: 0;

    color: var(--dashboard-text);

    font-size: 13px;

    font-weight: 680;
}


.panel-header p {
    margin: 4px 0 0;

    color: var(--dashboard-muted);

    font-size: 9px;
}


.panel-link {
    color: var(--dashboard-primary);

    text-decoration: none;

    font-size: 9px;

    font-weight: 650;

    white-space: nowrap;
}


.panel-link:hover {
    text-decoration: underline;
}


.panel-body {
    min-height: 140px;
}


/* ==========================================================
   TABLE
   ========================================================== */

.table-responsive {
    width: 100%;

    overflow-x: auto;
}


.dashboard-table {
    width: 100%;

    border-collapse: collapse;

    table-layout: auto;
}


.dashboard-table th {
    padding: 11px 16px;

    background: #fafbfd;

    border-bottom: 1px solid #edf1f5;

    color: #85919e;

    text-align: left;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}


.dashboard-table td {
    padding: 13px 16px;

    border-bottom: 1px solid #f0f3f6;

    color: var(--dashboard-text-secondary);

    font-size: 10px;
}


.dashboard-table tbody tr:last-child td {
    border-bottom: 0;
}


.table-empty-row td {
    padding: 0;
}


/* ==========================================================
   EMPTY STATE
   ========================================================== */

.empty-state {
    min-height: 230px;

    padding: 25px;

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

    text-align: center;
}


.empty-state-small {
    min-height: 150px;
}


.empty-icon {
    width: 40px;
    height: 40px;

    margin-bottom: 10px;

    border-radius: 10px;

    background: #f1f5f9;

    color: #9aa7b5;

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


.empty-icon svg {
    width: 19px;
    height: 19px;

    fill: currentColor;
}


.empty-state strong {
    color: var(--dashboard-text-secondary);

    font-size: 11px;

    font-weight: 650;
}


.empty-state span {
    margin-top: 5px;

    color: var(--dashboard-muted);

    font-size: 9px;

    line-height: 1.4;
}


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

@media (max-width: 1500px) {

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

}


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

@media (max-width: 1100px) {

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


    .dashboard-panel-project {
        grid-row: auto;
    }


    .finance-summary {
        grid-template-columns: 1fr 1fr;
    }

}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 768px) {

    .dashboard-topbar {
        height: 68px;

        padding: 0 16px;
    }


    .mobile-menu-button {
        display: flex;
    }


    .topbar-title h1 {
        font-size: 17px;
    }


    .topbar-title p {
        display: none;
    }


    .topbar-date {
        display: none;
    }


    .dashboard-container {
        padding: 17px;
    }


    .dashboard-welcome {
        padding: 21px;

        flex-direction: column;

        align-items: flex-start;
    }


    .welcome-actions {
        width: 100%;
    }


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


    .finance-summary {
        grid-template-columns: 1fr;
    }


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

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 480px) {

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


    .welcome-actions {
        flex-direction: column;

        align-items: stretch;
    }


    .button {
        width: 100%;
    }


    .dashboard-welcome {
        border-radius: 10px;
    }


    .summary-card,
    .dashboard-panel,
    .finance-card {
        border-radius: 10px;
    }

}