/* VARIABLES - DARK AESTHETIC */
:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #141821;
    --bg-tertiary: #1c2029;
    --bg-card: #212631;
    --border-dark: #2a3140;
    --border-light: #3a4255;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent-blue: #00b4d8;
    --accent-green: #06d6a0;
    --accent-yellow: #ffd43b;
    --accent-purple: #9d4edd;
    --accent-red: #ff6b6b;
    --accent-pink: #f72585;
    --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RGB ANIMASI - HANYA UNTUK 1 LINE */
@keyframes rgbRotate {
    0% { border-color: #ff0000; box-shadow: 0 2px 15px rgba(255, 0, 0, 0.3); }
    20% { border-color: #ff8800; box-shadow: 0 2px 15px rgba(255, 136, 0, 0.3); }
    40% { border-color: #ffff00; box-shadow: 0 2px 15px rgba(255, 255, 0, 0.3); }
    60% { border-color: #00ff00; box-shadow: 0 2px 15px rgba(0, 255, 0, 0.3); }
    80% { border-color: #0000ff; box-shadow: 0 2px 15px rgba(0, 0, 255, 0.3); }
    100% { border-color: #ff0000; box-shadow: 0 2px 15px rgba(255, 0, 0, 0.3); }
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 0;
    border-right: 1px solid var(--border-dark);
    z-index: 1000;
    justify-content: space-between;
}

.logo-space {
    height: 60px;
    width: 100%;
}

.nav-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
}

.nav-icon {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 5px 0;
}

.icon-wrapper {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border: 1px solid var(--border-dark);
}

.nav-icon:hover .icon-wrapper {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
    border-color: var(--accent-blue);
}

.nav-icon.active .icon-wrapper {
    background: linear-gradient(135deg, var(--accent-blue), #0096c7);
    color: white;
    border-color: var(--accent-blue);
}

.icon-label {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
    border: 1px solid var(--border-dark);
    pointer-events: none;
}

.nav-icon:hover .icon-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* CONTENT WRAPPER */
.content-wrapper {
    margin-left: 80px;
    width: calc(100% - 80px);
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
}

/* MAIN CONTENT */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* HEADER */
.main-header {
    padding: 20px 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    flex-shrink: 0;
}

@keyframes rgbCycle {
    0% { color: #ff0000; text-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
    33% { color: #00ff00; text-shadow: 0 0 10px rgba(0, 255, 0, 0.5); }
    66% { color: #0000ff; text-shadow: 0 0 10px rgba(0, 0, 255, 0.5); }
    100% { color: #ff0000; text-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
}

.rgb-text {
    animation: rgbCycle 3s infinite linear;
    font-weight: 600;
    display: inline-block;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.user-avatar-small {
    font-size: 1.8rem;
    color: var(--accent-blue);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.logout-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-red), #ff4757);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

/* MENU + SUBMENU */
.menu-submenu-container {
    display: flex;
    height: 70px;
    align-items: center;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-dark);
}

/* MAIN MENU - INI YANG PUNYA RGB LINE (TEBAL 3px) */
.main-menu-wrapper {
    width: 350px;
    height: 70px;
    flex-shrink: 0;
    border-right: 3px solid;
    animation: rgbRotate 8s infinite linear;
}

.main-menu {
    width: 100%;
    height: 100%;
    padding: 0 20px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.submenu-container {
    flex: 1;
    height: 70px;
    background: var(--bg-card);
}

.submenu-tabs {
    width: 100%;
    height: 100%;
    display: flex;
    gap: 5px;
    background: var(--bg-card);
    padding: 8px;
}

.submenu-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 15px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    border: 1px solid transparent;
}

.submenu-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--tab-color);
}

.submenu-tab.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--tab-color);
}

/* DASHBOARD CONTENT */
.dashboard-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
}

/* LEFT PANEL */
.left-panel {
    width: 350px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
    border-right: 1px solid var(--border-dark);
    background: var(--bg-primary);
}

.panel-card {
    background: var(--bg-card);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    overflow-y: auto;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-section label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.region-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 5px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.region-chip {
    padding: 8px 5px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
}

.region-chip:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.region-chip.selected {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    font-weight: 600;
}

.filter-dropdown, .date-input {
    padding: 10px 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
}

.filter-dropdown:focus, .date-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding-right: 45px;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

.clear-search:hover {
    color: var(--text-primary);
}

/* RIGHT PANEL */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    overflow: hidden;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.table-title h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.table-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.action-btn {
    padding: 10px 18px;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    background: rgba(157, 78, 221, 0.1);
    color: var(--accent-purple);
}

.action-btn:hover {
    background: rgba(157, 78, 221, 0.2);
    transform: translateY(-2px);
}

.table-container {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.data-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 15px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-dark);
    white-space: nowrap;
    text-transform: uppercase;
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.data-table td {
    padding: 15px 18px;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.status-cell {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    border: 1px solid transparent;
}

.status-pending {
    background: rgba(255, 107, 107, 0.15);
    color: var(--accent-red);
    border-color: rgba(255, 107, 107, 0.3);
}

.status-completed {
    background: rgba(6, 214, 160, 0.15);
    color: var(--accent-green);
    border-color: rgba(6, 214, 160, 0.3);
}

.status-active {
    background: rgba(255, 212, 59, 0.15);
    color: var(--accent-yellow);
    border-color: rgba(255, 212, 59, 0.3);
}

.action-cell {
    display: flex;
    gap: 6px;
}

.table-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.table-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.table-action-btn.view { color: var(--accent-blue); }
.table-action-btn.edit { color: var(--accent-green); }
.table-action-btn.delete { color: var(--accent-red); }

.table-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-dark);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.page-number {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.page-number:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.page-number.active {
    background: var(--accent-blue);
    color: white;
    font-weight: 600;
}

.page-size select {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.page-size select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* CUSTOM SCROLLBAR — Biru */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0e14; }
::-webkit-scrollbar-thumb { background: #00b4d8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #0096c7; }
::-webkit-scrollbar-corner { background: #0a0e14; }
 
/* FULL WIDTH FIX — right panel stretch ke ujung */
.content-wrapper {
    margin-left: 80px;
    width: calc(100% - 80px);
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}
 
.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
 
.dashboard-content {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--bg-primary);
}
 
.right-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    overflow: hidden;
}
 
.table-container {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

/* Fix container tidak stretch full */
.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
}
 
.content-wrapper {
    flex: 1;
    min-width: 0;
    max-width: calc(100vw - 80px);
}
 
.dashboard-content {
    width: 100%;
    max-width: 100%;
}
 
.right-panel {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
 
/* Table min-width lebih kecil, scroll di dalam container */
.data-table {
    min-width: 800px;
}
 
/* Scrollbar horizontal biru di bottom */
.table-container::-webkit-scrollbar { height: 6px; width: 6px; }
.table-container::-webkit-scrollbar-track { background: #141821; }
.table-container::-webkit-scrollbar-thumb { background: #00b4d8; border-radius: 10px; }