/* 
   Sistem-STS / assets/css/style.css
   Modern High-Contrast Navy & Ocean Blue Corporate Design System
   PT. Sayang Terbuang Solusi (Sistem-STS)
*/

:root {
    --primary-magenta: #993365;
    --primary-magenta-dark: #7b2550;
    --primary-magenta-light: #fdf2f8;
    --primary-magenta-hover: #b33d77;
    --primary-navy: #0f172a;
    --primary-blue: #993365;
    --primary-dark: #7b2550;
    --primary-light: #fdf2f8;
    --accent-sky: #f472b6;
    --accent-gold: #f59e0b;
    --slate-dark: #091428;
    --slate-body: #1e293b;
    --slate-muted: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #cbd5e1;
    --success-badge: #059669;
    --warning-badge: #d97706;
    --danger-badge: #dc2626;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--slate-body);
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    -webkit-font-smoothing: antialiased;
}

/* HIGH-CONTRAST FOR ALL DROPDOWNS & SELECT OPTIONS (FIX WHITE-ON-WHITE ISSUE) */
select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600;
    padding: 6px 12px;
}

.role-select-custom option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Header & Navbar */
.navbar-sts {
    background: linear-gradient(135deg, #1f0b15 0%, #3d1428 50%, #5c1e3d 100%);
    border-bottom: 3px solid #993365;
}

.navbar-brand-sts {
    color: #ffffff;
}

/* Sidebar & Main Layout */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar-sts {
    width: 260px;
    background-color: #993365;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.25rem 0.85rem;
    flex-shrink: 0;
    transition: width 0.25s ease, padding 0.25s ease, margin 0.25s ease;
    overflow-x: hidden;
}

/* Sidebar Closed / Collapsed State */
.sidebar-sts.sidebar-closed {
    width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-right: none !important;
    overflow: hidden !important;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section-header {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fbcfe8; /* Soft pinkish white */
    margin: 0.85rem 0 0.3rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-section-header:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-section-header .chevron-icon {
    font-size: 0.65rem;
    color: #fbcfe8;
    transition: transform 0.2s ease;
}

.sidebar-section-header.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.sidebar-section-body {
    transition: max-height 0.2s ease;
}

.sidebar-section-body.hidden {
    display: none;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.825rem;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-weight: 700;
    box-shadow: inset 4px 0 0 #ffffff;
}

.sidebar-link i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.95rem;
    color: #ffffff !important;
    opacity: 0.95;
}

.content-area {
    flex-grow: 1;
    padding: 1.75rem 2rem;
    overflow-y: auto;
}

/* Metric Cards */
.card-metric {
    background: #ffffff;
    border-radius: 0.85rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.metric-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 0.25rem;
    line-height: 1.2;
}

.metric-sub {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Tables & Panels */
.data-panel {
    background: #ffffff;
    border-radius: 0.85rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.panel-header {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-custom th {
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #cbd5e1;
}

.table-custom td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.825rem;
    vertical-align: middle;
}

.table-custom tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge-sts {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.725rem;
    font-weight: 700;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-navy {
    background-color: #0f172a;
    color: #ffffff;
}

/* Forms & Inputs */
.form-label-custom {
    display: block;
    font-weight: 600;
    font-size: 0.775rem;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.form-control-custom {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    background-color: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: #993365;
    box-shadow: 0 0 0 3px rgba(153, 51, 101, 0.18);
}

/* Print Specific Layout */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
    }

    nav, .sidebar-sts, .no-print, button, form {
        display: none !important;
    }

    .main-wrapper {
        display: block !important;
        min-height: auto !important;
    }

    .content-area {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .card-print {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}
