/**
 * HASCAR AUTO SERVICES CMS
 * Modern Admin Dashboard Stylesheet
 */

:root {
    --adm-bg: #0b0f17;
    --adm-sidebar: #0f1523;
    --adm-card: #131a2b;
    --adm-card-border: rgba(255, 255, 255, 0.08);
    --adm-gold: #f59e0b;
    --adm-gold-dark: #d97706;
    --adm-text: #f8fafc;
    --adm-text-muted: #94a3b8;
    --adm-accent-wa: #25d366;
    --adm-red: #ef4444;
    --adm-green: #10b981;
    --adm-blue: #3b82f6;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --adm-radius: 12px;
}

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

body {
    background: var(--adm-bg);
    color: var(--adm-text);
    font-family: var(--font-body);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.adm-sidebar {
    width: 270px;
    background: var(--adm-sidebar);
    border-right: 1px solid var(--adm-card-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.adm-brand {
    padding: 1.5rem;
    border-bottom: 1px solid var(--adm-card-border);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.adm-logo-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 8px;
    color: #0b0f17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.3rem;
}

.adm-brand-text {
    display: flex;
    flex-direction: column;
}

.adm-brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: 0.05em;
}

.adm-brand-tag {
    font-size: 0.68rem;
    color: var(--adm-gold);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.adm-nav {
    padding: 1.25rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
    overflow-y: auto;
}

.adm-nav-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--adm-text-muted);
    letter-spacing: 0.1em;
    padding: 0.5rem 0.85rem 0.25rem;
    font-weight: 800;
}

.adm-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.adm-nav-link i {
    width: 18px;
    font-size: 1rem;
    color: var(--adm-text-muted);
    transition: color 0.2s ease;
}

.adm-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.adm-nav-link:hover i {
    color: var(--adm-gold);
}

.adm-nav-link.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 3px solid var(--adm-gold);
    color: #fff;
}

.adm-nav-link.active i {
    color: var(--adm-gold);
}

.adm-badge-count {
    margin-left: auto;
    background: var(--adm-gold);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.adm-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--adm-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.adm-user-mini {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.adm-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--adm-gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.adm-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.adm-user-role {
    font-size: 0.7rem;
    color: var(--adm-text-muted);
}

/* Main Content Area */
.adm-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.adm-topbar {
    height: 70px;
    background: var(--adm-sidebar);
    border-bottom: 1px solid var(--adm-card-border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.adm-page-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.adm-topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.adm-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Stats Cards Grid */
.adm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.adm-stat-card {
    background: var(--adm-card);
    border: 1px solid var(--adm-card-border);
    border-radius: var(--adm-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.adm-stat-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.adm-stat-label {
    font-size: 0.82rem;
    color: var(--adm-text-muted);
    font-weight: 600;
}

.adm-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-gold { background: rgba(245, 158, 11, 0.15); color: var(--adm-gold); }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--adm-blue); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--adm-green); }
.icon-red { background: rgba(239, 68, 68, 0.15); color: var(--adm-red); }

/* Cards & Tables */
.adm-card {
    background: var(--adm-card);
    border: 1px solid var(--adm-card-border);
    border-radius: var(--adm-radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.adm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.adm-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.adm-table-wrap {
    overflow-x: auto;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.adm-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.85rem 1rem;
    color: var(--adm-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--adm-card-border);
}

.adm-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--adm-card-border);
    vertical-align: middle;
}

.adm-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge-status {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.badge-status.tersedia, .badge-status.baru { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-status.terjual, .badge-status.batal { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-status.booking, .badge-status.proses { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* Forms */
.adm-form-group {
    margin-bottom: 1.35rem;
}

.adm-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.45rem;
}

.adm-input, .adm-select, .adm-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--adm-card-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
    border-color: var(--adm-gold);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.adm-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.adm-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Alert Notification Boxes */
.adm-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.adm-alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.adm-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Switch Toggle */
.adm-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.adm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.adm-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 34px;
}
.adm-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .adm-slider {
    background-color: var(--adm-gold);
}
input:checked + .adm-slider:before {
    transform: translateX(24px);
}

/* Responsive */
@media (max-width: 1024px) {
    .adm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .adm-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .adm-stats-grid {
        grid-template-columns: 1fr;
    }
    .adm-row-2, .adm-row-3 {
        grid-template-columns: 1fr;
    }
}
