/* =========================
   TEMA RASMI TAMAN
========================= */
:root {
    --primary: #800000;             /* maroon utama */
    --primary-light: #F5E6E6;       /* soft light maroon / background highlight */
    --accent: #B22222;              /* slightly brighter maroon untuk accent / hover */
    --bg: #FFFFFF;                   /* putih sebagai background utama */
    --text: #1E1E1E;                 /* teks gelap */
    --theme-primary: #800000;        /* consistent dengan primary */
    --theme-primary-hover: #660000;  /* darker maroon untuk hover */
    --theme-soft: #FFEDED;           /* soft background / card */
    --theme-border: #FFC0C0;         /* border / divider subtle */
}

/* =========================
   GENERAL
========================= */
body {
    background-color: var(--bg);
    color: var(--text);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* =========================
   DASHBOARD CARD
========================= */
.card-theme {
    background: var(--primary-light);
    border-left: 5px solid var(--primary);
}

.card-theme h4 {
    color: var(--primary);
}

.card:hover {
    transform: translateY(-3px);
    transition: 0.2s ease;
}

/* =========================
   TABLE
========================= */
.table thead {
    background: var(--primary);
    color: #fff;
}
.table-hover tbody tr:hover {
    background-color: #f1f8f4;
}

/* =========================
   SIDEBAR
========================= */
/* Sidebar Base */
.sidebar-wrapper {
    width: 270px;
    transition: width 0.3s;
    background-color: #800000;   /* maroon utama */
    color: #ffffff;              /* teks putih */
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid #660000; /* subtle border */
}

/* COLLAPSED MODE */
.sidebar-wrapper.collapsed {
    width: 70px;
}

/* Hide text bila collapsed */
.sidebar-wrapper.collapsed .text {
    display: none;
}

/* Center icon bila collapsed (kalau ada icon) */
.sidebar-wrapper.collapsed .sidebar-link {
    justify-content: center;
}

/* Hide submenu text */
.sidebar-wrapper.collapsed .sidebar-dropdown {
    display: none !important;
}


/* Sidebar items */
.sidebar-wrapper .sidebar-item .sidebar-link {
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 10px 0px;
    transition: all 0.3s;
}

/* Sidebar links */
.sidebar-wrapper a {
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: background 0.3s;
}

/* Hover effect */
.sidebar-wrapper a:hover {
    background-color: #660000;  /* darker maroon on hover */
}

/* Active link */
.sidebar-wrapper a.active {
    background-color: #B22222; /* slightly brighter maroon */
    font-weight: 600;
}

.sidebar-title {
    color: #f1f1f1;
}

.bg-purple {
    background-color: #800000;
}

.sidebar-header h6 {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    flex-grow: 1;
}

.sidebar-footer {
    margin-top: auto; /* Push footer ke bawah */
    color: white;
}

.sidebar-wrapper .sidebar-item .sidebar-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Sidebar text hide when collapsed */
.sidebar-wrapper.collapsed .sidebar-link .text {
    display: none;
    color: #f1f1f1;
}

/* Arrow */
.sidebar-link .arrow {
    margin-left: auto;
    transition: transform 0.25s ease;
}

.sidebar-link .arrow::before {
    content: "▸";
    font-size: 0.75rem;
}

/* Rotate arrow bila open */
.sidebar-link[aria-expanded="true"] .arrow {
    transform: rotate(90deg);
}

/* Border bila submenu aktif */
.sidebar-item.active > .sidebar-link {
    border-left: 4px solid #6f42c1; /* warna theme */
    padding-left: 12px;
}

/* Submenu active (simple border je) */
.sidebar-dropdown .sidebar-link.active {
    border-left: 3px solid #9b6bcc;
    padding-left: 12px;
}


/* Main content */
#main-content {
    margin-left: 240px; /* sama dengan sidebar */
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    padding-top: 20 !important
}

/* Collapsed main content margin */
.sidebar-wrapper.collapsed ~ #main-content {
    margin-left: 70px;
}

/* Active menu */
.sidebar-item.active > .sidebar-link {
    background-color: rgba(255,255,255,0.2);
    font-weight: 600;
}

/* Dropdown collapse */
.sidebar-dropdown {
    transition: all 0.3s;
}

/* =========================
   DARK MODE
========================= */
body.dark {
    background: #121212;
    color: #e0e0e0;
}

body.dark .card {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark .table {
    color: #e0e0e0;
}

body.dark .table thead {
    background: #2e7d32;
}

body.dark .sidebar-wrapper {
    background: #0d3d1b;
}

/* Card */
/* .card-header {
    background-color: var(--theme-soft);
    color: var(--theme-primary);
    border-bottom: 1px solid var(--theme-border);
} */

/* Form */
.form-label {
    font-weight: 500;
    color: var(--text);
}

.form-control:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 0.15rem rgba(27, 94, 32, 0.25);
}

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

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

.btn-outline-secondary:hover {
    background-color: var(--theme-soft);
}

/* Section title */
h6.text-uppercase {
    letter-spacing: 0.05em;
}
