/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    background: #f3f4f6;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
    background: #111827;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 14px;
}

.topbar-logo {
    font-weight: 600;
    font-size: 15px;
}

.topbar-link {
    color: #facc15;
    text-decoration: none;
    font-size: 13px;
}

.topbar-link:hover {
    text-decoration: underline;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1100px;
    margin: 10px auto;
    padding: 0 10px;
}

/* ============================================================
   CARD COMPONENTS
   ============================================================ */
.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    margin-bottom: 10px;
}

.card-login {
    max-width: 320px;
    width: 100%;
}

.card-title {
    font-size: 16px;
    margin: 0 0 2px;
    font-weight: 600;
}

.card-subtitle {
    margin: 0 0 10px;
    font-size: 12px;
    color: #6b7280;
}

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

/* ============================================================
   CENTER WRAPPER (LOGIN)
   ============================================================ */
.center-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-label {
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
    color: #4b5563;
}

.form-input {
    width: 100%;
    padding: 6px 8px;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.form-inline .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.form-group {
    flex: 1;
    min-width: 170px;
}

.form-group-wide {
    flex: 2;
    min-width: 260px;
}

.form-actions {
    margin-top: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border 0.15s ease;
}

.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-outline {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background: #f3f4f6;
}

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

.btn-full {
    width: 100%;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 12px;
    margin-bottom: 8px;
}

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

/* ============================================================
   TABLE STYLING
   ============================================================ */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 6px 8px;
    background: #f8f9fa;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table td {
    padding: 5px 8px;
    font-size: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.table tr:hover td {
    background: #f9fafb;
}

/* Column Widths */
.col-play {
    width: 280px;  /* Expanded width */
}

.col-download {
    width: 120px;
}

.mono {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    padding: 8px;
    font-size: 13px;
    text-align: center;
    color: #6b7280;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 11px;
}

/* ============================================================
   HINT
   ============================================================ */
.hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

/* ============================================================
   AUDIO PLAYER
   ============================================================ */
.audio-player {
    width: 100%;
    max-width: 260px;  /* Wider player */
    height: 28px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.page-link {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}

.page-link:hover {
    background: #e5e7eb;
}

.page-link.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    cursor: default;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 6px 12px;
    }

    .form-inline .form-row {
        flex-direction: column;
    }

    .card {
        padding: 10px 12px;
    }
}

