/* ===== Variabel merek ===== */
:root {
  --brand: #ea3d0c;
  --brand-dark: #c22d0c;
  --brand-darker: #9a2612;
  --maroon: #6d1531;
  --sidebar-bg: #0a1f3f;
  --sidebar-collapsed: 64px;
  --sidebar-expanded: 280px;
  --nav-height: 68px;
  --accent: var(--brand);

  --brand-blue: #0d2b7a;
  --brand-blue-light: #1a3c8f;
  --brand-blue-soft: #e8edf5;

  --bfc-dark: #1a1a2e;
  --bfc-darker: #0f0f1a;
  --bfc-orange: #e67e22;
  --bfc-orange-light: #f39c12;
  --bfc-gold: #f1c40f;
  --bfc-orange-soft: rgba(230,126,34,.08);
  --bfc-shadow: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
  --bfc-shadow-hover: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Warna utilitas Bootstrap disetel ke warna merek */
.btn-brand {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}
.text-brand {
    color: var(--brand) !important;
}
.link-brand {
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 600;
}
.link-brand:hover {
    color: var(--brand-darker);
}

/* ===== Layar autentikasi (login, daftar, dst.) ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
}
.auth-brand-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, var(--brand-blue) 0%, var(--brand) 50%, var(--brand-dark) 100%);
    color: #fff;
}
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

/* ===== Navbar admin ===== */
.app-navbar {
    background-color: var(--sidebar-bg) !important;
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

/* ===== Sidebar admin ===== */
#admin-layout {
    padding-left: 64px;
    padding-top: 68px;
    min-height: 100vh;
    transition: padding-left 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}
body.sidebar-expanded #admin-layout {
    padding-left: 280px;
}

.app-sidebar {
    background-color: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 68px;
    bottom: 0;
    width: 64px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: width 0.3s ease;
}
.app-sidebar.expanded {
    width: 280px;
}

#sidebar-toggle {
    transition: transform 0.3s ease;
}
body.sidebar-expanded #sidebar-toggle .bi-list::before {
    transform: rotate(90deg);
}

.sidebar-more {
    font-size: 0.65rem;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.app-sidebar.expanded .sidebar-more {
    opacity: 0.5;
}

.sidebar-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.375rem;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
    width: 100%;
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
}
.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}
.sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}
.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--accent);
    border-radius: 0 4px 4px 0;
}
.sidebar-item .item-icon {
    width: 20px;
    font-size: 1.15rem;
    flex-shrink: 0;
    text-align: center;
}
.sidebar-item .item-label {
    display: none;
}
.app-sidebar.expanded .sidebar-item .item-label {
    display: inline;
}

.sidebar-submenu {
    display: none;
    padding-left: 2rem;
    margin-top: 0.25rem;
}
.app-sidebar.expanded .sidebar-submenu.open {
    display: block;
}
.sidebar-submenu .sidebar-item {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}

.sidebar-tooltip {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #111827;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 9999;
}
.sidebar-item:hover .sidebar-tooltip {
    opacity: 1;
}
.app-sidebar.expanded .sidebar-tooltip {
    display: none;
}

/* ===== Area konten admin ===== */
.app-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}
.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background-color: var(--brand);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.72rem;
    flex-shrink: 0;
}


