/* DDDS Cloud - Production UI matching Reference Screenshots */
:root {
    --bg-dark-base: #060913;
    --bg-dark-card: #0c1427;
    --bg-dark-surface: #111c35;
    --border-dark: #1e293b;
    --border-accent: #0284c7;
    
    --primary-blue: #0284c7;
    --primary-cyan: #00d2ff;
    --btn-orange: #ea580c;
    --btn-green: #10b981;
    --btn-purple: #8b5cf6;
    --btn-red: #ef4444;
}

body {
    background-color: var(--bg-dark-base);
    color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Master Top Navigation */
.master-header {
    background: #090f1d;
    border-bottom: 1px solid #1a253c;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-icon {
    font-size: 1.8rem;
    color: #f59e0b;
}
.brand-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: white;
}
.brand-subtext {
    font-size: 0.65rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 1px;
    margin-top: -2px;
}

/* Top Center Status Group */
.top-status-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 0.82rem;
}
.ip-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
}
.ip-copy-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.ip-copy-btn:hover { background: #334155; }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.active { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-dot.inactive { background: #64748b; }

.display-status-badge {
    color: #ef4444;
    font-weight: 600;
}
.display-status-badge.online {
    color: #10b981;
}

.clock-display {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: #38bdf8;
}

/* Sub Banner (Wireless Wi-Fi Connect) */
.sub-wifi-banner {
    background: #0a1122;
    border-bottom: 1px solid #1a253c;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.wifi-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wifi-badge-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid #10b981;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}
.tv-url-box {
    background: #060b16;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 4px 12px;
    font-family: monospace;
    font-size: 0.88rem;
    color: #38bdf8;
    font-weight: 700;
}

/* 5 Main Navigation Tabs */
.tabs-navigation-strip {
    background: #090f1d;
    border-bottom: 1px solid #1a253c;
    padding: 8px 24px 0 24px;
    display: flex;
    gap: 12px;
}
.nav-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 10px 18px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    transition: all 0.2s ease;
}
.nav-tab-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.03);
}
.nav-tab-btn.active {
    background: #0d1629;
    color: #38bdf8;
    border-color: #1e293b;
    box-shadow: inset 0 2px 0 #38bdf8;
}
.tab-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.tab-subtitle-line {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
}
.nav-tab-btn.active .tab-subtitle-line {
    color: #94a3b8;
}

/* Tab Content Viewport */
.tab-content-panel {
    display: none;
    padding: 20px 24px;
}
.tab-content-panel.active {
    display: block;
}

/* Tab 1: Jonli Ekran Layout */
.jonli-ekran-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}
.stage-main-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tab-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tab-main-heading {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}
.tab-main-subheading {
    font-size: 0.88rem;
    color: #94a3b8;
    margin-top: 2px;
}

.mode-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mode-btn {
    background: #111a2f;
    border: 1px solid #1e293b;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.mode-btn.active {
    background: #0284c7;
    border-color: #0284c7;
    color: white;
}

