/* Home Cinema - Admin Panel Styles */

:root {
    --primary: #4e73df;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fc;
    --dark: #5a5c69;
    --sidebar-width: 14rem;
    --topbar-height: 4.375rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
    margin: 0;
    padding: 0;
}

/* ====== Wrapper Layout ====== */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ====== Sidebar ====== */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width 0.15s ease;
}

#sidebar .sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    padding: 0 1rem;
}

#sidebar .sidebar-brand i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

#sidebar hr {
    margin: 0 1rem;
    border-color: rgba(255, 255, 255, 0.15);
}

#sidebar .nav-item {
    position: relative;
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease, background 0.15s ease;
}

#sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link.active {
    color: #fff;
    font-weight: 700;
}

#sidebar .nav-link i {
    font-size: 0.85rem;
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

#sidebar .sidebar-heading {
    padding: 0 1rem;
    font-weight: 800;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.13rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* ====== Content Wrapper ====== */
#content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    background-color: #f8f9fc;
}

/* ====== Topbar ====== */
#topbar {
    height: var(--topbar-height);
    background-color: #fff;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 99;
}

#topbar .topbar-left {
    display: flex;
    align-items: center;
}

#topbar .sidebar-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    color: var(--secondary);
    cursor: pointer;
    border-radius: 50%;
    margin-right: 1rem;
}

#topbar .sidebar-toggle:hover {
    background: #eaecf4;
}

#topbar .page-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark);
    margin: 0;
}

#topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#topbar .topbar-divider {
    width: 0;
    border-right: 1px solid #e3e6f0;
    height: 2.375rem;
    margin: 0 1rem;
}

#topbar .nav-item {
    position: relative;
}

#topbar .nav-link {
    color: var(--secondary);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.15s;
}

#topbar .nav-link:hover {
    color: var(--primary);
}

#topbar .badge-counter {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
}

/* ====== Main Content ====== */
#main-content {
    flex: 1;
    padding: 1.5rem;
}

/* ====== Footer ====== */
#footer {
    padding: 1rem 1.5rem;
    background: #fff;
    color: var(--secondary);
    font-size: 0.8rem;
    border-top: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ====== Cards ====== */
.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border-radius: 0.35rem;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header i {
    margin-right: 0.5rem;
}

.card-body {
    padding: 1.25rem;
}

/* ====== Stat Cards ====== */
.stat-card {
    border-left: 0.25rem solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-card.border-primary {
    border-left-color: var(--primary);
}

.stat-card.border-success {
    border-left-color: var(--success);
}

.stat-card.border-info {
    border-left-color: var(--info);
}

.stat-card.border-warning {
    border-left-color: var(--warning);
}

.stat-card .stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-icon {
    font-size: 2rem;
    color: #dddfeb;
}

/* ====== Tables ====== */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--secondary);
    border-top: none;
    border-bottom: 2px solid #e3e6f0;
    padding: 0.75rem 1rem;
    background: #f8f9fc;
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    border-color: #e3e6f0;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* ====== Buttons ====== */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

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

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ====== Status Badges ====== */
.badge {
    font-weight: 600;
    padding: 0.35rem 0.65rem;
}

.status-ready {
    background-color: var(--success) !important;
}

.status-pending {
    background-color: var(--secondary) !important;
}

.status-transcoding {
    background-color: var(--info) !important;
}

.status-uploading {
    background-color: var(--warning) !important;
    color: #000;
}

.status-error {
    background-color: var(--danger) !important;
}

/* ====== Progress Bars ====== */
.progress {
    height: 1rem;
    border-radius: 0.35rem;
    background-color: #eaecf4;
}

.progress-bar {
    font-size: 0.65rem;
    font-weight: 600;
    transition: width 0.3s ease;
}

/* ====== Upload Zone ====== */
.upload-zone {
    border: 2px dashed #d1d3e2;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8f9fc;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(78, 115, 223, 0.05);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

/* ====== Modals ====== */
.modal-header {
    background: linear-gradient(180deg, var(--primary) 10%, #224abe 100%);
    color: #fff;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ====== Breadcrumb ====== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary);
}

/* ====== Toast Notifications ====== */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1100;
}

/* ====== Quick Actions ====== */
.quick-actions .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ====== WebSocket Status ====== */
.ws-status {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
}

.ws-status .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.ws-status.connected .indicator {
    background: var(--success);
}

.ws-status.disconnected .indicator {
    background: var(--danger);
}

/* ====== Custom Scrollbar ====== */
::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* ====== Mobile Responsive ====== */
@media (max-width: 768px) {
    #sidebar {
        width: 0;
        overflow: hidden;
    }

    #sidebar.show {
        width: var(--sidebar-width);
    }

    #content-wrapper {
        margin-left: 0;
    }

    #main-content {
        padding: 1rem;
    }
}

/* ====== Animations ====== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}