:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --sidebar: #111827;
    --sidebar-hover: #1f2937;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #dc2626;
    --success: #16a34a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

/* SIDEBAR */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: var(--sidebar);
    color: #fff;
    z-index: 1000;
    transition: transform .25s ease;
}

.brand {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 21px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand span {
    color: #818cf8;
}

.nav-section {
    padding: 20px 12px 8px;
    color: #9ca3af;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 3px 10px;
    padding: 11px 13px;
    border-radius: 8px;
    color: #d1d5db;
    font-size: 14px;
    transition: .15s;
}

.nav-item:hover,
.nav-item.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

/* MAIN */

.main {
    margin-left: 250px;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.mobile-menu {
    display: none;
    border: 0;
    background: none;
    font-size: 24px;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.content {
    padding: 28px;
    max-width: 1500px;
    margin: auto;
}

.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    margin: 0 0 5px;
    font-size: 26px;
}

.page-title p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* CARDS */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

/* FORMS */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

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

.form-group.full {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.form-control,
select,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"] {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    outline: none;
}

.form-control:focus,
select:focus,
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.help-text {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

/* BUTTON */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 15px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

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

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-sm {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 12px;
}

/* TABLE */

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    text-align: left;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table tr:last-child td {
    border-bottom: 0;
}


/* HISTORY DATA TABLE */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tr:last-child td {
    border-bottom: 0;
}


.badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-primary {
    background: #e0e7ff;
    color: #4338ca;
}

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

/* ALERT */

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* OVERLAY */

.sidebar-overlay {
    display: none;
}

/* MOBILE */

@media (max-width: 900px) {

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 999;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main {
        margin-left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .topbar {
        padding: 0 18px;
    }

    .content {
        padding: 20px 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }

    .page-title h1 {
        font-size: 22px;
    }

    .user-info .username {
        display: none;
    }

    .card-body {
        padding: 15px;
    }
}

.progress {
    width: 100%;
    height: 7px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width .3s ease;
}

.stat-detail {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.storage-progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.storage-progress.large {
    height: 12px;
    margin-top: 20px;
}

.storage-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width .3s ease;
}

.storage-warning {
    background: #f59e0b;
}

.storage-danger {
    background: #dc2626;
}

.user-storage-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
}

.storage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.storage-number {
    font-size: 16px;
    font-weight: 700;
}

.storage-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 600px) {

    .storage-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .storage-number {
        font-size: 14px;
    }

}

/* Dashboard user - 3 kolom */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Storage user agar tidak terlalu melebar */
.user-storage-card {
    max-width: 100%;
    box-sizing: border-box;
}

/* Desktop */
@media (min-width: 768px) {
    .user-storage-card {
        padding: 22px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-storage-card {
        padding: 16px;
    }

    .storage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .storage-number {
        margin-top: 8px;
    }
}

/* ================= CHANNELS ================= */

.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.channel-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
}

.channel-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f9;
    font-size: 20px;
}

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

.channel-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.channel-id {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
    word-break: break-all;
}

.channel-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    color: var(--muted);
    margin: 0;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: 0;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.alert.success {
    background: #ecfdf5;
    color: #047857;
}

.alert.error {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 900px) {

    .channel-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {

    .channel-card {
        flex-direction: column;
    }

    .channel-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .channel-actions .btn {
        flex: 1;
        text-align: center;
    }

}

/* =========================
   ASSETS
   ========================= */

.assets-stats {
    margin-bottom: 24px;
}

.asset-upload-form {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
}

.asset-upload-form .form-group {
    margin-bottom: 0;
}

.form-help {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asset-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.asset-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
    font-size: 20px;
}

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

.asset-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.asset-actions {
    flex: 0 0 auto;
}

.empty-state {
    padding: 45px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state h3 {
    margin: 0 0 7px;
    color: var(--text);
}

.empty-state p {
    margin: 0;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

@media (max-width: 767px) {

    .asset-upload-form {
        grid-template-columns: 1fr;
    }

    .asset-upload-form .form-group {
        margin-bottom: 0;
    }

    .asset-item {
        align-items: flex-start;
    }

    .asset-actions {
        margin-left: auto;
    }

    .asset-name {
        white-space: normal;
        word-break: break-word;
    }

}

/* =========================
   PLAYLIST GENERATOR
   ========================= */

.playlist-page-header {
    margin-bottom: 22px;
}

.playlist-page-header h1 {
    margin-bottom: 6px;
}

.playlist-page-header p {
    margin: 0;
    color: var(--muted);
}

.playlist-generator-card {
    overflow: hidden;
}

.playlist-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.playlist-section-header h2 {
    margin: 0 0 5px;
}

.playlist-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.channel-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.channel-search-wrap {
    position: relative;
    margin: 20px 0 10px;
}

.channel-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 21px;
    line-height: 1;
    pointer-events: none;
}

.channel-search {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px 11px 39px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.channel-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .08);
}

.channel-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.channel-row {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.channel-row:last-child {
    border-bottom: 0;
}

.channel-choice {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    box-sizing: border-box;
    cursor: pointer;
}

.channel-choice:hover {
    background: #f8fafc;
}

.channel-choice input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--primary);
}

.channel-name-wrap {
    min-width: 0;
}

.channel-name-link {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.channel-name-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.channel-name-disabled {
    color: var(--muted);
}

.channel-result-info {
    min-height: 18px;
    padding: 8px 2px 0;
    color: var(--muted);
    font-size: 12px;
}

.channel-empty,
.channel-no-data {
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

.channel-empty {
    border: 1px solid var(--border);
    border-radius: 10px;
}

.channel-no-data h3 {
    margin: 0 0 6px;
    color: var(--text);
}

.channel-no-data p {
    margin: 0;
}

.selected-channel {
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 9px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
}

.selected-check {
    font-weight: 700;
}

.coming-soon-box {
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 9px;
    color: var(--muted);
    text-align: center;
}

.playlist-generate-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    margin-bottom: 30px;
}

.btn-generate {
    min-height: 44px;
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 767px) {

    .playlist-page-header {
        margin-bottom: 16px;
    }

    .playlist-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .channel-count {
        align-self: flex-start;
    }

    .channel-choice {
        padding: 13px 12px;
    }

    .channel-name-link {
        font-size: 14px;
        word-break: break-word;
    }

    .playlist-generate-actions {
        display: block;
    }

    .btn-generate {
        width: 100%;
    }

}

/* =========================
   PLAYLIST CONTENT
   ========================= */

.content-upload-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.content-upload-section:last-of-type {
    border-bottom: 0;
}

.content-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.content-title h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.content-title p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.content-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 9px;
    font-size: 19px;
    flex: 0 0 40px;
}

.upload-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-file-name {
    flex: 1;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.local-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.local-file-item {
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 7px;
    color: var(--text);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thumbnail-preview {
    margin-top: 12px;
}

.thumbnail-preview img {
    display: block;
    width: 150px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.drive-import-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 9px;
}

.drive-import-box strong {
    font-size: 13px;
}

.drive-import-box p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}


/* =========================
   PLAYLIST SETTINGS
   ========================= */

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    gap: 20px;
}

.privacy-options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.privacy-option {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    cursor: pointer;
}

.privacy-option input {
    margin: 0;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 767px) {

    .upload-inline-form {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .upload-inline-form .btn,
    .upload-inline-form label {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .selected-file-name {
        padding: 2px 0;
        white-space: normal;
        word-break: break-word;
    }

    .drive-import-box {
        flex-direction: column;
        align-items: stretch;
    }

    .drive-import-box .btn {
        width: 100%;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .privacy-options {
        flex-direction: column;
        gap: 12px;
    }

}


/* ================================
   Playlist Generator Form
================================ */

.playlist-generator-card,
.playlist-generator-card *,
.card {
    box-sizing: border-box;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #111827;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.10);
}

.form-group textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.5;
}

.form-help {
    margin-top: 7px;
    font-size: 12px;
    color: #6b7280;
}

.upload-inline-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.selected-file-name {
    flex: 1;
    min-width: 180px;
    color: #6b7280;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-upload-section {
    padding: 22px 24px;
    border-top: 1px solid #eef0f4;
}

.content-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.content-title h3 {
    margin: 0;
    font-size: 16px;
    color: #111827;
}

.content-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.content-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f3f4f6;
    flex-shrink: 0;
}

.local-file-list {
    margin-top: 12px;
}

.local-file-item {
    padding: 7px 10px;
    margin-top: 5px;
    border-radius: 6px;
    background: #f8fafc;
    color: #4b5563;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thumbnail-preview {
    margin-top: 12px;
}

.thumbnail-preview img {
    max-width: 180px;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.drive-import-box {
    margin: 20px 24px 24px;
    padding: 18px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fafafa;
}

.drive-import-box strong {
    font-size: 14px;
}

.drive-import-box p {
    margin: 5px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.privacy-options {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.privacy-option {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    font-weight: 400 !important;
    cursor: pointer;
}

.playlist-generate-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    margin-bottom: 30px;
}

.btn-generate {
    min-height: 46px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 767px) {

    .content-upload-section {
        padding: 18px 16px;
    }

    .upload-inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .upload-inline-form .btn,
    .upload-inline-form label.btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .selected-file-name {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .drive-import-box {
        margin: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .drive-import-box .btn {
        width: 100%;
    }

    .privacy-options {
        gap: 14px;
    }

    .playlist-generate-actions {
        margin: 16px 0 24px;
    }

    .btn-generate {
        width: 100%;
    }

    .thumbnail-preview img {
        max-width: 100%;
    }
}



/* Generate button - disabled state */
button.btn-generate:disabled {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #ffffff !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

.global-monitor{display:flex;align-items:center;gap:8px}
.monitor-item{display:flex;align-items:center;gap:7px;padding:7px 10px;background:#f8fafc;border:1px solid var(--border);border-radius:8px;white-space:nowrap}
.monitor-label{font-size:11px;color:var(--muted);font-weight:600}
.monitor-item strong{font-size:12px;color:var(--text);min-width:38px;text-align:right}
@media(max-width:900px){
.global-monitor{gap:5px}
.monitor-item{padding:6px 7px}
.monitor-label{display:none}
.monitor-item strong{min-width:34px;font-size:11px}
}
@media(max-width:600px){
.global-monitor{gap:4px}
.monitor-item{padding:5px 6px}
}


/* =========================================================
   SCHEDULED PUBLISH
   ========================================================= */

.scheduled-fields {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.scheduled-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.scheduled-fields .form-group {
    margin-bottom: 0;
}

.scheduled-fields input[type="date"],
.scheduled-fields input[type="time"] {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .scheduled-field-grid {
        grid-template-columns: 1fr;
    }
}


/* Scheduled fields visibility */
.scheduled-fields[hidden] {
    display: none;
}


/* =========================================================
   YOUTUBE SETTINGS
   ========================================================= */

.youtube-settings {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.youtube-setting-group {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.setting-title {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.youtube-setting-group .privacy-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.youtube-setting-group .privacy-option {
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.youtube-setting-group .privacy-option:hover {
    border-color: #94a3b8;
}

.youtube-setting-group .form-help {
    margin-top: 10px;
}

@media (max-width: 700px) {
    .youtube-setting-group {
        padding: 12px;
    }

    .youtube-setting-group .privacy-option {
        line-height: 1.45;
    }
}

/* =========================================================
   JOB STATUS BADGES
   ========================================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 7px;
}

/* Menunggu / Draft */
.status-draft,
.status-queued,
.status-retry-wait {
    color: #92400e;
    background: #fef3c7;
}

/* Proses */
.status-preparing,
.status-playlist-generating,
.status-rendering,
.status-ready-to-upload {
    color: #1d4ed8;
    background: #dbeafe;
}

/* Upload */
.status-uploading {
    color: #6d28d9;
    background: #ede9fe;
}

/* Responsive */
@media (max-width: 700px) {
    .status-badge {
        padding: 5px 8px;
        font-size: 11px;
    }
}


/* =========================================================
   FILE MANAGER
   ========================================================= */

.storage-total {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.file-manager-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.file-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.file-manager-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.file-manager-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    background: #fef2f2;
    color: #dc2626;
}

.file-manager-details {
    min-width: 0;
}

.file-manager-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 7px;
    overflow-wrap: anywhere;
}

.file-manager-meta {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.file-manager-meta strong {
    color: #374151;
}

.file-manager-action {
    flex-shrink: 0;
}

.file-manager-action form {
    margin: 0;
}

.file-manager-action .btn-danger {
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
}

.status-failed {
    background: #fef2f2;
    color: #b91c1c;
}

.status-cancelled {
    background: #f3f4f6;
    color: #4b5563;
}

.status-test_completed {
    background: #fff7ed;
    color: #c2410c;
}

.empty-state {
    text-align: center;
    padding: 55px 20px;
}

.empty-state-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    font-size: 24px;
    font-weight: 700;
}

.empty-state h3 {
    margin: 0 0 6px;
}

.empty-state p {
    margin: 0;
    color: #6b7280;
}

@media (max-width: 700px) {

    .storage-total {
        font-size: 17px;
    }

    .file-manager-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }

    .file-manager-action {
        width: 100%;
    }

    .file-manager-action .btn {
        width: 100%;
    }

    .file-manager-title {
        font-size: 15px;
    }

    .file-manager-meta {
        font-size: 12px;
    }
}
