/* ===== MODERN IPTV PLATFORM - PROFESSIONAL LIGHT THEME ===== */

/* CSS Custom Properties */
:root {
    /* Primary Brand Colors */
    --primary: #2563eb;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-500: #2563eb;
    --primary-600: #1d4ed8;
    --primary-700: #1e40af;
    --primary-900: #1e3a8a;

    /* Semantic Colors */
    --success: #10b981;
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;

    --warning: #f59e0b;
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --danger: #ef4444;
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    --info: #3b82f6;
    --info-50: #eff6ff;
    --info-100: #dbeafe;
    --info-500: #3b82f6;
    --info-600: #2563eb;

    /* Neutral Colors - Light Theme */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Backgrounds */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --bg-elevated: var(--white);
    --bg-overlay: rgba(0, 0, 0, 0.15);

    /* Text Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-700);
    --text-tertiary: var(--gray-500);
    --text-muted: var(--gray-400);
    --text-on-primary: var(--white);

    /* Borders */
    --border-primary: var(--gray-200);
    --border-secondary: var(--gray-300);
    --border-focus: var(--primary-300);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --sidebar-width: 280px;
    --topbar-height: 80px;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ===== LAYOUT ===== */
.app {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    padding: 0.875rem;
    box-shadow: var(--shadow-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
    border-color: var(--primary-200);
    background: var(--primary-50);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition);
}

/* Add subtle blur only if supported, otherwise use darker background */
@supports (backdrop-filter: blur(1px)) {
    .mobile-overlay {
        background: rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(1px);
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .mobile-overlay {
        background: rgba(0, 0, 0, 0.25);
    }
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== SIDEBAR - DARK BUSINESS STYLE ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-right: none;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    transition: var(--transition-slow);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.logo-icon {
    width: 2.75rem;
    height: 2.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-content {
    flex: 1;
    padding: 1.25rem 0;
    overflow-y: auto;
}

.sidebar-nav {
    list-style: none;
}

.nav-section {
    padding: 1rem 1.5rem 0.5rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-item {
    margin: 0.125rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

.nav-icon {
    width: 1.25rem;
    display: flex;
    justify-content: center;
    color: #64748b;
    transition: var(--transition);
    font-size: 1rem;
}

.nav-text {
    font-size: 0.875rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.nav-link:hover .nav-icon {
    color: #e2e8f0;
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #ffffff;
    font-weight: 600;
}

.nav-item.active .nav-link .nav-icon {
    color: #3b82f6;
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 3px;
    background: #3b82f6;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.sidebar-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.2;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TOP BAR - CLEAN BUSINESS ===== */
.topbar {
    height: var(--topbar-height);
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.2;
}

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

.btn-create {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-action {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: var(--transition);
}

.topbar-action:hover {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    pointer-events: none;
}

.notification {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    pointer-events: auto;
    transform: translateX(100%);
    transition: var(--transition-slow);
}

.notification.show {
    display: flex;
    transform: translateX(0);
}

.notification.success {
    border-color: var(--success-200);
    background: var(--success-50);
}

.notification.error {
    border-color: var(--danger-200);
    background: var(--danger-50);
}

.notification.warning {
    border-color: var(--warning-200);
    background: var(--warning-50);
}

.notification.info {
    border-color: var(--info-200);
    background: var(--info-50);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.notification-icon {
    font-size: 1.25rem;
}

.notification.success .notification-icon { color: var(--success); }
.notification.error .notification-icon { color: var(--danger); }
.notification.warning .notification-icon { color: var(--warning); }
.notification.info .notification-icon { color: var(--info); }

.notification-message {
    font-weight: 500;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.notification-close:hover {
    background: var(--gray-200);
    color: var(--text-secondary);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    flex: 1;
    padding: 2rem 2.5rem;
    animation: fadeIn 0.25s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ===== SECTIONS ===== */
.section-header {
    margin-bottom: 1.75rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 16px 0 0 16px;
}

.stat-card.primary::before { background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%); }
.stat-card.success::before { background: linear-gradient(180deg, #10b981 0%, #059669 100%); }
.stat-card.warning::before { background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%); }
.stat-card.info::before { background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%); }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card.primary .stat-icon { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.stat-card.success .stat-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-card.warning .stat-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-card.info .stat-icon { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
}

.stat-trend.positive {
    color: #059669;
    background: #d1fae5;
}

.stat-trend.negative {
    color: #dc2626;
    background: #fee2e2;
}

.stat-trend.neutral {
    color: var(--text-tertiary);
    background: var(--gray-100);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.quick-action-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.quick-action-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    flex-shrink: 0;
}

.quick-action-icon.primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); }
.quick-action-icon.success { background: linear-gradient(135deg, var(--success), var(--success-600)); }
.quick-action-icon.info { background: linear-gradient(135deg, var(--info), var(--info-600)); }
.quick-action-icon.warning { background: linear-gradient(135deg, var(--warning), var(--warning-600)); }

.quick-action-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.quick-action-content p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ===== ACTIVITY FEED ===== */
.activity-feed {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin: 0 -0.75rem;
}

.activity-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 1.25rem;
}

.activity-item:first-child {
    padding-top: 1.25rem;
}

.activity-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.activity-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.activity-icon i {
    z-index: 1;
    position: relative;
}

.activity-icon.success { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.activity-icon.info { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.activity-icon.warning { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.activity-icon.error { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.activity-content {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.activity-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.activity-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.activity-time {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    letter-spacing: 0.01em;
    margin-top: 0.25rem;
}

/* ===== STREAMS GRID ===== */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.stream-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stream-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stream-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stream-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.stream-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-badge i {
    font-size: 0.5rem;
}

.status-badge.status-running {
    color: var(--success-600);
    background: var(--success-100);
    border: 1px solid var(--success-200);
}

.status-badge.status-stopped {
    color: var(--text-tertiary);
    background: var(--gray-100);
    border: 1px solid var(--border-primary);
}

.status-badge.status-error {
    color: var(--danger-600);
    background: var(--danger-100);
    border: 1px solid var(--danger-200);
}

.stream-card:has(.status-badge.status-running)::before { background: var(--success); }
.stream-card:has(.status-badge.status-stopped)::before { background: var(--gray-400); }
.stream-card:has(.status-badge.status-error)::before { background: var(--danger); }

.error-message {
    background: var(--danger-100);
    border: 1px solid var(--danger-200);
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--danger-700);
}

.error-message i {
    color: var(--danger-500);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.error-message span {
    flex: 1;
    line-height: 1.4;
}

.stream-info {
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    margin-bottom: 0.75rem;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row strong {
    min-width: 4rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.url-text {
    font-family: 'SFMono-Regular', 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    word-break: break-all;
}

.url-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--primary-50);
    color: var(--primary-600);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--primary-200);
}

.url-link:hover {
    background: var(--primary-100);
    color: var(--primary-700);
    border-color: var(--primary-300);
}

.stream-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
    justify-content: center;
    min-height: 2.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 2rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

.btn-secondary:hover {
    background: var(--gray-100);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: var(--success-600);
    border-color: var(--success-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
    border-color: var(--warning);
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
    background: var(--warning-600);
    border-color: var(--warning-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background: var(--danger-600);
    border-color: var(--danger-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-info {
    background: var(--info);
    color: var(--white);
    border-color: var(--info);
    box-shadow: var(--shadow-sm);
}

.btn-info:hover {
    background: var(--info-600);
    border-color: var(--info-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ===== MODAL ===== */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    z-index: 2000;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-backdrop.active {
    display: flex;
}

.modal-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.modal-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-600));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.modal-title-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.modal-title-content p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.modal-close {
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-primary);
    flex-shrink: 0;
}

/* Ensure modal container doesn't overflow */
.modal-container {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex children */
}

.modal-header {
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Important for flex children */
    padding-bottom: 1rem; /* Extra space before footer */
}

.modal-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--bg-elevated);
    z-index: 10;
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ===== FORMS ===== */
.form-row {
    margin-bottom: 1.5rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group label i {
    color: var(--text-tertiary);
}

.required {
    color: var(--danger);
    font-weight: 700;
}

.optional {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* ===== ANALYTICS ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.analytics-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    min-height: 300px;
}

.analytics-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.analytics-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    text-align: center;
    color: var(--text-tertiary);
}

.analytics-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-primary);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-overlay {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-2xl);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-overlay {
        display: none;
    }
    
    
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .topbar {
        padding: 1rem 1rem 1rem 4rem;
        margin-top: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .streams-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .tab-content {
        padding: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Fix any wide containers */
    .container,
    .wrapper,
    .table-container {
        max-width: 100%;
        overflow-x: auto;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 1rem 1rem 1rem 4rem;
        gap: 1rem;
    }
    
    .topbar-left,
    .topbar-right {
        align-items: flex-start;
    }
    
    .topbar-right {
        justify-content: space-between;
    }
    
    .tab-content {
        padding: 0.5rem;
    }
    
    .content-section {
        padding: 1rem 0.5rem;
        margin: 0;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* RTMP tab specific content section */
    #rtmp-push-tab .content-section {
        padding: 1rem 0.25rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    #rtmp-push-tab {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Prevent any element from causing horizontal scroll */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    .modal-container {
        margin: 0;
        border-radius: var(--radius-lg);
        max-height: 100vh;
        height: auto;
        width: 95%;
        max-width: 600px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-title-section {
        gap: 0.75rem;
    }
    
    .modal-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .stream-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .quick-actions {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    
    .quick-action-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    /* Better button sizing for touch */
    .btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Mobile menu positioning */
    .mobile-menu-toggle {
        top: 0.75rem;
        left: 0.75rem;
    }
    
    .topbar {
        padding: 1rem 1rem 1rem 3.5rem !important;
    }
    
    /* Table responsiveness */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    .table-wrapper table {
        min-width: 600px;
        max-width: none;
    }
    
    /* Status cards responsive */
    .status-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .status-header {
        padding: 1rem;
        margin: -0.5rem -0.5rem 1.5rem -0.5rem;
    }
    
    .status-header h3 {
        font-size: 1.2rem;
    }
    
    .status-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .status-item {
        padding: 1rem;
    }
    
    .status-value {
        font-size: 1rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Instruction cards responsive */
    .instruction-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .instruction-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .step-text {
        font-size: 0.9rem;
    }
    
    /* Prevent horizontal overflow */
    .main-content,
    .content-section,
    .tab-content {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .stream-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .info-row strong {
        min-width: auto;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-primary: var(--gray-800);
        --border-secondary: var(--gray-700);
    }
}

/* Reboot button styling */
.reboot-link {
    color: #ef4444 !important;
    transition: all 0.3s ease;
}

.reboot-link:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.reboot-link .nav-icon {
    color: #ef4444;
}

.reboot-link:hover .nav-icon {
    color: #dc2626;
    transform: scale(1.1);
}

.reboot-link .nav-text {
    color: #ef4444;
    font-weight: 600;
}

.reboot-link:hover .nav-text {
    color: #dc2626;
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar,
    .topbar,
    .mobile-menu-toggle,
    .notification-container,
    .modal-backdrop,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 1rem;
        background: white;
        color: black;
    }
    
    .stat-card,
    .stream-card,
    .quick-action-card,
    .activity-feed {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* ===== ACTIVITY FEED RESPONSIVE ===== */
@media (max-width: 768px) {
    .activity-feed {
        padding: 1rem;
    }
    
    .activity-item {
        gap: 1rem;
        padding: 1rem 0;
        margin: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .activity-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .activity-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .activity-time {
        align-self: flex-start;
    }
    
    .activity-title {
        font-size: 0.9rem;
    }
    
    .activity-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .activity-item {
        gap: 0.75rem;
    }
    
    .activity-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9rem;
    }
    
    /* Ultra mobile optimizations */
    body {
        font-size: 14px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.625rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 0.875rem;
    }
    
    .content-section {
        padding: 0.75rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .streams-grid {
        gap: 0.75rem;
    }
    
    .stream-card {
        padding: 1rem;
    }
}

/* ===== STREAMS HEADER STYLES ===== */
.streams-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

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

.streams-header-info .section-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white;
}

.streams-header-info .section-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.streams-header-actions {
    display: flex;
    gap: 1rem;
}

/* ===== RTMP PUSH SECTION STYLES ===== */
.rtmp-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

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

.rtmp-header-info .section-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white;
}

.rtmp-header-info .section-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.rtmp-header-actions {
    display: flex;
    gap: 1rem;
}

.rtmp-server-status {
    margin-bottom: 2.5rem;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.status-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 2.5rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 20px 20px 0 0;
}

.status-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.status-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

.status-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin: -1rem -1rem 2rem -1rem;
}

.status-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-header h3 i {
    font-size: 1.75rem;
    color: #3b82f6;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.status-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.status-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.status-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 50%;
    box-sizing: border-box;
}

.status-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    opacity: 0.7;
}

.status-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    max-width: 45%;
    box-sizing: border-box;
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Status-specific styling */
.status-value.text-success {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.3);
}

.status-value.text-danger {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

.status-value.text-warning {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
}

.rtmp-instructions {
    margin-bottom: 2.5rem;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.instruction-card {
    background: linear-gradient(135deg, #fefbff 0%, #f0f9ff 100%);
    border: 2px solid #e0e7ff;
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.06), 0 3px 8px rgba(79, 70, 229, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.instruction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
    border-radius: 20px 20px 0 0;
}

.instruction-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.instruction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(79, 70, 229, 0.1), 0 6px 16px rgba(79, 70, 229, 0.06);
    border-color: #4f46e5;
}

.instruction-card h3 {
    margin: 0 0 2rem 0;
    color: #312e81;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.instruction-card h3 i {
    font-size: 1.5rem;
    color: #4f46e5;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instruction-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.instruction-step:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.step-number {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}

.step-text {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    font-weight: 500;
}

/* Special styling for HLS URLs within step-text */
.step-text:has-text("HLS URL:"),
.step-text:contains("HLS URL:") {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* More specific: Target URLs that start with https:// within step-text */
.step-text {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Create a code-like styling for long URLs in instructions */
.step-text code,
.step-text .url-text {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--primary-700);
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

.rtmp-table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f2f5;
    background: #f8fafc;
}

.table-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
}

.table-filters {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.rtmp-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    table-layout: fixed;
}

.rtmp-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
}

.rtmp-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    box-sizing: border-box;
    overflow: hidden;
}

.rtmp-table tr:hover {
    background: #f9fafb;
}

.rtmp-url-container {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: space-between;
}

.rtmp-url-container .stream-url {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 200px;
    display: inline-block;
}

/* RTMP table column widths for better layout */
/* Stream Key column */
#rtmpStreamsTable th:nth-child(1),
#rtmpStreamsTable td:nth-child(1) {
    width: 12%;
    min-width: 120px;
}

/* Status column */
#rtmpStreamsTable th:nth-child(2),
#rtmpStreamsTable td:nth-child(2) {
    width: 8%;
    min-width: 80px;
}

/* Client IP column */
#rtmpStreamsTable th:nth-child(3),
#rtmpStreamsTable td:nth-child(3) {
    width: 10%;
    min-width: 100px;
}

/* Speed column */
#rtmpStreamsTable th:nth-child(4),
#rtmpStreamsTable td:nth-child(4) {
    width: 8%;
    min-width: 80px;
}

/* Bitrate column */
#rtmpStreamsTable th:nth-child(5),
#rtmpStreamsTable td:nth-child(5) {
    width: 10%;
    min-width: 100px;
}

/* RTMP URL column */
#rtmpStreamsTable th:nth-child(6),
#rtmpStreamsTable td:nth-child(6) {
    width: 25%;
    min-width: 300px;
}

/* HLS URL column */
#rtmpStreamsTable th:nth-child(7),
#rtmpStreamsTable td:nth-child(7) {
    width: 25%;
    min-width: 300px;
}

/* Started column */
#rtmpStreamsTable th:nth-child(8),
#rtmpStreamsTable td:nth-child(8) {
    width: 12%;
    min-width: 120px;
    vertical-align: middle;
    box-sizing: border-box;
    position: relative;
}



/* URL Actions Container */
.url-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.3rem;
    flex-shrink: 0;
}

/* Enhanced Button Styling */
.btn-embed,
.btn-preview,
.btn-copy,
button.btn-copy,
.url-actions .btn-copy,
.url-actions button.btn-copy,
button[data-copy-text],
.btn-copy.btn-small,
button.btn-copy.btn-small,
.url-actions button[data-copy-text] {
    position: relative !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 4px !important;
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    cursor: pointer !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-transform: none !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    vertical-align: middle !important;
    min-width: auto !important;
    display: inline-block !important;
}

/* Shimmer effect for buttons */
.btn-embed::before,
.btn-preview::before,
.btn-copy::before,
button.btn-copy::before,
.url-actions .btn-copy::before,
.url-actions button.btn-copy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-embed:hover::before,
.btn-preview:hover::before,
.btn-copy:hover::before,
button.btn-copy:hover::before,
.url-actions .btn-copy:hover::before,
.url-actions button.btn-copy:hover::before {
    left: 100%;
}

/* Copy Button */
.btn-copy,
button.btn-copy,
.url-actions .btn-copy,
.url-actions button.btn-copy,
button[data-copy-text],
.btn-copy.btn-small,
button.btn-copy.btn-small,
.url-actions button[data-copy-text] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
}

.btn-copy:hover,
button.btn-copy:hover,
.url-actions .btn-copy:hover,
.url-actions button.btn-copy:hover,
button[data-copy-text]:hover,
.btn-copy.btn-small:hover,
button.btn-copy.btn-small:hover,
.url-actions button[data-copy-text]:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Embed Button */
.btn-embed {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: white !important;
}

.btn-embed:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

/* Preview Button */
.btn-preview {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

.btn-preview:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

/* Button Icons */
.btn-small i {
    margin-right: 0.15rem;
    font-size: 0.6rem;
}

/* Tooltip styling */
.btn-small {
    position: relative;
}

.btn-small:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    animation: tooltipFadeIn 0.2s ease-in-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Modal styling for embed and preview */
.embed-content textarea {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    resize: vertical;
}

.preview-content video {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stream-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* RTMP Status Styling - Use green for Live status */
#rtmpStreamsTable .status-badge.status-running,
#rtmp-push-tab .status-badge.status-running {
    background: var(--success-100) !important;
    color: var(--success-600) !important;
    border: 1px solid var(--success-200) !important;
}

#rtmpStreamsTable .status-badge.status-stopped,
#rtmp-push-tab .status-badge.status-stopped {
    background: var(--gray-100) !important;
    color: var(--text-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
}

/* Also target the RTMP table body specifically */
#rtmpStreamsTableBody .status-badge.status-running {
    background: var(--success-100) !important;
    color: var(--success-600) !important;
    border: 1px solid var(--success-200) !important;
}

#rtmpStreamsTableBody .status-badge.status-stopped {
    background: var(--gray-100) !important;
    color: var(--text-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
}


.stream-url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #475569;
    word-break: break-all;
    max-width: 300px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-delete {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    background: #ef4444;
    color: white;
}


.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.table-empty {
    padding: 3rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Responsive design for RTMP Push */
@media (max-width: 768px) {
    /* Force all RTMP elements to stay within viewport */
    #rtmp-push-tab * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #rtmp-push-tab .content-section,
    #rtmp-push-tab .rtmp-server-status,
    #rtmp-push-tab .rtmp-instructions,
    #rtmp-push-tab .rtmp-table-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .rtmp-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .rtmp-header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .status-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .instruction-content {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .rtmp-instructions {
        margin-bottom: 1.5rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .table-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Enhanced RTMP responsive fixes */
    .rtmp-server-status {
        margin-bottom: 1.5rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .status-card {
        padding: 1rem 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        transform: none !important;
        word-wrap: break-word !important;
    }

    .status-card:hover {
        transform: none !important;
        scale: none !important;
    }

    .status-card * {
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .status-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
        margin-bottom: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding: 0.5rem !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border-radius: 8px !important;
        border-left: 3px solid #3b82f6 !important;
    }

    .status-value {
        word-break: break-word !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        box-sizing: border-box !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #059669 !important;
        background: rgba(34, 197, 94, 0.1) !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 4px !important;
        border: 1px solid rgba(34, 197, 94, 0.2) !important;
    }

    .status-label {
        max-width: 100% !important;
        width: 100% !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
        font-weight: 600 !important;
        color: #374151 !important;
        font-size: 0.875rem !important;
        margin-bottom: 0.25rem !important;
    }

    .status-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .status-header h3 {
        width: 100% !important;
        max-width: 100% !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
    }

    .instruction-card {
        padding: 1.5rem 1rem;
        margin: 0;
        box-sizing: border-box;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        transform: none !important;
    }

    .instruction-card:hover {
        transform: none !important;
    }

    .instruction-step {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .step-number {
        align-self: flex-start;
        flex-shrink: 0;
    }

    .step-text {
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .rtmp-table-container {
        margin: 0;
        overflow-x: auto;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .rtmp-table {
        min-width: 600px;
        font-size: 0.8rem;
    }

    .rtmp-table th,
    .rtmp-table td {
        padding: 0.75rem 0.5rem;
        min-width: 80px;
    }

    .rtmp-url-container {
        max-width: 150px;
        overflow: hidden;
    }

    .copy-url-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Ultra-aggressive mobile fix for RTMP overflow */
    #rtmp-push-tab * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #rtmp-push-tab .content-section,
    #rtmp-push-tab .rtmp-server-status,
    #rtmp-push-tab .rtmp-instructions,
    #rtmp-push-tab .rtmp-table-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .status-card {
        padding: 0.75rem 0.5rem !important;
        margin: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .status-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .status-card:hover {
        transform: none !important;
    }

    .status-header h3 {
        font-size: 1.1rem;
    }

    .instruction-card {
        padding: 1rem 0.75rem;
        margin: 0;
        transform: none !important;
    }

    .instruction-card:hover {
        transform: none !important;
    }

    .instruction-card h3 {
        font-size: 1.2rem;
    }

    .rtmp-table-container {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .rtmp-table {
        min-width: 500px;
        font-size: 0.75rem;
    }

    .rtmp-table th,
    .rtmp-table td {
        padding: 0.5rem 0.25rem;
        min-width: 60px;
    }

    .table-header {
        padding: 1rem 0.75rem;
    }

    .table-header h3 {
        font-size: 1rem;
    }
}

/* ===== RTMP MODAL STYLES ===== */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.form-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: var(--primary);
    font-size: 1rem;
}

.streaming-instructions {
    background: var(--info-50);
    border: 1px solid var(--info-200);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.streaming-instructions p {
    margin: 0.5rem 0;
    color: var(--info-700);
    font-size: 0.875rem;
    line-height: 1.4;
}

.streaming-instructions p strong {
    color: var(--info-800);
    font-weight: 600;
}

.connection-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.connection-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.connection-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connection-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
}

.connection-value code {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--primary-700);
    background: transparent;
    border: none;
    word-break: break-all;
}


.hls-output {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.output-info {
    padding: 1rem;
    background: var(--success-50);
    border: 1px solid var(--success-200);
    border-radius: var(--radius);
}

.output-info p {
    margin: 0 0 1rem 0;
    color: var(--success-700);
    font-weight: 500;
}

.video-preview {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-900);
}

.video-preview video {
    width: 100%;
    max-height: 300px;
    background: var(--gray-900);
    border-radius: var(--radius);
}

/* Button spacing for multiple buttons */
.topbar-right .btn + .btn {
    margin-left: 0.75rem;
}

/* Spinner for loading states */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive styles for RTMP modal */
@media (max-width: 768px) {
    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .connection-value {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .connection-value code {
        word-break: break-all;
        text-align: center;
        padding: 0.5rem;
        background: var(--white);
        border-radius: var(--radius-sm);
    }
    
    
    .topbar-right {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
        min-width: 0;
    }
    
    .topbar-right .btn {
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .topbar-right .btn + .btn {
        margin-left: 0;
    }
    
    /* Ensure modal footer is always visible */
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--bg-elevated);
        z-index: 10;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Fix for topbar button overflow */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    min-width: 0;
}

.topbar-right .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Improve topbar layout for small screens */
@media (max-width: 480px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0.75rem 0.75rem 0.75rem 3rem;
    }
    
    .topbar-left,
    .topbar-right {
        width: 100%;
    }
    
    .topbar-right {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Modal adjustments for small screens */
    .modal-container {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        min-height: auto;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.75rem;
        padding-top: 1rem;
        margin-top: 1rem;
        position: sticky;
        bottom: 0;
        background: var(--bg-elevated);
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== SETTINGS MODAL STYLES ===== */
.settings-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.settings-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
}

/* ===== USER AUTHENTICATION STYLES ===== */
.user-info {
    position: relative;
    margin-left: 1rem;
}

.user-dropdown {
    position: relative;
}

.user-button {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-button:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-menu.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.user-menu a:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.user-menu a:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.user-menu a:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

@media (max-width: 1024px) {
    .user-info {
        margin-left: 0.5rem;
    }
    
    .user-button span {
        display: none;
    }
    
    .user-button {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
}

.settings-section h3 i {
    color: var(--primary);
    font-size: 1rem;
}

.settings-grid {
    display: grid;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.setting-item label strong {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.setting-description {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item select {
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.setting-item input[type="text"]:focus,
.setting-item input[type="number"]:focus,
.setting-item select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-200);
}

.setting-item.checkbox-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.setting-item.checkbox-item label {
    flex: 1;
    flex-direction: column;
    cursor: pointer;
}

.setting-item.checkbox-item input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary);
    margin: 0;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Custom checkbox from scratch */
.custom-checkbox-wrapper {
    display: inline-block;
    position: relative;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
}

.custom-checkbox-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: #ffffff;
    margin-right: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox-box::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-checkbox-input:checked + .custom-checkbox-label .custom-checkbox-box {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox-input:checked + .custom-checkbox-label .custom-checkbox-box::after {
    opacity: 1;
}

.custom-checkbox-label:hover .custom-checkbox-box {
    border-color: var(--primary);
}

.custom-checkbox-text {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* Compact mode styles */
.compact-mode .stream-card {
    padding: 1rem;
}

.compact-mode .stat-card {
    padding: 1rem;
}

.compact-mode .quick-action-card {
    padding: 1rem;
}

.compact-mode .form-section {
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Responsive settings modal */
@media (max-width: 768px) {
    .settings-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .settings-grid {
        gap: 1rem;
    }
    
    .setting-item.checkbox-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .setting-item.checkbox-item input[type="checkbox"] {
        align-self: flex-start;
    }
}

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

@media (min-width: 1025px) {
    .settings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 2rem;
    }
    
    .setting-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* ===== PROFESSIONAL ANALYTICS DASHBOARD ===== */

/* Dashboard Layout */
.analytics-dashboard {
    padding: 2rem;
    background: #f8fafc;
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    color: white;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-title i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.time-select option {
    background: #1f2937;
    color: white;
}

.refresh-btn, .export-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.refresh-btn:hover, .export-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
}

.kpi-card.primary {
    --accent-color: #3b82f6;
    --accent-light: #60a5fa;
}

.kpi-card.success {
    --accent-color: #10b981;
    --accent-light: #34d399;
}

.kpi-card.warning {
    --accent-color: #f59e0b;
    --accent-light: #fbbf24;
}

.kpi-card.danger {
    --accent-color: #ef4444;
    --accent-light: #f87171;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    box-shadow: 0 4px 12px rgba(var(--accent-color), 0.3);
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.kpi-trend.positive {
    background: #dcfce7;
    color: #166534;
}

.kpi-trend.negative {
    background: #fee2e2;
    color: #dc2626;
}

.kpi-trend.neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-meta {
    margin-top: 0.5rem;
}

.kpi-secondary {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Charts Section */
.charts-section {
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.main-chart {
    margin-bottom: 1.5rem;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
}

.chart-title h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.chart-title p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.primary {
    background: #3b82f6;
}

.legend-dot.danger {
    background: #ef4444;
}

.chart-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    background: #fefefe;
}

.pie-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.chart-stats {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.stat-dot.rtsp {
    background: #3b82f6;
}

.stat-dot.http {
    background: #10b981;
}

.stat-dot.rtmp {
    background: #f59e0b;
}

.stat-dot.hls {
    background: #8b5cf6;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    margin-left: auto;
    font-weight: 600;
    color: #111827;
}

/* Performance Card */
.performance-card .performance-metrics {
    padding: 1.5rem;
}

.performance-item {
    margin-bottom: 1.25rem;
}

.performance-item:last-child {
    margin-bottom: 0;
}

.performance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.performance-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.performance-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.performance-track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.performance-progress {
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.performance-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.performance-progress[data-level="low"] {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.performance-progress[data-level="medium"] {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.performance-progress[data-level="high"] {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

/* Table Section */
.table-section {
    margin-bottom: 2rem;
}

.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.table-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.table-title p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
}

.table-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.table-btn.primary {
    background: #3b82f6;
    color: white;
}

.table-btn.primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.table-btn.secondary {
    background: #f8fafc;
    color: #374151;
    border-color: #e5e7eb;
}

.table-btn.secondary:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
}

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

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

.professional-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap;
}

.th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

.th-content i {
    opacity: 0.5;
    font-size: 0.75rem;
    transition: opacity 0.2s ease;
}

.th-content:hover i {
    opacity: 1;
}

.professional-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #374151;
}

.professional-table tbody tr {
    transition: background-color 0.2s ease;
}

.professional-table tbody tr:hover {
    background: #f8fafc;
}

.empty-state td {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-content {
    color: #9ca3af;
}

.empty-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #6b7280;
}

.empty-content p {
    font-size: 0.875rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .analytics-dashboard {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .time-select {
        flex: 1;
        min-width: 0;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-stats {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .table-actions {
        align-self: flex-end;
    }
}

/* ===== SYSTEM PERFORMANCE STYLES ===== */
.system-section {
    margin-top: 3rem;
}

.resource-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1600px) {
    .resource-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .resource-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.resource-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    border-radius: 16px 16px 0 0;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.resource-card.cpu::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.resource-card.memory::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.resource-card.disk::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.resource-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.resource-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.resource-card.cpu .resource-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.resource-card.memory .resource-icon {
    background: linear-gradient(135deg, #10b981, #047857);
}

.resource-card.disk .resource-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.resource-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.resource-info p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.resource-metric {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    min-width: 4rem;
}

.metric-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.metric-progress {
    height: 100%;
    border-radius: 4px;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.resource-card.cpu .metric-progress {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.resource-card.memory .metric-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.resource-card.disk .metric-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.resource-card.bandwidth-up::before {
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

.resource-card.bandwidth-down::before {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.resource-card.bandwidth-up .resource-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.resource-card.bandwidth-down .resource-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.resource-card.bandwidth-up .metric-progress {
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

.resource-card.bandwidth-down .metric-progress {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

/* Stream Bitrate Card */
.resource-card.stream-bitrate::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}
.resource-card.stream-bitrate .resource-icon {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}
.resource-card.stream-bitrate .metric-progress {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

/* GPU Usage Card */
.resource-card.gpu-usage::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}
.resource-card.gpu-usage .resource-icon {
    background: linear-gradient(135deg, #22c55e, #15803d);
}
.resource-card.gpu-usage .metric-progress {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* Temperature Monitor Card */
.resource-card.temp-monitor::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}
.resource-card.temp-monitor .resource-icon {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}
.resource-card.temp-monitor .metric-progress {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Animated shine effect */
.metric-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Processes Section */
.processes-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.processes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.processes-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.processes-header h3::before {
    content: '⚡';
    font-size: 1rem;
}

.processes-count {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.processes-count span {
    font-size: 1.125rem;
    font-weight: 700;
}

.processes-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

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

.processes-table th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.processes-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.processes-table tr:hover {
    background: linear-gradient(135deg, #fefefe, #f9fafb);
}

.processes-table .no-processes td {
    text-align: center;
    padding: 3rem;
}

.processes-table .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
}

.processes-table .empty-state i {
    font-size: 2rem;
    color: #d1d5db;
}

.processes-table .process-name {
    font-weight: 600;
    color: #1f2937;
}

.processes-table .process-pid {
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.processes-table .process-cpu {
    font-weight: 600;
}

.processes-table .process-memory {
    color: #059669;
    font-weight: 500;
}

.processes-table .process-runtime {
    color: #7c3aed;
    font-weight: 500;
}

.processes-table .process-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.processes-table .process-status.active {
    background: #dcfce7;
    color: #166534;
}

.processes-table .process-status.idle {
    background: #fef3c7;
    color: #92400e;
}

.processes-table .process-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resource-cards {
        grid-template-columns: 1fr;
    }
    
    .processes-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .processes-table th,
    .processes-table td {
        padding: 0.75rem 0.5rem;
    }
}
    .professional-table {
        font-size: 0.8rem;
    }
    
    .professional-table th,
    .professional-table td {
        padding: 0.75rem;
    }
}

/* ===== TRANSCODING STYLES ===== */
.transcoding-options {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
}

.form-section-header h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-header h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-header p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.quality-details {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
}

.quality-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quality-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.quality-info-item .label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.quality-info-item .value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.custom-settings {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
}

.load-estimate {
    margin-top: 1rem;
}

.load-info {
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.load-info.load-warning {
    border-color: var(--warning-500);
    background: var(--warning-50);
}

.load-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.load-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.load-level {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
}

.load-level.load-low {
    color: var(--success-600);
    background: var(--success-50);
}

.load-level.load-medium {
    color: var(--warning-600);
    background: var(--warning-50);
}

.load-level.load-high {
    color: var(--danger-600);
    background: var(--danger-50);
}

.load-description {
    flex: 1;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-align: right;
}

/* Responsive Transcoding Styles */
@media (max-width: 768px) {
    .quality-info-grid {
        grid-template-columns: 1fr;
    }
    
    .quality-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .load-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .load-description {
        text-align: left;
    }
}

/* ===== LICENSE STATUS COMPONENT ===== */
.license-status {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.license-status.valid {
    background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%);
    border-color: var(--success-200);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.license-status.invalid {
    background: linear-gradient(135deg, var(--danger-50) 0%, var(--danger-100) 100%);
    border-color: var(--danger-200);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.license-status.checking {
    background: linear-gradient(135deg, var(--info-50) 0%, var(--info-100) 100%);
    border-color: var(--info-200);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.license-status-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.license-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all var(--transition);
}

.license-status.valid .license-icon {
    background: var(--success-500);
    color: white;
}

.license-status.invalid .license-icon {
    background: var(--danger-500);
    color: white;
}

.license-status.checking .license-icon {
    background: var(--info-500);
    color: white;
}

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

.license-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.license-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.license-subtitle {
    font-size: 0.625rem;
    color: var(--text-tertiary);
    line-height: 1.2;
}

.license-status.valid .license-title {
    color: var(--success-700);
}

.license-status.invalid .license-title {
    color: var(--danger-700);
}

.license-status.checking .license-title {
    color: var(--info-700);
}

.license-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.license-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    transition: all var(--transition);
}

.license-status.valid .license-status-dot {
    background: var(--success-500);
    box-shadow: 0 0 0 2px var(--success-200);
}

.license-status.invalid .license-status-dot {
    background: var(--danger-500);
    box-shadow: 0 0 0 2px var(--danger-200);
}

.license-spinner {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid var(--info-200);
    border-top: 2px solid var(--info-500);
    border-radius: 50%;
    animation: license-spin 1s linear infinite;
}

@keyframes license-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.license-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.license-refresh-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.license-refresh-btn:active {
    transform: scale(0.95);
}

.license-refresh-btn.refreshing {
    animation: license-spin 1s linear infinite;
}

.license-status.valid .license-refresh-btn {
    border-color: var(--success-300);
    color: var(--success-600);
}

.license-status.valid .license-refresh-btn:hover {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-400);
}

.license-status.invalid .license-refresh-btn {
    border-color: var(--danger-300);
    color: var(--danger-600);
}

.license-status.invalid .license-refresh-btn:hover {
    background: var(--danger-50);
    color: var(--danger-700);
    border-color: var(--danger-400);
}

.license-status.checking .license-refresh-btn {
    border-color: var(--info-300);
    color: var(--info-600);
}

.license-status.checking .license-refresh-btn:hover {
    background: var(--info-50);
    color: var(--info-700);
    border-color: var(--info-400);
}

/* ===== SSL STATUS COMPONENT ===== */
.ssl-status {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.ssl-status.valid {
    background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%);
    border-color: var(--success-200);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.ssl-status.invalid {
    background: linear-gradient(135deg, var(--danger-50) 0%, var(--danger-100) 100%);
    border-color: var(--danger-200);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.ssl-status.checking {
    background: linear-gradient(135deg, var(--info-50) 0%, var(--info-100) 100%);
    border-color: var(--info-200);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.ssl-status-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ssl-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all var(--transition);
}

.ssl-status.valid .ssl-icon {
    background: var(--success-500);
    color: white;
}

.ssl-status.invalid .ssl-icon {
    background: var(--danger-500);
    color: white;
}

.ssl-status.checking .ssl-icon {
    background: var(--info-500);
    color: white;
}

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

.ssl-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ssl-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.ssl-subtitle {
    font-size: 0.625rem;
    color: var(--text-tertiary);
    line-height: 1.2;
}

.ssl-status.valid .ssl-title {
    color: var(--success-700);
}

.ssl-status.invalid .ssl-title {
    color: var(--danger-700);
}

.ssl-status.checking .ssl-title {
    color: var(--info-700);
}

.ssl-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ssl-spinner {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid var(--info-200);
    border-top: 2px solid var(--info-500);
    border-radius: 50%;
    animation: ssl-spin 1s linear infinite;
}

@keyframes ssl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ssl-refresh-btn {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--border-secondary);
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    flex-shrink: 0;
}

.ssl-refresh-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.ssl-refresh-btn:active {
    transform: scale(0.95);
}

.ssl-refresh-btn.refreshing {
    animation: ssl-spin 1s linear infinite;
}

.ssl-status.valid .ssl-refresh-btn {
    border-color: var(--success-300);
    color: var(--success-600);
}

.ssl-status.valid .ssl-refresh-btn:hover {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-400);
}

.ssl-status.invalid .ssl-refresh-btn {
    border-color: var(--danger-300);
    color: var(--danger-600);
}

.ssl-status.invalid .ssl-refresh-btn:hover {
    background: var(--danger-50);
    color: var(--danger-700);
    border-color: var(--danger-400);
}

.ssl-status.checking .ssl-refresh-btn {
    border-color: var(--info-300);
    color: var(--info-600);
}

.ssl-status.checking .ssl-refresh-btn:hover {
    background: var(--info-50);
    color: var(--info-700);
    border-color: var(--info-400);
}

.ssl-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness for SSL status */
@media (max-width: 768px) {
    .ssl-status {
        padding: 0.625rem;
    }

    .ssl-status-content {
        gap: 0.5rem;
    }

    .ssl-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .ssl-title {
        font-size: 0.7rem;
    }

    .ssl-subtitle {
        font-size: 0.5rem;
    }
}

/* ===== GPU ENCODING STYLES ===== */
.gpu-info {
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.gpu-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.gpu-info.available .gpu-status {
    color: var(--success-600);
}

.gpu-info.available {
    background: var(--success-50);
    border-color: var(--success-200);
}

.gpu-info.unavailable .gpu-status {
    color: var(--warning-600);
}

.gpu-info.unavailable {
    background: var(--warning-50);
    border-color: var(--warning-200);
}

.gpu-details {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-primary);
    font-size: 0.8rem;
}

.gpu-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.gpu-vendor {
    font-weight: 500;
    color: var(--text-primary);
}

.gpu-encoders {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ===== SETTINGS PAGE STYLES ===== */
.settings-group {
    margin-bottom: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-group-header {
    padding: 1.5rem 1.5rem 1rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
}

.settings-group-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-group-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.settings-form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

.ssl-status-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ssl-status-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ssl-status-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.ssl-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

.ssl-status-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.ssl-status-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.3;
}

.ssl-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ssl-status-details {
    padding: 1rem 1.5rem 1.5rem;
    background: white;
}

.ssl-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.ssl-detail-item:last-child {
    margin-bottom: 0;
}

.ssl-detail-item i {
    width: 16px;
    color: #9ca3af;
    font-size: 0.875rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.status-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

/* SSL Status States */
.ssl-status-card.valid .ssl-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.ssl-status-card.valid .ssl-status-badge {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.ssl-status-card.valid .status-dot {
    background: #22c55e;
}

.ssl-status-card.valid .ssl-status-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom-color: #bbf7d0;
}

.ssl-status-card.invalid .ssl-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.ssl-status-card.invalid .ssl-status-badge {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.ssl-status-card.invalid .status-dot {
    background: #ef4444;
}

.ssl-status-card.invalid .ssl-status-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom-color: #fecaca;
}

.ssl-status-card.warning .ssl-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.ssl-status-card.warning .ssl-status-badge {
    background: #fef3c7;
    border-color: #fed7aa;
    color: #92400e;
}

.ssl-status-card.warning .status-dot {
    background: #f59e0b;
}

.ssl-status-card.warning .ssl-status-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom-color: #fed7aa;
}

.ssl-status-card.loading .ssl-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.ssl-status-card.loading .status-dot {
    background: #8b5cf6;
    animation: pulse 1s infinite;
}

.ssl-status-card.unknown .ssl-icon {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.ssl-status-card.unknown .ssl-status-badge {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
}

.ssl-status-card.unknown .status-dot {
    background: #9ca3af;
}

.ssl-status-card.unknown .ssl-status-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom-color: #e5e7eb;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form-actions .btn {
    min-width: auto;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Settings specific button styles */
.btn-secondary {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-100) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hide Check for Updates button - updates are automatic */
#checkUpdateBtn {
    display: none !important;
}

/* Install Update button styling */
#installUpdateBtn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#installUpdateBtn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* SSL Certificate specific buttons */
.ssl-auto-renewal {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.4;
}

.checkbox-label strong {
    color: #1f2937;
    font-weight: 600;
}

.checkbox-label small {
    color: #6b7280;
    font-size: 0.875rem;
}

.auto-renewal-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #e0f2fe;
    border: 1px solid #b3e5fc;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #0369a1;
}

.auto-renewal-status i {
    color: #0284c7;
}

.ssl-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Update Management Styles */
.update-status-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.update-status-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.update-status-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.update-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

.update-status-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.update-status-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.3;
}

.update-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
}

.update-status-details {
    padding: 1rem 1.5rem;
    background: white;
}

.update-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.update-detail-item:last-child {
    margin-bottom: 0;
}

.update-detail-item i {
    width: 16px;
    color: #9ca3af;
    font-size: 0.875rem;
}

.update-release-notes {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
}

.update-release-notes h5 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-notes-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4b5563;
}

.update-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Update Status States */
.update-status-card.up-to-date .update-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.update-status-card.up-to-date .update-status-badge {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.update-status-card.up-to-date .status-dot {
    background: #22c55e;
}

.update-status-card.up-to-date .update-status-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom-color: #bbf7d0;
}

.update-status-card.update-available .update-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.update-status-card.update-available .update-status-badge {
    background: #fef3c7;
    border-color: #fed7aa;
    color: #92400e;
}

.update-status-card.update-available .status-dot {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

.update-status-card.update-available .update-status-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom-color: #fed7aa;
}

.update-status-card.critical-update .update-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.update-status-card.critical-update .update-status-badge {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.update-status-card.critical-update .status-dot {
    background: #ef4444;
    animation: pulse 1s infinite;
}

.update-status-card.critical-update .update-status-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom-color: #fecaca;
}

.update-status-card.checking .update-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.update-status-card.checking .update-icon i {
    animation: spin 2s linear infinite;
}

/* Update Button Styles */
.btn-update-check {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-update-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-update-install {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-update-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.btn-update-history {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-update-history:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.btn-ssl-generate {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-ssl-generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-ssl-generate:hover::before {
    left: 100%;
}

.btn-ssl-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.btn-ssl-renew {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-ssl-renew::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-ssl-renew:hover::before {
    left: 100%;
}

.btn-ssl-renew:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-ssl-check {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-ssl-check::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-ssl-check:hover::before {
    left: 100%;
}

.btn-ssl-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Loading animations for SSL buttons */
.btn-ssl-generate.loading, 
.btn-ssl-renew.loading, 
.btn-ssl-check.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-ssl-generate.loading::after, 
.btn-ssl-renew.loading::after, 
.btn-ssl-check.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Simple SSL Status Styles */
.ssl-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.ssl-status.ssl-valid {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ssl-status.ssl-valid i {
    color: #22c55e;
}

.ssl-status.ssl-invalid {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ssl-status.ssl-invalid i {
    color: #ef4444;
}

.ssl-status.ssl-cpanel {
    background: #e0f2fe;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

.ssl-status.ssl-cpanel i {
    color: #0284c7;
}

/* SSL Status loading animation */
.ssl-status.loading {
    position: relative;
}

.ssl-status.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-primary);
    border-top: 3px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-secondary:hover {
    background-color: var(--gray-200);
    border-color: var(--border-hover);
}

/* Success button variant */
.btn-success {
    background-color: var(--success-500);
    border: 1px solid var(--success-600);
    color: white;
}

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

/* Info button variant */
.btn-info {
    background-color: var(--info-500);
    border: 1px solid var(--info-600);
    color: white;
}

.btn-info:hover {
    background-color: var(--info-600);
    border-color: var(--info-700);
}

/* Settings form enhancements */
.settings-form .form-group:last-child {
    margin-bottom: 0;
}

.settings-form .btn {
    margin-top: 1rem;
}

/* User Info Card Styles */
.user-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.user-info-icon {
    color: var(--color-primary);
    font-size: 2rem;
}

.user-info-details h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.user-info-details p {
    margin: 0 0 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-info-details small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Logout Section Styles */
.logout-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.logout-description {
    margin: 0 0 1rem 0;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--radius-sm);
    color: #856404;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-description i {
    color: #f39c12;
}

#logoutBtn {
    background: var(--color-danger);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#logoutBtn:hover {
    background: var(--color-danger-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

#logoutBtn:active {
    transform: translateY(0);
}

.license-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.license-status.clickable {
    cursor: pointer;
}

/* Mobile responsiveness for license status */
@media (max-width: 768px) {
    .license-status {
        padding: 0.625rem;
    }
    
    .license-status-content {
        gap: 0.5rem;
    }
    
    .license-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
    
    .license-title {
        font-size: 0.7rem;
    }
    
    .license-subtitle {
        font-size: 0.6rem;
    }
}

/* ===== FM BROADCASTING SPECIFIC STYLES ===== */

/* Form sections with better spacing */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Checkbox grid layout for processing options */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.checkbox-group {
    margin-bottom: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--white);
}

.checkbox-label:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom + .checkbox-content {
    color: var(--primary-700);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-content {
    flex: 1;
}

.checkbox-content strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.checkbox-content small {
    color: var(--gray-500);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Processing indicators badges */
.processing-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-info {
    background: var(--info-100);
    color: var(--info-600);
}

.badge-warning {
    background: var(--warning-100);
    color: var(--warning-600);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-600);
}

/* Instructions grid layout */
.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
    max-width: 100%;
    box-sizing: border-box;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.instruction-step:hover {
    border-color: var(--primary-300);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Form actions styling */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Status badge improvements */
.status-badge.success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Info card styling */
.info-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.info-header {
    background: var(--gray-50);
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.info-header h3 {
    margin: 0;
    color: var(--gray-800);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-content {
    padding: 1.5rem;
}

/* Tech specs styling */
.tech-specs {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
}

.tech-specs h4 {
    margin: 0 0 1rem 0;
    color: var(--gray-800);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-specs ul {
    margin: 1rem 0 0 0;
    list-style: none;
    padding: 0;
}

.tech-specs li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.tech-specs li:last-child {
    border-bottom: none;
}

.tech-specs li i {
    color: var(--success-500);
    font-size: 1rem;
}

/* Quick actions styling */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

/* Available streams styling */
.available-stream-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--white);
    transition: all 0.2s ease;
}

.available-stream-item:hover {
    border-color: var(--primary-300);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.available-stream-item:last-child {
    margin-bottom: 0;
}

.stream-info {
    flex: 1;
}

.stream-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stream-title strong {
    font-size: 1.1rem;
    color: var(--gray-800);
}

.stream-details {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.stream-details i {
    color: var(--primary-500);
    margin-right: 0.25rem;
}

.stream-actions {
    margin-left: 1rem;
}

/* Modal improvements for FM Processor */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
    color: var(--gray-800);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Empty state improvements */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h3, .empty-state h4 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-600);
}

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

/* Responsive adjustments for FM Broadcasting */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .instruction-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-lg {
        width: 100%;
        justify-content: center;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .available-stream-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .stream-actions {
        margin-left: 0;
        text-align: center;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 1.5rem;
    }
}


/* ZIP Update Upload Styles */
.update-upload-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.upload-area {
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    margin: 1rem;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #6366f1;
    background: #f0f0ff;
}

.upload-area.drag-over {
    border-color: #4f46e5;
    background: #eef2ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #6366f1;
}

.upload-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.upload-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.update-progress {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.update-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #0c4a6e;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    width: 16px;
    color: #0ea5e9;
    font-size: 0.875rem;
}

.btn-update-cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-update-cancel:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* RTMP Instructions Styling */
.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Force smaller grid on constrained screens */
@media (min-width: 1200px) and (max-width: 1920px) {
    .rtmp-instructions .instruction-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* Single column for very tight spaces */
@media (min-width: 1200px) and (max-width: 1600px) {
    .rtmp-instructions .instruction-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Specific fix for 1920px resolution */
@media (min-width: 1800px) and (max-width: 1920px) {
    .tab-content {
        padding: 1rem !important;
    }

    .rtmp-instructions .instruction-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        max-width: calc(100vw - 320px) !important;
    }

    .instruction-group {
        padding: 14px !important;
        font-size: 0.9rem !important;
    }

    .instruction-group h4 {
        font-size: 1rem !important;
    }
}

.instruction-group {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.instruction-group h4 {
    color: #495057;
    margin-bottom: 15px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.config-item {
    margin-bottom: 15px;
}

.config-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
}

.rtmp-url, .command-line {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    display: block;
    margin: 8px 0;
    word-break: break-all;
    position: relative;
}

.ffmpeg-example {
    background-color: #1a202c;
    color: #68d391;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.copy-btn:hover {
    background-color: #0056b3;
}

.step-list {
    list-style-type: none;
    padding-left: 0;
}

.step-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.step-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

/* Desktop optimization for 1920px screens */
@media (min-width: 1200px) and (max-width: 1920px) {
    /* Reduce tab content padding to give more space */
    .tab-content {
        padding: 1.5rem;
    }

    .instruction-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .instruction-group {
        padding: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .rtmp-instructions,
    .rtmp-server-status {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Ensure main content doesn't overflow */
    .main-content {
        max-width: calc(100vw - var(--sidebar-width));
        overflow-x: hidden;
    }
}

/* Enhanced Mobile responsiveness for RTMP instructions */
@media (max-width: 768px) {
    .instruction-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .instruction-group {
        padding: 15px;
    }

    .rtmp-url, .command-line, .ffmpeg-example {
        font-size: 12px;
        padding: 10px;
    }
}

/* Light background variant for RTMP URLs */
.rtmp-url.light-bg {
    background-color: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

/* Updated RTMP table column widths for 6 columns (removed Speed and Bitrate) */
#rtmpStreamsTable th:nth-child(1),
#rtmpStreamsTable td:nth-child(1) {
    width: 15%;
    min-width: 150px;
}

/* Status column */
#rtmpStreamsTable th:nth-child(2),
#rtmpStreamsTable td:nth-child(2) {
    width: 12%;
    min-width: 100px;
}

/* Client IP column */
#rtmpStreamsTable th:nth-child(3),
#rtmpStreamsTable td:nth-child(3) {
    width: 15%;
    min-width: 120px;
}

/* RTMP URL column */
#rtmpStreamsTable th:nth-child(4),
#rtmpStreamsTable td:nth-child(4) {
    width: 25%;
    min-width: 200px;
}

/* HLS URL column */
#rtmpStreamsTable th:nth-child(5),
#rtmpStreamsTable td:nth-child(5) {
    width: 25%;
    min-width: 200px;
}

/* Started column */
#rtmpStreamsTable th:nth-child(6),
#rtmpStreamsTable td:nth-child(6) {
    width: 8%;
    min-width: 80px;
}

/* ===== CUSTOM ECU PLATFORM STYLES ===== */

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--topbar-height));
    padding: 2rem;
}

.auth-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.auth-card h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.auth-toggle a {
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* Form Styles - Business */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.8rem;
}

.form-group label i {
    color: #3b82f6;
    font-size: 0.85rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.form-input:hover, .form-select:hover {
    border-color: #cbd5e1;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Upload Form - Business Card */
.upload-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

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

/* File Drop Zone - Business */
.file-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.file-drop-zone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-drop-zone.dragover {
    border-color: #3b82f6;
    background: #dbeafe;
    border-style: solid;
}

/* Buttons - Business */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-logout {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Requests Table - Business */
.requests-table {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

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

.requests-table th {
    background: #f8fafc;
    color: #475569;
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #e2e8f0;
}

.requests-table th:first-child {
    padding-left: 1.5rem;
}

.requests-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.875rem;
}

.requests-table td:first-child {
    padding-left: 1.5rem;
}

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

.requests-table tr:hover {
    background: #f8fafc;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

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

    .service-type-container {
        grid-template-columns: 1fr;
    }
}

/* Auth page - hide sidebar */
#authSection:not(.hidden) ~ * .sidebar {
    display: none;
}

body:has(#authSection:not(.hidden)) .sidebar {
    display: none;
}

body:has(#authSection:not(.hidden)) .main-content {
    margin-left: 0;
}

/* Chat Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    max-height: 400px;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
}

.chat-message-customer {
    background: var(--primary-100);
    margin-left: 2rem;
}

.chat-message-admin {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    margin-right: 2rem;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.chat-message-header strong {
    color: var(--text-primary);
}

.chat-message-header span {
    color: var(--text-tertiary);
}

.chat-message-body {
    color: var(--text-secondary);
}

.chat-form {
    display: flex;
    gap: 1rem;
}

.chat-form .form-input {
    flex: 1;
}

.chat-form .btn {
    white-space: nowrap;
}

.status-refunded {
    background: var(--warning);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Chat messages min-height fix */
.chat-messages {
    min-height: 300px !important;
}

/* ============================================
   BUSINESS AUTH STYLES - EcuEdit
   ============================================ */

/* Auth Wrapper - Full Screen Split Layout */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #f8fafc;
}

/* Left Branding Panel */
.auth-branding {
    flex: 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.auth-branding::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    color: white;
}

/* Large Logo */
.brand-logo-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.brand-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.brand-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: white;
    line-height: 1;
}

.brand-highlight {
    color: #60a5fa;
}

.brand-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Features List */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.brand-feature:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.feature-icon i {
    font-size: 1.125rem;
    color: white;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.feature-text span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

/* Stats Row */
.brand-stats {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-stat .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #60a5fa;
    line-height: 1;
}

.brand-stat .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Right Forms Container */
.auth-forms-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f8fafc;
    max-width: 550px;
}

/* Business Auth Card */
.auth-card-business {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -2px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-small {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
}

.auth-logo-small svg {
    width: 100%;
    height: 100%;
}

.auth-card-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.auth-card-header p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
}

/* Form Styling */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group-business {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-business label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-business label i {
    color: #64748b;
    font-size: 0.8125rem;
}

.form-input-business {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.form-input-business::placeholder {
    color: #94a3b8;
}

.form-input-business:hover {
    border-color: #cbd5e1;
}

.form-input-business:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Form Options Row */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #475569;
}

.remember-me input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

.remember-me a {
    color: #3b82f6;
    text-decoration: none;
}

.remember-me a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Primary Button */
.btn-business-primary {
    width: 100%;
    padding: 0.9375rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    margin-top: 0.5rem;
}

.btn-business-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-business-primary:active {
    transform: translateY(0);
}

.btn-business-primary i {
    font-size: 0.9375rem;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    font-size: 0.8125rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toggle Link */
.auth-toggle-business {
    text-align: center;
    font-size: 0.9375rem;
    color: #64748b;
}

.auth-toggle-business a {
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-toggle-business a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-branding {
        padding: 2rem;
        min-height: auto;
    }

    .auth-branding-content {
        max-width: 100%;
    }

    .brand-logo-large {
        margin-bottom: 2rem;
    }

    .brand-icon {
        width: 60px;
        height: 60px;
    }

    .brand-name {
        font-size: 2rem;
    }

    .brand-features {
        display: none;
    }

    .brand-stats {
        justify-content: center;
        padding-top: 1.5rem;
    }

    .auth-forms-container {
        max-width: 100%;
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-branding {
        padding: 1.5rem;
    }

    .brand-logo-large {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .brand-stats {
        gap: 1.5rem;
    }

    .auth-forms-container {
        padding: 1rem;
    }

    .auth-card-business {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .auth-card-header h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Vehicle Selection Dropdowns */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.form-select option {
    padding: 0.5rem;
}

.form-group label i {
    margin-right: 0.25rem;
}

/* ===== SERVICE TYPE CHECKBOXES ===== */
.service-type-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.service-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.service-checkbox:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.service-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.service-checkbox input[type="checkbox"]:checked + .toggle-switch {
    background: #3b82f6;
}

.service-checkbox input[type="checkbox"]:checked + .toggle-switch .toggle-knob {
    transform: translateX(20px);
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.service-name {
    flex: 1;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.service-price {
    font-weight: 600;
    color: #3b82f6;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Service checkbox selected state */
.service-checkbox:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Mobile Service Types - ONLY for mobile */
@media screen and (max-width: 768px) {
    .service-type-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .service-checkbox {
        width: 100%;
        padding: 0.75rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .service-checkbox .toggle-switch {
        order: 1;
        flex-shrink: 0;
        width: 40px;
        height: 22px;
    }

    .service-checkbox .toggle-switch .toggle-knob {
        width: 18px;
        height: 18px;
    }

    .service-checkbox input[type="checkbox"]:checked + .toggle-switch .toggle-knob {
        transform: translateX(18px);
    }

    .service-checkbox .service-name {
        order: 2;
        flex: 1;
        min-width: 0;
        font-size: 0.8rem;
        word-wrap: break-word;
        white-space: normal;
        line-height: 1.3;
    }

    .service-checkbox .service-price {
        order: 3;
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Prevent horizontal scroll globally */
html {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative !important;
}

.app {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

* {
    max-width: 100vw;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
    }

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

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .topbar {
        padding: 1rem !important;
        padding-left: 4rem !important;
    }

    .content-wrapper,
    .tab-content,
    .dashboard-content {
        padding: 1rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

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

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

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .topbar {
        padding: 0.75rem 1rem !important;
        padding-left: 4rem !important;
        height: auto !important;
        min-height: 60px;
    }

    .page-title {
        font-size: 1.25rem !important;
    }

    .page-subtitle {
        font-size: 0.75rem !important;
    }

    .content-wrapper,
    .tab-content,
    .dashboard-content {
        padding: 0.75rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Stats Grid */
    .dashboard-stats,
    .stats-grid,
    .stats-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .stat-card {
        padding: 1rem !important;
        min-width: 0 !important;
    }

    /* Cards */
    .card {
        padding: 1rem !important;
        margin-bottom: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Forms */
    .form-row,
    .form-grid,
    .form-columns {
        display: block !important;
        width: 100% !important;
    }

    .form-row > *,
    .form-grid > *,
    .form-columns > * {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }

    .form-group {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-input,
    .form-select,
    .form-textarea,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important; /* Prevents iOS zoom */
    }

    /* Buttons */
    .btn {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 0.5rem !important;
    }

    .btn-group,
    .button-group,
    .action-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    /* Services Checkboxes */
    .services-grid,
    .checkbox-grid,
    .options-grid,
    .service-options {
        display: block !important;
        width: 100% !important;
    }

    .services-grid > *,
    .checkbox-grid > *,
    .options-grid > *,
    .service-options > * {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    .service-checkbox,
    .checkbox-item,
    .option-item {
        display: flex !important;
        width: 100% !important;
        padding: 0.75rem !important;
    }

    /* Upload Area */
    .upload-zone,
    .upload-dropzone,
    .file-drop-zone,
    .drop-zone {
        padding: 1.5rem 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Modals */
    .modal-content {
        margin: 0.5rem !important;
        width: calc(100% - 1rem) !important;
        max-width: calc(100% - 1rem) !important;
        max-height: 95vh !important;
    }

    .modal-body {
        padding: 1rem !important;
        overflow-y: auto !important;
        max-height: 60vh !important;
    }

    .modal-footer {
        padding: 1rem !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    /* Credits Grid */
    .credits-grid,
    .packages-grid,
    .pricing-grid {
        display: block !important;
        width: 100% !important;
    }

    .credits-grid > *,
    .packages-grid > *,
    .pricing-grid > * {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .dashboard-stats,
    .stats-grid,
    .stats-row {
        grid-template-columns: 1fr !important;
    }

    .topbar {
        padding-left: 3.5rem !important;
    }

    .page-title {
        font-size: 1.1rem !important;
    }

    .content-wrapper,
    .tab-content,
    .dashboard-content {
        padding: 0.5rem !important;
    }
}

/* ===== MOBILE TABLES & REQUESTS ===== */
@media (max-width: 768px) {
    /* Requests Table - Card View for Mobile */
    .requests-table {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    .requests-table table {
        display: block;
        width: 100% !important;
    }

    .requests-table thead {
        display: none;
    }

    .requests-table tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .requests-table tr {
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 16px;
        padding: 1.25rem;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .requests-table td {
        display: block;
        width: 100%;
        padding: 0.6rem 0;
        padding-left: 0 !important;
        margin-left: 0 !important;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.9rem;
        text-align: left !important;
        color: #1e293b;
        font-weight: 500;
    }

    .requests-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #64748b;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
        text-align: left;
    }

    .requests-table td .td-value,
    .requests-table td .status-badge {
        display: block;
        text-align: left;
        margin: 0;
        padding: 0;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .requests-table td:last-child {
        border-bottom: none;
        padding-top: 1rem;
    }

    .requests-table td[colspan] {
        align-items: center;
        text-align: center;
    }

    .requests-table td[colspan]::before {
        display: none;
    }

    /* Status badge in mobile */
    .requests-table .status-badge {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 20px;
    }

    /* Actions cell for mobile */
    .requests-table .actions-cell {
        padding-top: 0.75rem !important;
    }

    .requests-table .actions-cell::before {
        display: none;
    }

    .action-buttons-mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .action-buttons-mobile .btn {
        flex: 1;
        min-width: 70px;
        padding: 0.6rem 0.5rem !important;
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
        border-radius: 10px;
    }

    .action-buttons-mobile .btn .btn-text {
        display: none;
    }

    .action-buttons-mobile .btn i {
        margin: 0;
        font-size: 1rem;
    }

    /* Table Mobile Styles */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .professional-table {
        min-width: 600px;
    }

    .professional-table th,
    .professional-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .table-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .table-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .table-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Card-based table view for mobile */
    .mobile-card-view .professional-table {
        min-width: unset;
        display: block;
    }

    .mobile-card-view .professional-table thead {
        display: none;
    }

    .mobile-card-view .professional-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .mobile-card-view .professional-table tr {
        display: block;
        background: #f8fafc;
        border-radius: 12px;
        padding: 1rem;
        border: 1px solid #e5e7eb;
    }

    .mobile-card-view .professional-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-card-view .professional-table td:last-child {
        border-bottom: none;
    }

    .mobile-card-view .professional-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    /* File Upload Mobile Styles */
    .upload-container,
    .upload-section {
        padding: 1rem !important;
    }

    .upload-dropzone,
    .file-drop-zone {
        padding: 1.5rem 1rem !important;
        min-height: 150px;
    }

    .upload-icon {
        font-size: 2rem !important;
    }

    .upload-text {
        font-size: 0.9rem !important;
    }

    .upload-hint {
        font-size: 0.75rem !important;
    }

    /* Form Mobile Styles */
    .form-row,
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-input,
    .form-select {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* Request/File Cards Mobile */
    .request-card,
    .file-card {
        padding: 1rem !important;
    }

    .request-header,
    .file-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .request-actions,
    .file-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .request-actions .btn,
    .file-actions .btn {
        flex: 1;
        justify-content: center;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    /* Status Badges */
    .status-badge,
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* Modal Mobile Styles */
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
        max-height: 70vh;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Services Checkboxes Mobile */
    .services-grid,
    .checkbox-grid,
    .options-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .service-checkbox,
    .option-checkbox {
        padding: 0.75rem !important;
    }

    .service-checkbox label,
    .option-checkbox label {
        font-size: 0.85rem;
    }

    /* Credits/Pricing Cards Mobile */
    .credits-grid,
    .pricing-grid,
    .packages-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .credit-card,
    .pricing-card,
    .package-card {
        padding: 1rem !important;
    }

    /* Ticket View Mobile */
    .ticket-messages {
        max-height: 50vh;
    }

    .message-input-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .message-input-container textarea {
        min-height: 80px;
    }

    .message-input-container .btn {
        width: 100%;
    }

    /* Recent Activity Mobile */
    .activity-list {
        padding: 0.75rem !important;
    }

    .activity-item {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .activity-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }

    .activity-content {
        width: 100%;
    }

    .activity-time {
        font-size: 0.7rem;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .main-content {
        padding: 0.5rem !important;
        padding-top: 4rem !important;
    }

    .card {
        padding: 0.75rem !important;
        border-radius: 8px !important;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .topbar {
        padding: 0.5rem !important;
        padding-left: 3.5rem !important;
    }
}

/* ===== ADMIN SPECIFIC MOBILE STYLES ===== */
@media (max-width: 1024px) {
    /* Admin Stats Grid */
    .admin-stats,
    .stats-row,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Admin File Details Modal */
    .file-details-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin Users Table */
    .users-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    /* Admin Stats */
    .admin-stats,
    .stats-row,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin Filters */
    .filters-row,
    .filter-bar {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .filter-group {
        width: 100% !important;
    }

    .filter-group select,
    .filter-group input {
        width: 100% !important;
    }

    /* Admin Action Buttons */
    .action-buttons,
    .bulk-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .action-buttons .btn,
    .bulk-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* Admin File View */
    .file-info-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .file-info-item {
        padding: 0.75rem !important;
    }

    /* Admin User Details */
    .user-details-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin Services Selection */
    .admin-services-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin Chat/Tickets */
    .admin-chat-container {
        flex-direction: column !important;
    }

    .chat-sidebar {
        width: 100% !important;
        max-height: 200px;
        overflow-y: auto;
    }

    .chat-main {
        width: 100% !important;
    }

    /* Admin Modal */
    .admin-modal .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .admin-modal .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }

    /* Admin Tabs */
    .admin-tabs,
    .tab-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-tabs .tab-btn,
    .tab-buttons .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* Admin Quick Stats Cards */
    .quick-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Admin Charts */
    .chart-container {
        height: 200px !important;
        min-height: 200px !important;
    }

    .charts-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin Notifications */
    .notification-popup {
        right: 0.5rem !important;
        left: 0.5rem !important;
        max-width: none !important;
    }

    /* Admin Settings */
    .settings-grid {
        grid-template-columns: 1fr !important;
    }

    .settings-card {
        padding: 1rem !important;
    }

    /* Admin Credit Packages */
    .credit-packages-grid {
        grid-template-columns: 1fr !important;
    }

    /* File Upload Response */
    .upload-response-grid {
        grid-template-columns: 1fr !important;
    }

    /* ECU Info Display */
    .ecu-info-grid {
        grid-template-columns: 1fr !important;
    }

    /* Request Details View */
    .request-details-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .request-details-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .request-details-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
}

@media (max-width: 480px) {
    /* Admin Stats - Single Column */
    .quick-stats {
        grid-template-columns: 1fr !important;
    }

    /* Admin Action Buttons - Full Width */
    .action-buttons .btn,
    .bulk-actions .btn {
        width: 100%;
        min-width: 100%;
    }

    /* Admin Tabs - Full Width */
    .admin-tabs .tab-btn,
    .tab-buttons .btn {
        width: 100%;
        min-width: 100%;
    }
}


/* ===== WORKING HOURS NOTICE ===== */
.working-hours-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0 1rem 1rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 500;
}

.working-hours-notice i {
    color: #d97706;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .working-hours-notice {
        margin: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }
}

