/* ===== 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;
    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 ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-primary);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
}

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

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

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

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

.logo-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

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

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

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

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

.nav-icon {
    width: 1.25rem;
    display: flex;
    justify-content: center;
    color: var(--text-tertiary);
    transition: var(--transition);
}

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

.nav-link:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

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

.nav-item.active .nav-link {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 600;
}

.nav-item.active .nav-link .nav-icon {
    color: var(--primary);
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

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

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

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

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.2;
}

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

/* ===== TOP BAR ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-primary);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

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

.btn-create {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

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

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

.topbar-action:hover {
    color: var(--primary);
    border-color: var(--primary-200);
    background: var(--primary-50);
}

/* ===== 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;
    animation: fadeIn 0.3s ease-out;
}

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

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(1rem); 
    }
    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: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

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

.stat-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;
}

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

.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }

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

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

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

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

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.stat-trend.positive {
    color: var(--success-600);
    background: var(--success-50);
}

.stat-trend.negative {
    color: var(--danger-600);
    background: var(--danger-50);
}

.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-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.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;
}

/* ===== FEATURES SHOWCASE SECTION ===== */

.features-showcase-section {
    margin-top: 3rem;
    padding: 2rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card.shoutcast-feature::before {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.feature-card.recording-feature::before {
    background: linear-gradient(90deg, #10b981, #06b6d4);
}

.feature-card.rtmp-feature::before {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shoutcast-feature .feature-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
}

.shoutcast-feature .feature-icon i {
    background: linear-gradient(135deg, #fbbf24, #f87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recording-feature .feature-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
}

.recording-feature .feature-icon i {
    background: linear-gradient(135deg, #34d399, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rtmp-feature .feature-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.2));
}

.rtmp-feature .feature-icon i {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.feature-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.feature-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-highlights li i {
    color: #10b981;
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.feature-actions {
    margin-top: 1.5rem;
}

.feature-actions .btn {
    width: auto;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.feature-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-badge.new {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

.feature-badge.popular {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.feature-badge i {
    font-size: 0.85rem;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(245, 158, 11, 0.7);
        transform: scale(1.05);
    }
}

/* Responsive Design for Features */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

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

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon i {
        font-size: 2rem;
    }

    .feature-title {
        font-size: 1.25rem;
    }

    .feature-badge {
        top: 1rem;
        right: 1rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
}

/* ===== LICENSE MANAGEMENT STYLES ===== */
.license-status-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.license-status-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.license-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.license-icon.valid {
    background: var(--success-50);
    color: var(--success-600);
}

.license-icon.invalid {
    background: var(--danger-50);
    color: var(--danger-600);
}

.license-icon.checking {
    background: var(--info-50);
    color: var(--info-600);
}

.license-status-info {
    flex: 1;
}

.license-status-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 4px 0;
}

.license-status-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
}

.license-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.license-status-badge.valid {
    background: var(--success-50);
    color: var(--success-700);
}

.license-status-badge.invalid {
    background: var(--danger-50);
    color: var(--danger-700);
}

.license-status-badge.checking {
    background: var(--info-50);
    color: var(--info-700);
}

.license-status-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.license-status-badge.valid .status-dot {
    background: var(--success-600);
}

.license-status-badge.invalid .status-dot {
    background: var(--danger-600);
}

.license-status-badge.checking .status-dot {
    background: var(--info-600);
}

.license-status-details {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.license-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-700);
}

.license-detail-item i {
    color: var(--primary-500);
    width: 20px;
    text-align: center;
}

.license-detail-item strong {
    color: var(--gray-900);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }

    .license-status-header {
        flex-wrap: wrap;
    }
}

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

/* ===== ENHANCED MOBILE RESPONSIVE STYLES ===== */

/* Mobile First - Small phones (320px - 480px) */
@media (max-width: 480px) {
    /* Base typography scaling */
    html {
        font-size: 14px;
    }

    /* Sidebar improvements */
    .sidebar {
        width: 85vw;
        max-width: 300px;
    }

    .sidebar-header {
        padding: 1rem;
    }

    .logo-title {
        font-size: 1.1rem;
    }

    .logo-subtitle {
        font-size: 0.7rem;
    }

    .nav-link {
        padding: 0.875rem 1rem;
    }

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

    /* Topbar mobile */
    .topbar {
        padding: 0.75rem 0.75rem 0.75rem 3.5rem;
        min-height: auto;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .page-subtitle {
        font-size: 0.75rem;
        display: none;
    }

    .topbar-actions {
        gap: 0.5rem;
    }

    .topbar-action {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    /* Mobile menu toggle */
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        left: 0.75rem;
        font-size: 1.1rem;
    }

    /* Stats grid - single column on small phones */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .stat-content {
        flex: 1;
        text-align: left;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Stream cards - full width */
    .streams-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stream-card {
        padding: 1rem;
    }

    .stream-header {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .status-badge {
        align-self: flex-start;
        order: 0;
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

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

    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .info-row strong {
        font-size: 0.75rem;
        min-width: auto;
    }

    .url-text {
        font-size: 0.65rem;
        padding: 0.375rem 0.5rem;
    }

    /* Stream actions - stack vertically */
    .stream-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stream-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    /* Quick actions grid */
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

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

    /* Modal improvements */
    .modal-container {
        width: 95%;
        max-width: none;
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }

    .modal-header {
        padding: 0.875rem;
    }

    .modal-body {
        padding: 0.875rem;
    }

    .modal-icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .modal-title-content h2 {
        font-size: 1.1rem;
    }

    .modal-title-content p {
        font-size: 0.75rem;
    }

    /* Form elements */
    .form-group {
        margin-bottom: 0.875rem;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 1rem; /* Prevents zoom on iOS */
    }

    .form-help {
        font-size: 0.7rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px; /* Touch target */
    }

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

    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
        padding: 0.875rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Tables - card-like display */
    .table-responsive {
        margin: 0 -0.5rem;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.5rem;
    }

    /* Notification toast */
    .notification {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        max-width: none;
        font-size: 0.875rem;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-description {
        font-size: 0.8rem;
    }

    /* Content sections */
    .content-section {
        padding: 0.75rem;
    }

    /* Settings groups */
    .settings-group {
        padding: 1rem;
        margin-bottom: 1rem;
    }

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

    .settings-group-header p {
        font-size: 0.75rem;
    }
}

/* Medium phones and small tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .streams-grid {
        grid-template-columns: 1fr;
    }

    .stream-actions {
        flex-wrap: wrap;
    }

    .stream-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-container {
        width: 90%;
        max-width: 500px;
    }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .streams-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        min-height: 48px;
    }

    .topbar-action {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects on touch */
    .stream-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .nav-link:hover {
        background: transparent;
    }

    /* Active states instead */
    .stream-card:active {
        transform: scale(0.98);
    }

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

    .nav-link:active {
        background: var(--primary-50);
    }

    /* Prevent text selection on interactive elements */
    .btn,
    .nav-link,
    .topbar-action,
    .stream-card {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
    .topbar {
        padding: 0.5rem 0.75rem 0.5rem 3.5rem;
    }

    .modal-container {
        max-height: 95vh;
    }

    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-card {
        padding: 0.75rem;
    }
}

/* Safe area for notched phones (iPhone X, etc) */
@supports (padding: max(0px)) {
    .sidebar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .main-content {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .notification {
        bottom: max(0.5rem, env(safe-area-inset-bottom));
        left: max(0.5rem, env(safe-area-inset-left));
        right: max(0.5rem, env(safe-area-inset-right));
    }
}

/* Dark mode preference for OLED screens (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode - can be enabled later */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .stream-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* ===== STREAM HEALTH PANEL ===== */
.stream-health-panel {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.health-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.health-header > i {
    color: var(--success);
    font-size: 1.1rem;
}

.health-header > span:first-of-type {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.health-status {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.health-status.health-good {
    background: var(--success-50);
    color: var(--success-600);
    border: 1px solid var(--success-100);
}

.health-status.health-warning {
    background: var(--warning-50);
    color: var(--warning-600);
    border: 1px solid var(--warning-100);
}

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

.health-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.health-stat {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.health-stat:hover {
    border-color: var(--primary-200);
    background: var(--primary-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.health-stat .stat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-radius: 8px;
    flex-shrink: 0;
}

.health-stat .stat-icon i {
    color: var(--primary);
    font-size: 0.85rem;
}

.health-stat .stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.health-stat .stat-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.health-stat .stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Different icon colors for variety */
.health-stat:nth-child(1) .stat-icon { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.health-stat:nth-child(1) .stat-icon i { color: #059669; }

.health-stat:nth-child(2) .stat-icon { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.health-stat:nth-child(2) .stat-icon i { color: #d97706; }

.health-stat:nth-child(3) .stat-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.health-stat:nth-child(3) .stat-icon i { color: #7c3aed; }

.health-stat:nth-child(4) .stat-icon { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.health-stat:nth-child(4) .stat-icon i { color: #db2777; }

.health-stat:nth-child(5) .stat-icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.health-stat:nth-child(5) .stat-icon i { color: #2563eb; }

.health-stat:nth-child(6) .stat-icon { background: linear-gradient(135deg, #fed7aa, #fdba74); }
.health-stat:nth-child(6) .stat-icon i { color: #ea580c; }

.health-stat:nth-child(7) .stat-icon { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.health-stat:nth-child(7) .stat-icon i { color: #dc2626; }

.health-stat:nth-child(8) .stat-icon { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.health-stat:nth-child(8) .stat-icon i { color: #0891b2; }

.health-stat:nth-child(9) .stat-icon { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.health-stat:nth-child(9) .stat-icon i { color: #16a34a; }

/* Responsive health panel */
@media (max-width: 768px) {
    .health-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .health-stats-grid {
        grid-template-columns: 1fr;
    }

    .health-stat {
        padding: 0.5rem;
    }

    .health-stat .stat-icon {
        width: 28px;
        height: 28px;
    }

    .health-stat .stat-icon i {
        font-size: 0.75rem;
    }
}


/* ===== RADIO AUTOMATION STYLES ===== */

/* Radio Sub-Navigation */
.radio-subnav-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-subnav-btn:hover {
    color: #2563eb;
    background: #f8fafc;
}

.radio-subnav-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.radio-subnav-btn i {
    font-size: 0.875rem;
}

/* Station Card Styles */
.station-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.station-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-station-action:hover {
    background: #f8fafc !important;
}

/* Upload Zone */
.upload-zone:hover {
    border-color: #2563eb !important;
    background: #f8fafc !important;
}

.upload-zone.dragover {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

/* Media Table */
.radio-media-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#radioMediaTableBody tr:hover {
    background: #f8fafc;
}

/* Available Track Items */
.available-track-item:hover {
    background: #f0fdf4;
}

.available-track-item:hover .fa-plus {
    transform: scale(1.2);
}

/* Playlist Track Items */
.playlist-track-item {
    cursor: grab;
    transition: background 0.15s;
}

.playlist-track-item:hover {
    background: #f8fafc;
}

.playlist-track-item:active {
    cursor: grabbing;
    background: #e2e8f0;
}

/* Day Checkbox */
.day-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.day-checkbox:hover {
    background: #e2e8f0;
}

.day-checkbox input:checked + span,
.day-checkbox:has(input:checked) {
    background: #2563eb;
    color: white;
}

.day-checkbox input {
    width: auto;
    margin: 0;
}

/* Status Badges for Radio */
.status-badge.status-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.status-badge.status-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.status-badge.status-secondary {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
}

/* Now Playing Modal */
#radioNowPlayingModal .modal-body {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Responsive Radio */
@media (max-width: 768px) {
    .radio-subnav {
        overflow-x: auto;
        flex-wrap: nowrap !important;
    }
    
    .radio-subnav-btn {
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .radio-stations-grid {
        grid-template-columns: 1fr !important;
    }
    
    #playlistEditorModal .modal-body {
        grid-template-columns: 1fr !important;
    }
}

/* ===== MANUAL SECTION STYLES ===== */
.manual-section {
    max-width: 1000px;
    margin: 0 auto;
}

.manual-toc {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.manual-toc h3 {
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.manual-toc h3 i {
    color: var(--primary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.toc-list li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.toc-list li a:hover {
    background: var(--primary-50);
    color: var(--primary);
    padding-left: 1.25rem;
}

.manual-chapter {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.manual-chapter h3 {
    color: var(--gray-800);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-100);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.manual-chapter h3 i {
    color: var(--primary);
    font-size: 1.1rem;
}

.manual-content {
    color: var(--gray-700);
    line-height: 1.7;
}

.manual-content h4 {
    color: var(--gray-800);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
}

.manual-content p {
    margin-bottom: 1rem;
}

.manual-content ul,
.manual-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.manual-content li {
    margin-bottom: 0.5rem;
}

.manual-content code {
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--primary-700);
}

.manual-code {
    background: var(--gray-800);
    color: #e5e7eb;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 1rem 0;
    white-space: pre;
    line-height: 1.6;
}

.manual-note {
    background: var(--info-50);
    border: 1px solid var(--info-100);
    border-left: 4px solid var(--info-500);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.manual-note i {
    color: var(--info-500);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.manual-note span {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.5;
}

.manual-note.warning {
    background: var(--warning-50);
    border-color: var(--warning-100);
    border-left-color: var(--warning-500);
}

.manual-note.warning i {
    color: var(--warning-500);
}

.manual-content .status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.manual-content .status-running {
    background: var(--success-100);
    color: var(--success-600);
}

.manual-content .status-stopped {
    background: var(--gray-200);
    color: var(--gray-600);
}

.manual-content .status-error {
    background: var(--danger-100);
    color: var(--danger-600);
}

/* Manual responsive */
@media (max-width: 768px) {
    .manual-section {
        padding: 0 0.5rem;
    }

    .manual-chapter,
    .manual-toc {
        padding: 1rem 1.25rem;
    }

    .toc-list {
        grid-template-columns: 1fr;
    }

    .manual-code {
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
    }
}