/* Action Banner Box */
.action-banner-card {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.big-action-btn {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}
.big-action-btn:hover {
    background: linear-gradient(135deg, #0369a1, #1d4ed8);
}
.big-action-btn.broadcasting {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.tips-alert-box {
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Monitor Live Preview Stage */
.preview-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
}
.big-preview-viewport {
    background: #000;
    border: 2px solid #1e293b;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.big-preview-viewport img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.big-preview-viewport video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* PowerPoint Control Toolbar */
.control-toolbar-card {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.control-toolbar-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}
.buttons-flex-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.ppt-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.ppt-btn-prev { background: #1e293b; color: white; border: 1px solid #334155; }
.ppt-btn-next { background: #0284c7; color: white; }
.ppt-btn-f5 { background: #10b981; color: white; }
.ppt-btn-blackout { background: #ea580c; color: white; }
.ppt-btn-lock { background: #475569; color: white; }
.ppt-btn-touch-lock {
    background: #334155;
    color: #f8fafc;
    border: 1px solid #475569;
}
.ppt-btn-touch-lock:hover {
    background: #475569;
}
.ppt-btn-touch-lock.active {
    background: #ea580c;
    color: white;
    border-color: #f97316;
    box-shadow: 0 0 14px rgba(234, 88, 12, 0.45);
}
.ppt-btn-esc { background: #ef4444; color: white; }

/* Right Sidebar: Connected Displays */
.right-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sidebar-card {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.monitor-status-box {
    background: #070c17;
    border: 1px solid #1a253c;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.monitor-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
}
.monitor-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
}

/* Tab 2: Taqdimotlar Kutubxonasi */
.library-split-view {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    margin-top: 16px;
}
.upload-dropzone-box {
    border: 2px dashed #334155;
    border-radius: 14px;
    background: #070c17;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.upload-dropzone-box:hover {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.05);
}
.dropzone-folder-icon {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 10px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.portfolio-card {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    position: relative;
}
.portfolio-card.active {
    border-color: #0284c7;
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.25);
}
.deck-tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.format-pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
}
.format-pptx { background: #ea580c; color: white; }
.format-pdf { background: #ef4444; color: white; }

/* PowerPoint Full Detailed Viewer */
.detailed-pptx-viewer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pptx-viewer-header {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pptx-viewer-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    height: calc(100vh - 280px);
}
.vertical-slide-strip {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slide-strip-item {
    aspect-ratio: 16 / 9;
    background: #000;
    border: 2px solid transparent;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.slide-strip-item.active {
    border-color: #0284c7;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}
.slide-strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.strip-num-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
}
.strip-efir-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: #10b981;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Tab 3: Monitorlar & Ulanish Layout */
.connect-center-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
}
.connect-card {
    background: #0d1629;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 24px;
}
.big-tv-url-display {
    background: #060a14;
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: 800;
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
}
.connect-steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}
.connect-step-item {
    background: #080e1b;
    border: 1px solid #1a253c;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
}
.step-num-circle {
    background: #0284c7;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ==================================================== */
/* RESPONSIVE DESIGN & ADAPTIVE LAYOUTS FOR LOCALHOST  */
/* ==================================================== */

/* Horizontal scrolling for navigation tabs */
.tabs-navigation-strip {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.tabs-navigation-strip::-webkit-scrollbar {
    display: none;
}
.nav-tab-btn {
    flex-shrink: 0;
}

/* Screens under 1280px (Standard Laptops 1366x768 & Scaled DPI) */
@media (max-width: 1280px) {
    .master-header {
        padding: 8px 16px;
    }
    .top-status-group {
        gap: 8px;
        padding: 4px 12px;
        font-size: 0.78rem;
    }
    .jonli-ekran-container {
        grid-template-columns: 1fr 310px;
        gap: 16px;
    }
}

/* Screens under 1024px (Tablets, Split-screen Windows) */
@media (max-width: 1024px) {
    .master-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .top-status-group {
        width: 100%;
        justify-content: space-between;
        order: 3;
    }
    .sub-wifi-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .sub-wifi-banner > div:last-child {
        width: 100%;
        justify-content: flex-start;
    }
    .jonli-ekran-container {
        grid-template-columns: 1fr;
    }
    .right-sidebar-panel {
        order: 2;
    }
    .library-split-view {
        grid-template-columns: 1fr;
    }
}

/* Screens under 768px (Mobile & Portrait Tablets) */
@media (max-width: 768px) {
    .tab-content-panel {
        padding: 14px 12px;
    }
    .tab-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .tab-main-heading {
        font-size: 1.15rem;
    }
    .buttons-flex-row {
        gap: 6px;
    }
    .ppt-btn {
        flex: 1 1 calc(50% - 6px);
        padding: 8px 10px;
        font-size: 0.8rem;
        justify-content: center;
    }
    .connect-steps-grid {
        grid-template-columns: 1fr;
    }
    .big-tv-url-display {
        flex-direction: column;
        gap: 10px;
        font-size: 1.1rem;
        word-break: break-all;
    }
    .big-tv-url-display > div {
        width: 100%;
    }
    .big-tv-url-display button,
    .big-tv-url-display a {
        flex: 1;
        text-align: center;
    }
    #tab-remote > div {
        grid-template-columns: 1fr !important;
    }
    #tab-diag > div {
        grid-template-columns: 1fr !important;
    }
}
