:root {
    --agtv-bg: #05060b;
    --agtv-card-bg: #0b0f19;
    --agtv-border-subtle: #1a2233;
    --agtv-gold: #efe110;
    --agtv-text-main: #f5f5f7;
    --agtv-text-muted: #9ca3af;
    --agtv-accent-blue: #303181;
}

/* ====== Schedule components (same as before, trimmed for brevity but functional) ====== */

.agtv-schedule-wrapper {
    background: var(--agtv-bg);
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--agtv-border-subtle);
    color: var(--agtv-text-main);
    font-size: 14px;
    overflow: hidden;
}

.agtv-schedule-week .agtv-schedule-header-row {
    display: grid;
    grid-template-columns: 120px repeat(7, minmax(0, 1fr));
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.agtv-schedule-header-cell {
    padding: 0.75rem 1rem;
    background: #111827;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #1f2937;
}

.agtv-schedule-corner {
    background: transparent;
    border: none;
    align-items: flex-start;
    justify-content: center;
    padding-left: 0;
}

.agtv-schedule-day-label {
    font-weight: 600;
    color: var(--agtv-text-main);
}

.agtv-schedule-day-date {
    font-size: 12px;
    color: var(--agtv-text-muted);
}

.agtv-schedule-header-row .agtv-schedule-header-cell:nth-child(2) {
    background: var(--agtv-gold);
    color: #000;
}

.agtv-schedule-grid {
    display: grid;
    grid-template-columns: 120px repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    position: relative;
}

.agtv-schedule-time-column {
    display: flex;
    flex-direction: column;
}

.agtv-schedule-time-cell {
    height: calc(1600px / 48);
    border-bottom: 1px solid rgba(75, 85, 99, 0.4);
    font-size: 11px;
    color: var(--agtv-text-muted);
    display: flex;
    align-items: flex-start;
}

.agtv-schedule-time-cell span {
    transform: translateY(-50%);
}

.agtv-schedule-day-column {
    position: relative;
    height: 1600px;
    border-left: 1px solid rgba(55, 65, 81, 0.5);
    border-right: 1px solid rgba(55, 65, 81, 0.1);
}

.agtv-schedule-program-block {
    position: absolute;
    left: 8px;
    right: 8px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    backdrop-filter: blur(4px);
}

.agtv-schedule-program-block:hover {
    border-color: var(--agtv-gold);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

.agtv-schedule-program-title {
    font-weight: 600;
    font-size: 13px;
}

.agtv-schedule-program-time {
    font-size: 11px;
    color: var(--agtv-text-muted);
    margin-top: 2px;
}

.agtv-schedule-day-heading {
    color: var(--agtv-gold);
    margin-bottom: 1rem;
    font-size: 18px;
}

.agtv-schedule-day-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.agtv-schedule-day-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--agtv-card-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--agtv-border-subtle);
}

.agtv-schedule-day-time {
    font-weight: 500;
    margin-right: 1rem;
    color: var(--agtv-gold);
    min-width: 100px;
}

.agtv-schedule-day-title {
    font-weight: 600;
}

.agtv-schedule-day-channel {
    font-size: 12px;
    color: var(--agtv-text-muted);
}

.agtv-today-card {
    background: var(--agtv-card-bg);
    border-radius: 1.25rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid var(--agtv-border-subtle);
    color: var(--agtv-text-main);
}

.agtv-today-heading {
    font-size: 20px;
    margin: 0 0 1rem 0;
    color: var(--agtv-gold);
}

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

.agtv-today-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #020617;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid #111827;
}

.agtv-today-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agtv-today-title {
    font-weight: 600;
    font-size: 14px;
}

.agtv-today-time {
    font-size: 12px;
    color: var(--agtv-text-muted);
}

.agtv-today-channel {
    font-size: 11px;
    color: var(--agtv-text-muted);
}

.agtv-today-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid;
}

.agtv-status-completed {
    color: #9ca3af;
    border-color: #4b5563;
}

.agtv-status-now {
    color: #f97373;
    border-color: #f97373;
}

.agtv-status-upcoming {
    color: var(--agtv-accent-blue);
    border-color: var(--agtv-accent-blue);
}

.agtv-today-empty {
    color: var(--agtv-text-muted);
    margin: 0;
}

/* Modal */
.agtv-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}
.agtv-modal-backdrop.is-visible {
    display: flex;
}
.agtv-modal {
    background: #020617;
    border-radius: 1rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid #1f2937;
    max-width: 420px;
    width: 100%;
    color: #f9fafb;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}
.agtv-modal-title {
    margin: 0 0 0.5rem 0;
    font-size: 18px;
}
.agtv-modal-time {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}
.agtv-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
}

/* ====== Login ====== */

.agtv-auth-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.agtv-auth-card {
    background: var(--agtv-bg);
    border-radius: 1.5rem;
    padding: 2rem 2.5rem;
    border: 1px solid var(--agtv-border-subtle);
    max-width: 420px;
    width: 100%;
}

