/* admin/assets/css/admin-layout.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1a3a2a;
    --primary-light: #2d5f3f;
    --accent: #4ade80;
    --accent-hover: #22c55e;
    --dark: #0f241a;
    --sidebar-width: 250px;
    --topbar-height: 56px;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--body-bg);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* ── Wrapper Layout ── */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    transition: var(--transition);
}

#page-content-wrapper {
    flex: 1;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    padding: 1rem 1.25rem 2rem;
}

/* ── Typography & Section Title ala Tailwind ── */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
    font-weight: 700;
}

.section-title {
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* ── Topbar ── */
.topbar {
    height: var(--topbar-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Sidebar Design (Ala Tailwind Dark Emerald) ── */
#sidebar-wrapper {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #1a3a2a 0%, #11281c 100%);
    color: #fff;
    transition: var(--transition);
    overflow-y: auto;
    z-index: 1020;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#sidebar-wrapper::-webkit-scrollbar {
    width: 4px;
}
#sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-heading {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-heading h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.menu-section-title {
    padding: 0.85rem 1rem 0.35rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.list-group-flush .list-group-item {
    padding: 0.55rem 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0.15rem 0.5rem;
    border-radius: 8px;
    background-color: transparent;
    border: none;
    transition: var(--transition);
}

.list-group-flush .list-group-item i {
    font-size: 1rem;
    line-height: 1;
    width: 20px;
    text-align: center;
    opacity: 0.85;
}

.list-group-flush .list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.list-group-flush .list-group-item.active {
    background: rgba(74, 222, 128, 0.14) !important;
    color: var(--accent) !important;
    font-weight: 600;
    border-left: 3px solid var(--accent);
}

.list-group-flush .list-group-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171 !important;
}

/* ── Modern Card UI ── */
.card, .content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
}

.card-header, .card-header-custom {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h5, .card-header-custom h5 {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.card-body {
    padding: 1.15rem;
}

/* ── Form Controls & Floating Ala Tailwind ── */
.form-label {
    font-size: 0.775rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background-color: #fff;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
    outline: none;
}

.form-text {
    font-size: 0.725rem;
    color: var(--text-muted);
}

/* ── Buttons Ala Tailwind ── */
.btn {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.32rem 0.6rem;
    border-radius: 6px;
}

.btn-primary {
    background-color: #166534;
    border-color: #166534;
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #14532d;
    border-color: #14532d;
    color: #ffffff;
}

.btn-secondary {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* ── Tables Ala Tailwind Minimalis ── */
.table-responsive {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
}

.table {
    margin-bottom: 0;
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
}

.table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 0.7rem 0.85rem;
    vertical-align: middle;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}

.table-hover tbody tr:hover {
    background-color: rgba(74, 222, 128, 0.04);
}

/* ── Badges ── */
.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.28em 0.55em;
    border-radius: 6px;
    letter-spacing: 0.01em;
}

/* ── Modal Dialog Modern & Pas di Layar HP ── */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
}

.modal-header .modal-title {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-body {
    padding: 1.15rem 1.25rem;
    font-size: 0.825rem;
}

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8fafc;
}

/* ── Responsive Mobile (Handphone) ── */
@media (max-width: 992px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        height: 100vh;
    }

    #page-content-wrapper {
        width: 100%;
        padding: 0.85rem 0.85rem 1.75rem;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.75rem;
    }
    
    .modal-content {
        border-radius: 12px;
    }

    .table thead th, .table tbody td {
        padding: 0.55rem 0.65rem;
    }

    .card-header, .card-header-custom {
        padding: 0.75rem 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .card-header .btn, .card-header-custom .btn {
        width: 100%;
    }
}