/* ==========================================================================
   KULUNGAN ("Prison of Files") - Utilitarian Minimalist Pure Black Theme
   No AI slop gradients. Strict, high contrast, clean monospace/geometric UI.
   ========================================================================== */

:root {
    --bg-primary: #000000;
    --bg-card: #0a0a0a;
    --bg-elevated: #121212;
    --bg-hover: #1c1c1c;
    --border-color: #222222;
    --border-focus: #444444;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #ffffff;
    --accent-invert: #000000;
    --danger: #e03131;
    --danger-bg: #2b0b0b;
    --success: #2f9e44;
    --success-bg: #0b220f;
    --warning: #f59f00;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --header-height: 56px;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Production anti-download & anti-inspect guards */
body:not(.env-dev) {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body:not(.env-dev) img,
body:not(.env-dev) video {
    pointer-events: auto;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Base Links & Buttons */
a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

button:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

button.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    font-weight: 600;
}

button.btn-primary:hover {
    background: #dddddd;
    border-color: #dddddd;
}

button.btn-secondary {
    background: var(--bg-elevated);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

button.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    color: var(--text-primary);
}

button.btn-danger {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: #ff6b6b;
}

button.btn-danger:hover {
    background: #3d0d0d;
}

button.btn-icon {
    padding: 7px;
    border-radius: var(--radius-sm);
}

/* SVG icon standard styles */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   LOGIN SCREEN
   -------------------------------------------------------------------------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.prison-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--border-focus);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

.form-control:focus {
    border-color: var(--accent);
}

.alert-box {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    color: #ff6b6b;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: none;
}

/* --------------------------------------------------------------------------
   APP LAYOUT
   -------------------------------------------------------------------------- */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.app-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-title {
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 14px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 10px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: background-color 0.15s, color 0.15s;
    font-size: 13px;
}

.nav-link:hover, .nav-link.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.user-info {
    overflow: hidden;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.user-role.role-admin {
    color: #ff922b;
}

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

/* Header */
.app-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}

.breadcrumb-item {
    color: var(--text-secondary);
    cursor: pointer;
}

.breadcrumb-item:hover {
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
    cursor: default;
}

.search-box {
    position: relative;
    max-width: 280px;
    width: 100%;
}

.search-box input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px 6px 32px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

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

.search-box .search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter pills */
.filter-tabs {
    display: inline-flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.filter-tab {
    padding: 4px 10px;
    font-size: 12px;
    border: none;
    border-radius: 2px;
    color: var(--text-secondary);
    background: transparent;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: transparent;
}

.filter-tab.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
}

/* Vault Status Button */
.btn-vault {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-vault.unlocked {
    border-color: var(--success);
    color: var(--success);
}

.btn-vault.locked {
    border-color: var(--danger);
    color: #ff6b6b;
}

/* Canvas / Grid Area */
.app-canvas {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Folders Grid */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.folder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    position: relative;
}

.folder-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

.folder-card-name {
    font-weight: 500;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.folder-card-count {
    font-size: 11px;
    color: var(--text-muted);
}

.folder-card-delete {
    display: none;
    color: var(--danger);
    padding: 2px;
    border: none;
}

.folder-card:hover .folder-card-delete {
    display: inline-flex;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.media-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
}

.media-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: none;
    transition: filter 0.2s;
}

/* Locked Overlay */
.media-locked-shield {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
}

.media-locked-shield span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.media-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 3px 6px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-play-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.media-play-indicator .play-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-meta {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.media-title {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-submeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.media-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.media-card:hover .media-card-actions {
    display: flex;
}

.media-card-action-btn {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    width: 26px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.media-card-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    color: #fff;
}

.media-card-action-btn.btn-del {
    border-color: rgba(239, 68, 68, 0.6);
    color: #ff6b6b;
}

.media-card-action-btn.btn-del:hover {
    background: #331111;
    border-color: var(--danger);
    color: #ff8888;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   MODALS
   -------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    background: #060606;
}

/* PIN CHALLENGE MODAL */
.pin-pad-container {
    text-align: center;
}

.pin-mode-toggle {
    display: inline-flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
    margin-bottom: 16px;
}

.pin-mode-btn {
    padding: 5px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 2px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s, color 0.15s;
}

.pin-mode-btn:hover {
    color: var(--text-primary);
}

.pin-mode-btn.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
}

/* Keyboard Input View */
.pin-keyboard-input-wrap {
    position: relative;
    max-width: 260px;
    margin: 10px auto 4px;
    display: flex;
    align-items: center;
}

.pin-direct-input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 38px 12px 14px;
    font-size: 20px;
    font-family: var(--font-mono);
    text-align: center;
    letter-spacing: 4px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

.pin-direct-input:focus {
    border-color: var(--accent);
}

.pin-eye-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px;
}

.pin-eye-btn:hover {
    color: var(--text-primary);
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.pin-digit-box {
    width: 44px;
    height: 52px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    font-size: 24px;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-digit-box.filled {
    border-color: var(--accent);
}

.pin-input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 260px;
    margin: 0 auto;
}

.keypad-btn {
    height: 50px;
    font-size: 18px;
    font-family: var(--font-mono);
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.keypad-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

.shake-animation {
    animation: shake 0.35s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* --------------------------------------------------------------------------
   CUSTOM VIDEO PLAYER & LIGHTBOX
   Strictly anti-download for viewers. High performance.
   -------------------------------------------------------------------------- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-topbar {
    height: 56px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 10;
}

.lightbox-filename {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.2s ease;
    -webkit-user-drag: none;
    user-select: none;
}

/* Transparent shield preventing right-click & drag save */
.anti-save-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: transparent;
}

/* Custom Video Container */
.custom-player-wrapper {
    width: 100%;
    max-width: 1000px;
    max-height: 82vh;
    background: #000;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #1a1a1a;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.custom-player-video {
    width: 100%;
    max-height: 75vh;
    display: block;
    background: #000;
}

/* Custom Video Controls Bar */
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4), transparent);
    padding: 12px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.custom-player-wrapper:hover .player-controls,
.player-controls.show {
    opacity: 1;
}

/* Scrubber Timeline */
.timeline-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.timeline-buffer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #ffffff;
    border-radius: 4px;
}

.timeline-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.15s;
}

.timeline-container:hover .timeline-thumb {
    opacity: 1;
}

/* Control Buttons Row */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    border: none;
    padding: 4px;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: transparent;
    color: #aaaaaa;
}

.time-display {
    font-size: 11px;
    font-family: var(--font-mono);
    color: #cccccc;
}

.volume-slider {
    width: 70px;
    accent-color: #ffffff;
    cursor: pointer;
}

.speed-select {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #444;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
    outline: none;
}

/* Nav arrows */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.lightbox-nav-btn.prev { left: 20px; }
.lightbox-nav-btn.next { right: 20px; }

/* --------------------------------------------------------------------------
   UPLOAD MODAL & DROPZONE
   -------------------------------------------------------------------------- */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.dropzone-icon {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.upload-progress-wrap {
    margin-top: 16px;
    display: none;
}

.upload-bar-track {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.upload-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    transition: width 0.15s ease;
}

.upload-status-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* --------------------------------------------------------------------------
   ADMIN USER MANAGEMENT TABLE
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-badge.revoked {
    background: var(--danger-bg);
    color: #ff6b6b;
    border: 1px solid var(--danger);
}

/* Toast Alerts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.2s ease;
}

@keyframes toastIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .app-sidebar {
        display: none;
    }
    .header-actions .btn-label {
        display: none;
    }
    .search-box {
        max-width: 160px;
    }
}