.agtv-auth-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.agtv-auth-logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--agtv-gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.agtv-auth-title {
    font-size: 18px;
    font-weight: 600;
}

.agtv-auth-subtitle {
    font-size: 13px;
    color: var(--agtv-text-muted);
}

.agtv-auth-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fecaca;
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
    font-size: 13px;
    margin-bottom: 1rem;
}

.agtv-auth-form .agtv-field {
    margin-bottom: 1rem;
}

.agtv-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 0.25rem;
    color: var(--agtv-text-muted);
}

.agtv-field input,
.agtv-field select,
.agtv-field textarea {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #1f2937;
    background: #020617;
    padding: 0.55rem 0.8rem;
    color: var(--agtv-text-main);
    font-size: 14px;
}

.agtv-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 13px;
}

.agtv-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--agtv-text-muted);
}

.agtv-auth-link {
    color: var(--agtv-accent-blue);
    text-decoration: none;
}

.agtv-auth-button,
.agtv-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, var(--agtv-gold), #fff7a1);
    color: #000;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.agtv-auth-button:hover,
.agtv-btn-primary:hover {
    filter: brightness(1.05);
}

/* ====== Dashboard ====== */

.agtv-dashboard-wrapper {
    padding: 2rem 1rem;
}

.agtv-dashboard-shell {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--agtv-bg);
    border-radius: 1.5rem;
    border: 1px solid var(--agtv-border-subtle);
    padding: 1.5rem 1.75rem 1.75rem;
}

.agtv-dashboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.agtv-dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.agtv-dashboard-logo-circle {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--agtv-gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

.agtv-dashboard-title {
    font-size: 18px;
    font-weight: 600;
}

.agtv-dashboard-subtitle {
    font-size: 12px;
    color: var(--agtv-text-muted);
}

.agtv-dashboard-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 13px;
}

.agtv-dashboard-logout {
    color: var(--agtv-text-muted);
    text-decoration: none;
    font-size: 12px;
}

.agtv-dashboard-nav {
    display: inline-flex;
    background: #020617;
    border-radius: 999px;
    padding: 0.25rem;
    border: 1px solid #1f2937;
    margin-bottom: 1rem;
}

.agtv-dashboard-tab {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 13px;
    color: var(--agtv-text-muted);
    text-decoration: none;
}

.agtv-dashboard-tab.is-active {
    background: var(--agtv-gold);
    color: #000;
}

.agtv-dashboard-message {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #bbf7d0;
    font-size: 13px;
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
}

.agtv-dashboard-content {
    margin-top: 0.75rem;
}

.agtv-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1rem;
}

.agtv-dashboard-grid-vertical {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.agtv-card {
    background: var(--agtv-card-bg);
    border-radius: 1rem;
    border: 1px solid var(--agtv-border-subtle);
    padding: 1rem 1.1rem 1.1rem;
}

.agtv-card-header {
    margin-bottom: 0.75rem;
}

.agtv-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.agtv-form .agtv-field {
    margin-bottom: 0.75rem;
}

.agtv-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.agtv-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 360px;
    overflow-y: auto;
}

.agtv-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.75rem;
    border: 1px solid #111827;
    padding: 0.5rem 0.7rem;
    font-size: 13px;
    background: #020617;
}

.agtv-list-title {
    font-weight: 600;
}

.agtv-list-subtitle {
    font-size: 12px;
    color: var(--agtv-text-muted);
}

.agtv-schedule-mini {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.agtv-schedule-mini-day-label {
    font-size: 12px;
    color: var(--agtv-text-muted);
    margin-bottom: 0.25rem;
}

.agtv-schedule-mini-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid #111827;
    padding: 0.45rem 0.6rem;
    background: #020617;
    font-size: 12px;
}

.agtv-schedule-mini-time {
    color: var(--agtv-gold);
    min-width: 42px;
}

.agtv-schedule-mini-title {
    font-weight: 600;
}

.agtv-schedule-mini-channel {
    color: var(--agtv-text-muted);
    font-size: 11px;
}

/* Responsive */
@media (max-width: 1024px) {
    .agtv-schedule-week .agtv-schedule-header-row,
    .agtv-schedule-grid {
        overflow-x: auto;
    }
    .agtv-schedule-week .agtv-schedule-header-row {
        grid-template-columns: 100px repeat(7, 130px);
    }
    .agtv-schedule-grid {
        grid-template-columns: 100px repeat(7, 130px);
    }
    .agtv-dashboard-grid,
    .agtv-dashboard-grid-vertical {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .agtv-schedule-wrapper {
        padding: 1rem;
    }
    .agtv-schedule-day-time {
        min-width: 80px;
    }
    .agtv-dashboard-shell {
        padding: 1.2rem 1rem 1.25rem;
    }
    .agtv-dashboard-top {
        flex-direction: column;
        align-items: flex-start;
    }
}
