/* RR GROUP - Premium Dark Theme CSS Stylesheet */

:root {
    --bg-color: #09090b;
    --surface: #101014;
    --card: #16161c;
    --card-hover: #1e1e26;
    --accent: #d4af37; /* Premium Gold */
    --accent-rgb: 212, 175, 55;
    --accent-glow: rgba(212, 175, 55, 0.12);
    --border: #22222a;
    --border-focus: #3a3a46;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.1);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --sidebar-width: 260px;
    --header-height: 70px;
    --font: 'Outfit', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Auth Login Page Layout */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

.login-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.login-logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item {
    margin-bottom: 8px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-link i {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-link:hover, .menu-item.active .menu-link {
    color: var(--text-primary);
    background-color: var(--card);
}

.menu-item.active .menu-link {
    border-left: 3px solid var(--accent);
    padding-left: 13px;
    color: var(--accent);
    background-color: var(--accent-glow);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    max-width: 140px;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--text-muted);
    font-size: 18px;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border: none;
}

.logout-btn:hover {
    color: var(--error);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    transition: var(--transition);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

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

.header-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-indicator-box {
    display: flex;
    align-items: center;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: var(--card);
    border: 1px solid var(--border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.active {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.inactive {
    background-color: var(--error);
    box-shadow: 0 0 8px var(--error);
}

/* Main Content Panel */
.main-content {
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: var(--transition);
    min-height: calc(100vh - var(--header-height));
    background-image: radial-gradient(circle at 90% 10%, rgba(212, 175, 55, 0.02) 0%, transparent 40%);
}

.tab-content {
    display: none;
}

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

/* Cards & Widgets Grid */
.grid-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.metric-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.metric-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: var(--accent);
    opacity: 0.35;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-trend {
    font-size: 11px;
    margin-top: 10px;
    color: var(--text-muted);
}

/* Dual Column Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

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

.panel-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 25px;
}

.panel-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Forms & UI Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background-color: var(--card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--card-hover);
    border-color: var(--border-focus);
}

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

.btn-danger:hover {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table-premium th {
    padding: 14px 16px;
    background-color: var(--card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table-premium td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.table-premium tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Modal Windows */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 30px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Graph Empty State */
.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

.chart-empty {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Event List Items */
.event-list {
    list-style: none;
}

.event-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.event-item:last-child {
    border-bottom: none;
}

.event-icon-box {
    margin-right: 12px;
    padding-top: 2px;
}

.event-icon-box.info { color: var(--accent); }
.event-icon-box.success { color: var(--success); }
.event-icon-box.danger { color: var(--error); }

.event-details {
    flex-grow: 1;
}

.event-title {
    font-size: 13px;
    font-weight: 500;
}

.event-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Image URLs Fields Queue Builder */
.url-queue-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.url-input-row {
    display: flex;
    gap: 8px;
}

/* System Guidance box card */
.guidance-box {
    background-color: rgba(212, 175, 55, 0.03);
    border: 1px dashed var(--accent);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.guidance-box h4 {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guidance-box p, .guidance-box ol {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.guidance-box ol {
    margin-left: 20px;
    margin-top: 5px;
}

/* Dynamic Notification system inside page */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    transform: translateY(20px);
    opacity: 0;
    animation: toast-in 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toast-in {
    to { transform: translateY(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.info { border-left: 4px solid var(--accent); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    .sidebar.active {
        left: 0;
    }
    .main-header {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .menu-toggle {
        display: block;
    }
    .status-indicator-box {
        display: none;
    }
}

/* Animations */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
.blink {
    animation: blink 1.5s infinite;
    color: var(--warning);
}

/* Custom Styles for Video Note Broadcast Feature */
.vn-dropzone-area {
    border: 2px dashed var(--accent);
    background-color: var(--surface);
    border-radius: 12px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.vn-dropzone-area:hover, .vn-dropzone-area.dragover {
    background-color: var(--card-hover);
    border-color: #f0c040;
    box-shadow: 0 0 15px var(--accent-glow);
}
.vn-dropzone-area p {
    font-size: 13px;
    color: var(--text-secondary);
}
.vn-file-info-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
}
