:root, [data-theme="dark"] {
    --bg-main: #0d1117;
    --bg-surface: #161b22;
    --bg-card: #21262d;
    --bg-input: #0d1117;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --primary: #238636;
    --primary-hover: #2ea043;
    --primary-active: #238636;
    --danger: #da3633;
    --danger-hover: #f85149;
    --warning: #d29922;
    --info: #388bfd;
    --terminal-bg: #090d13;
    --terminal-text: #7ee787;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --sidebar-width: 260px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="light"] {
    --bg-main: #f6f8fa;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border-color: #d0d7de;
    --text-primary: #1f2328;
    --text-secondary: #656d76;
    --text-muted: #8c959f;
    --primary: #1f883d;
    --primary-hover: #1a7f37;
    --danger: #cf222e;
    --danger-hover: #a40e26;
    --warning: #9a6700;
    --info: #0969da;
    --terminal-bg: #1f2328;
    --terminal-text: #7ee787;
    --shadow: 0 8px 24px rgba(140,149,159,0.15);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.content-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Brand */
.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    background: var(--danger);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    line-height: 1.2;
}

.brand-tag {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Sidebar Live Status */
.sidebar-status-card {
    margin: 1rem 1.25rem 0.5rem;
    padding: 0.85rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.status-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-subtext {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.sidebar-nav {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(35, 134, 54, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.system-spec {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.spec-name {
    color: var(--text-muted);
}

.spec-badge {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Modern Telemetry Topbar */
.topbar {
    height: 62px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 1.25rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.topbar-brand-area {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.topbar-page-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}

/* Central System Telemetry Dock */
.header-sys-dock {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.header-sys-dock::-webkit-scrollbar {
    display: none;
}

.sys-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    padding: 0.3rem 0.65rem;
    font-size: 0.76rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.sys-chip:hover {
    border-color: var(--info);
    transform: translateY(-1px);
}

.sys-chip-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sys-chip-icon.cpu {
    background: rgba(234, 88, 12, 0.15);
    color: #fb923c;
}

.sys-chip-icon.ram {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.sys-chip-icon.disk {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.sys-chip-icon.net {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.sys-chip-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.sys-chip-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.sys-chip-val {
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.sys-chip-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
}

.sys-chip-fill {
    height: 100%;
    background: var(--info);
    transition: width 0.4s ease, background 0.3s ease;
}

/* Net Metric Details */
.net-meta {
    gap: 0.5rem;
}

.net-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.76rem;
}

.net-metric.up {
    color: var(--info);
}

.net-metric.down {
    color: var(--primary);
}

.net-metric .arrow {
    font-size: 0.65rem;
}

.net-separator {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Warnings & Critical states */
.sys-chip.warn {
    border-color: rgba(210, 153, 34, 0.4);
    background: rgba(210, 153, 34, 0.08);
}
.sys-chip.warn .sys-chip-fill {
    background: var(--warning);
}
.sys-chip.warn .sys-chip-val {
    color: var(--warning);
}

.sys-chip.danger {
    border-color: rgba(218, 54, 51, 0.5);
    background: rgba(218, 54, 51, 0.12);
}
.sys-chip.danger .sys-chip-fill {
    background: var(--danger);
}
.sys-chip.danger .sys-chip-val {
    color: var(--danger);
}

/* Topbar Actions (Right Side) */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-channel-box {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-main);
    padding: 0.3rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.header-channel-box:hover {
    border-color: var(--info);
}

.channel-icon-tag {
    font-size: 0.85rem;
}

.channel-label-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.header-channel-select {
    height: 28px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    min-width: 130px;
    max-width: 200px;
}

.header-channel-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.btn-theme-round {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-theme-round:hover {
    background: var(--bg-surface);
    border-color: var(--info);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.live-action-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(218, 54, 51, 0.12);
    padding: 0.3rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(218, 54, 51, 0.35);
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: pulseGlow 1.5s infinite;
}

.live-badge-txt {
    font-size: 0.75rem;
    font-weight: 800;
    color: #f87171;
    letter-spacing: 0.04em;
}

.btn-stop-top {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
}

/* Main Container */
.main-content {
    padding: 2rem;
    flex: 1;
}

.page-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3, .card-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Live Monitor Card */
.live-monitor-card {
    border-left: 4px solid var(--border-color);
    transition: border-color 0.3s;
}

.live-monitor-card.streaming {
    border-left-color: var(--danger);
}

.live-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.metric-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0.35rem 0;
    font-family: var(--font-mono);
}

.metric-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stream-extra-info {
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.85rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: var(--bg-card);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
}

.btn-xs {
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
}

.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Pulse Dot */
.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.pulse-dot.idle {
    background: var(--text-muted);
}

.pulse-dot.active {
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(218, 54, 51, 0.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(218, 54, 51, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(218, 54, 51, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(218, 54, 51, 0); }
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.table th {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 0.85rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-main);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-success, .badge-finished {
    background: rgba(35, 134, 54, 0.15);
    color: var(--primary);
    border-color: rgba(35, 134, 54, 0.3);
}

.badge-danger, .badge-failed, .badge-live {
    background: rgba(218, 54, 51, 0.15);
    color: var(--danger);
    border-color: rgba(218, 54, 51, 0.3);
}

.badge-info, .badge-scheduled {
    background: rgba(56, 139, 253, 0.15);
    color: var(--info);
    border-color: rgba(56, 139, 253, 0.3);
}

.badge-idle {
    background: var(--bg-card);
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

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

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Terminal Console */
.terminal-card {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
}

.terminal-header {
    background: #161b22;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    margin-left: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    flex: 1;
}

.terminal-body {
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--terminal-text);
    height: 380px;
    overflow-y: auto;
    background: var(--terminal-bg);
}

.log-line {
    line-height: 1.6;
    word-break: break-all;
    white-space: pre-wrap;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 540px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.modal-lg {
    max-width: 720px;
}

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

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.playlist-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.playlist-details {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.playlist-footer {
    display: flex;
    justify-content: flex-end;
}

/* Upload Progress */
.upload-progress-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-main);
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.2s;
}

/* Footage Picker */
.footage-picker-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    background: var(--bg-input);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.footage-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.footage-picker-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(234, 88, 12, 0.4);
}

.footage-picker-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    margin: 0;
}

.footage-thumb-box {
    position: relative;
    width: 90px;
    height: 50px;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background: #090d16;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.footage-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.footage-thumb-overlay-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.footage-thumb-box:hover .footage-thumb-overlay-play {
    opacity: 1;
}

.footage-info-box {
    min-width: 0;
    flex: 1;
}

.footage-title-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.footage-meta-pills {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.checkbox-row:last-child {
    border-bottom: none;
}

/* Safeguard Box */
.safeguard-box {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(35, 134, 54, 0.08);
    border: 1px solid rgba(35, 134, 54, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
}

.safeguard-icon {
    font-size: 1.8rem;
}

.safeguard-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.safeguard-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.limits-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.limit-name {
    color: var(--text-secondary);
}

/* Channels List */
.channels-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.channel-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.channel-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 300;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left: 4px solid var(--primary); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mini Lists */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

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

/* Utility */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--primary); }
.text-primary { color: var(--info); }
.small { font-size: 0.78rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.p-0 { padding: 0 !important; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.col-span-full { grid-column: 1 / -1; }

/* File Explorer / Folder View */
.explorer-toolbar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.explorer-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.breadcrumb-link {
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.breadcrumb-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.explorer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Folder Grid */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.folder-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    user-select: none;
}

.folder-card:hover {
    transform: translateY(-2px);
    border-color: var(--info);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.folder-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-icon-footage {
    background: rgba(56, 139, 253, 0.15);
    color: var(--info);
}

.folder-icon-music {
    background: rgba(187, 128, 9, 0.15);
    color: var(--warning);
}

.folder-details {
    flex: 1;
    min-width: 0;
}

.folder-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

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

.file-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.file-preview-box {
    height: 130px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.file-media-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.file-tag-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.file-badge-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.file-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-submeta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.file-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.6rem;
}

/* Video/Audio Preview Modal */
.media-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1rem;
}

.media-preview-container video {
    width: 100%;
    max-height: 480px;
    outline: none;
}

.media-preview-container audio {
    width: 100%;
    margin: 1rem;
}


/* Modern Sleek Gallery Design */
.gallery-theme-container {
    background: linear-gradient(165deg, rgba(30, 24, 18, 0.75) 0%, rgba(13, 14, 18, 0.95) 50%, rgba(18, 22, 28, 0.8) 100%);
    border: 1px solid rgba(234, 88, 12, 0.18);
    border-radius: 20px;
    padding: 2.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.gallery-theme-container::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Modern Pill Segmented Tabs */
.gallery-tabs-nav {
    display: inline-flex;
    background: rgba(10, 12, 16, 0.65);
    padding: 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 2rem;
    gap: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.gallery-tab-item {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.gallery-tab-item:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.gallery-tab-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.gallery-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.gallery-title-text {
    font-size: 1.65rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.gallery-title-text span {
    font-weight: 600;
    color: #fb923c;
    background: rgba(234, 88, 12, 0.12);
    border: 1px solid rgba(234, 88, 12, 0.25);
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.88rem;
    margin-left: 0.75rem;
    letter-spacing: normal;
}

.btn-new-folder {
    background: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
    color: white;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.65rem 1.35rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-new-folder:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-new-folder:active {
    transform: translateY(0);
}

/* Horizontal Folder Cards Row */
.folders-horizontal-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.1rem;
    margin-bottom: 2rem;
}

.folder-box {
    background: rgba(22, 27, 34, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    height: 145px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    padding: 1rem 0.9rem;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.folder-box:hover {
    border-color: rgba(234, 88, 12, 0.4);
    background: rgba(30, 36, 46, 0.85);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.folder-box.active {
    border: 1.5px solid #ea580c;
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.16) 0%, rgba(26, 22, 20, 0.9) 100%);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.28), inset 0 0 12px rgba(234, 88, 12, 0.12);
}

.folder-box-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(234, 88, 12, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fb923c;
    margin-bottom: 0.75rem;
    transition: transform 0.25s;
}

.folder-box:hover .folder-box-icon {
    transform: scale(1.08);
}

.folder-box.active .folder-box-icon {
    background: rgba(234, 88, 12, 0.25);
    color: #ffedd5;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.folder-box-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-box-count {
    font-size: 0.76rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.folder-box.active .folder-box-count {
    color: #fdba74;
    background: rgba(234, 88, 12, 0.18);
}

.folder-delete-mini {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.folder-box:hover .folder-delete-mini {
    opacity: 1;
}

.folder-delete-mini:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: scale(1.1);
}

/* Drag & Drop Zone */
.drag-drop-zone {
    border: 2px dashed rgba(234, 88, 12, 0.35);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.04) 0%, rgba(15, 17, 23, 0.4) 100%);
    padding: 2.75rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
    border-color: #f97316;
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.1) 0%, rgba(234, 88, 12, 0.02) 100%);
    transform: scale(1.006);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.15), inset 0 0 15px rgba(234, 88, 12, 0.08);
}

.drop-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(234, 88, 12, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fb923c;
    margin-bottom: 1rem;
    transition: transform 0.25s ease;
}

.drag-drop-zone:hover .drop-icon-wrapper {
    transform: translateY(-4px);
    background: rgba(234, 88, 12, 0.22);
}

.drop-main-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.drop-sub-text {
    font-size: 0.85rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* File List Section */
.file-list-section {
    margin-top: 2rem;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.file-list-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    background: rgba(15, 18, 25, 0.6);
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-bulk-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-bulk-delete:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

/* File Rows */
.file-row-item {
    background: rgba(22, 27, 34, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.file-row-item:hover {
    background: rgba(30, 36, 46, 0.8);
    border-color: rgba(234, 88, 12, 0.3);
    transform: translateX(3px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.file-row-left {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-width: 0;
    flex: 1;
}

.file-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    accent-color: #ea580c;
    cursor: pointer;
}

.btn-play-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(234, 88, 12, 0.15);
    border: 1px solid rgba(234, 88, 12, 0.3);
    color: #fb923c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.btn-play-circle:hover {
    background: #ea580c;
    border-color: #ea580c;
    color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

.btn-play-circle.playing {
    background: #ea580c;
    border-color: #ea580c;
    color: white;
    box-shadow: 0 0 14px rgba(234, 88, 12, 0.5);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(234, 88, 12, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

.file-icon-badge {
    color: #ea580c;
    font-size: 1.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-text-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.2rem;
}

.file-title-line {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta-line {
    font-size: 0.76rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-meta-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-row-delete {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-row-delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
}

/* Custom Confirm Dialog */
.modal-sm {
    max-width: 420px;
}

.custom-confirm-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.confirm-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(218, 54, 51, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.8rem;
}

.confirm-icon-box.warning {
    background: rgba(210, 153, 34, 0.18);
}

.confirm-icon-box.primary {
    background: rgba(35, 134, 54, 0.18);
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #30363d;
    transition: .25s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* Amunisi Styles */
.amunisi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

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

.amunisi-card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
}

.amunisi-card.used {
    opacity: 0.6;
    border-style: dashed;
}

.amunisi-card.used:hover {
    opacity: 0.85;
    border-color: var(--border-color);
    transform: none;
}

.amunisi-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #090d13;
    overflow: hidden;
}

.amunisi-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.amunisi-badge-float {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.amunisi-body {
    padding: 0.9rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.amunisi-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.amunisi-footer {
    padding: 0.6rem 0.9rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.08);
}

.amunisi-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    gap: 0.35rem;
    user-select: none;
}

.amunisi-thumb-placeholder svg {
    color: var(--text-muted);
    opacity: 0.6;
}

.amunisi-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.amunisi-dropzone:hover {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.04);
}

.amunisi-dropzone.dragover {
    border-color: #ea580c;
    background: rgba(234, 88, 12, 0.08);
    transform: scale(1.01);
}

.amunisi-dropzone-icon {
    font-size: 1.75rem;
    margin-bottom: 0.15rem;
}

/* Time Slot Styles */
.timeslot-badge {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    background: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(56, 139, 253, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Description Items inside Playlist Modal */
.desc-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.desc-item-text {
    white-space: pre-wrap;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-primary);
    flex: 1;
}

/* ==========================================================================
   Job Sessions & Modern Scheduler Styles
   ========================================================================== */
.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.session-card:hover {
    border-color: rgba(56, 139, 253, 0.4);
}

.session-card.disabled {
    opacity: 0.65;
    border-style: dashed;
}

/* Header */
.session-card-header {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.session-card-title-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.session-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(56, 139, 253, 0.12);
    color: var(--info);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.session-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.session-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.session-badge-pill.quota {
    background: rgba(56, 139, 253, 0.1);
    color: #58a6ff;
    border-color: rgba(56, 139, 253, 0.3);
}

.session-badge-pill.progress-active {
    background: rgba(46, 160, 67, 0.12);
    color: #3fb950;
    border-color: rgba(46, 160, 67, 0.3);
}

.session-badge-pill.progress-full {
    background: rgba(210, 153, 34, 0.12);
    color: #d29922;
    border-color: rgba(210, 153, 34, 0.3);
}

.session-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.session-divider {
    width: 1px;
    height: 18px;
    background: var(--border-color);
}

/* Quick Add Toolbar */
.session-quick-add {
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.session-quick-add-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.session-quick-add-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.session-time-input {
    width: 110px;
    height: 34px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-align: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0 0.5rem;
}

.session-time-input:focus {
    border-color: var(--info);
    outline: none;
}

.quick-time-chips {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.time-chip-btn {
    padding: 0.22rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-chip-btn:hover {
    border-color: var(--info);
    color: #58a6ff;
    background: rgba(56, 139, 253, 0.1);
}

/* Card Body & Slots Grid */
.session-card-body {
    padding: 1.25rem;
}

.session-slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.session-slots-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.session-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}

.slot-card {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 94px;
    box-sizing: border-box;
    transition: all 0.18s ease;
}

.slot-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(56, 139, 253, 0.35);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.slot-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-time-display {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: #58a6ff;
}

.slot-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1;
    transition: all 0.15s ease;
}

.slot-delete-btn:hover {
    background: rgba(218, 54, 51, 0.15);
    color: var(--danger);
}

.slot-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.5rem;
}

.slot-status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.slot-status-pill.done {
    background: rgba(46, 160, 67, 0.15);
    color: #3fb950;
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.slot-status-pill.waiting {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.slot-switch-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.slot-switch-wrap .switch {
    transform: scale(0.8);
    transform-origin: right center;
}

.slot-switch-wrap .switch-label {
    font-size: 0.75rem;
    font-weight: 600;
}



