/* ========================================
   SISTEM AKUNTANSI - Admin Template
   ======================================== */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #0ea5e9;
    --topbar-bg: #f8fafc;
    --primary: #0ea5e9;
    --secondary: #64748b;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f1f5f9;
    overflow-x: hidden;
}

.wrapper { display: flex; width: 100%; align-items: stretch; }

/* Sidebar */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #cbd5e1;
    transition: all 0.3s;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar.active { margin-left: calc(-1 * var(--sidebar-width)); }

.sidebar-header {
    padding: 18px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h5 { color: #fff; font-weight: 700; }

.sidebar-perusahaan { font-size: 0.85rem; }

.sidebar-nav { padding: 10px 0; }
.sidebar-nav .nav-link {
    padding: 10px 20px;
    color: #94a3b8;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar-nav .nav-link.active {
    background: rgba(14, 165, 233, 0.15);
    color: var(--sidebar-active);
    border-left-color: var(--sidebar-active);
}

.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.15);
}
.sub-menu.show { max-height: 500px; }
.sub-menu li a {
    display: block;
    padding: 8px 20px 8px 48px;
    color: #94a3b8;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}
.sub-menu li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* Content */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Topbar */
.topbar {
    background: var(--topbar-bg);
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: var(--secondary);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Stat Card */
.stat-card { border-radius: 12px; }
.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Badge */
.badge-status { font-size: 0.8rem; padding: 5px 10px; }

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); }

/* Tables */
.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
}

/* Forms */
.form-label { font-weight: 500; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { margin-left: calc(-1 * var(--sidebar-width)); }
    .sidebar.active { margin-left: 0; }
    #sidebarToggle { display: block !important; }
}
