/* Midnight Static TV - MS-DOS / Word 5.5 admin theme */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&display=swap");

:root {
    --dos-desktop: #000080;
    --dos-dialog: #c0c0c0;
    --dos-dialog-dark: #808080;
    --dos-dialog-light: #dfdfdf;
    --dos-text: #000000;
    --dos-text-muted: #404040;
    --dos-inverse: #ffffff;
    --dos-toolbar: #4040c0;
    --dos-toolbar-light: #8080ff;
    --dos-status: #008080;
    --dos-status-gray: #c0c0c0;
    --dos-highlight: #000080;
    --dos-danger: #800000;
    --dos-warning: #808000;
    --dos-success: #008000;
    --dos-shadow: #000000;
    --dos-document: #ffffff;
    --dos-field-bg: #ffffff;
    --bg: #000080;
    --panel-bg: #c0c0c0;
    --panel-border: #808080;
    --panel-border-light: #dfdfdf;
    --text-primary: #000000;
    --text-secondary: #404040;
    --text-muted: #606060;
    --accent: #000080;
    --accent-soft: #0000aa;
    --danger: #800000;
    --warning: #808000;
    --info: #000080;
    --shadow: rgba(0, 0, 0, 0.55);
    --timeline-bg: #ffffff;
    --timeline-guide: rgba(0, 0, 128, 0.08);
}

* { box-sizing: border-box; }

html, body.admin-dos {
    margin: 0;
    min-height: 100vh;
    background: #000080;
    color: #000;
    font-family: "IBM Plex Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.35;
}

body.admin-dos { display: flex; flex-direction: column; }
a { color: #000080; }

.dos-menubar, .dos-toolbar, .dos-statusbar, .dos-helpbar { flex-shrink: 0; }

.dos-menubar {
    display: flex;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 2px 4px;
    font-size: 13px;
}

.dos-menu-item {
    padding: 2px 10px;
    color: inherit;
    text-decoration: none;
}

.dos-menu-item:hover, .dos-menu-item.active {
    background: #000080;
    color: #fff;
}

.dos-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: linear-gradient(180deg, #8080ff 0%, #4040c0 100%);
    color: #fff;
    border-bottom: 1px solid #808080;
    padding: 4px 8px;
    font-size: 12px;
}

.dos-toolbar-field {
    background: #c0c0c0;
    color: #000;
    border: 1px solid #808080;
    padding: 1px 6px;
}

.dos-workspace {
    flex: 1;
    min-height: 0;
    padding: 18px;
    overflow: auto;
    background: #000080;
}

.dos-document-window, .dos-dialog {
    background: #c0c0c0;
    color: #000;
    border: 2px solid #dfdfdf;
    outline: 2px solid #808080;
    box-shadow: 4px 4px 0 #000;
}

.dos-document-window {
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
}

.dos-dialog { width: min(460px, 92vw); margin: 0 auto; }

.dos-dialog-title {
    background: linear-gradient(90deg, #000080, #0000aa);
    color: #fff;
    padding: 2px 6px;
    font-weight: 700;
}

.dos-dialog-body { padding: 14px 16px 10px; }

.dos-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px 14px;
}

.dos-statusbar {
    display: flex;
    justify-content: space-between;
    background: #c0c0c0;
    border-top: 1px solid #dfdfdf;
    padding: 2px 8px;
    font-size: 12px;
}

.dos-helpbar {
    background: #008080;
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    min-height: 20px;
}

.dos-field-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dos-field-bracket {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #808080;
    padding: 2px 6px;
}

.dos-field-bracket input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    outline: none;
    min-width: 0;
}

.dos-btn {
    background: #c0c0c0;
    color: #000;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 3px 14px;
    min-width: 76px;
    font: inherit;
    cursor: pointer;
}

.dos-btn:active { border-color: #808080 #dfdfdf #dfdfdf #808080; }
.dos-error { color: #800000; margin-top: 8px; font-size: 12px; }
.dos-note { margin-top: 12px; font-size: 12px; color: #404040; }

.dos-login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000080;
}

.dos-login-screen .dos-workspace {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.admin-dos .admin-container, body.admin-dos .container { padding: 16px 18px 24px; }

body.admin-dos .admin-header, body.admin-dos .header {
    text-align: left;
    border-bottom: 1px dashed #808080;
    margin-bottom: 14px;
    padding-bottom: 10px;
}

body.admin-dos .admin-title, body.admin-dos .header h1 {
    font-size: 1.35rem;
    color: #000;
    text-shadow: none;
    margin: 0 0 4px;
}

body.admin-dos .admin-subtitle { color: #404040; }

body.admin-dos .navigation-links {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

body.admin-dos .nav-link {
    background: #c0c0c0;
    color: #000;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 2px 10px;
    text-decoration: none;
    border-radius: 0;
    text-shadow: none;
}

body.admin-dos .tab-container { border-bottom: 1px solid #808080; gap: 2px; }

body.admin-dos .tab-button {
    background: #c0c0c0;
    color: #000;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    border-radius: 0;
    box-shadow: none;
}

body.admin-dos .tab-button.active {
    background: #000080;
    color: #fff;
}

body.admin-dos .panel, body.admin-dos .system-status, body.admin-dos .channel-card,
body.admin-dos .schedule-panel, body.admin-dos .media-panel, body.admin-dos .stats-card {
    background: #fff;
    color: #000;
    border: 1px solid #808080;
    border-radius: 0;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

body.admin-dos .panel h2, body.admin-dos .panel h3, body.admin-dos .system-status h2 {
    color: #000;
    border-bottom: 1px solid #808080;
    text-shadow: none;
}

body.admin-dos .btn, body.admin-dos button, body.admin-dos .controls button {
    background: #c0c0c0;
    color: #000;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    border-radius: 0;
    font: inherit;
}

body.admin-dos .btn-danger { color: #800000; }

body.admin-dos input, body.admin-dos select, body.admin-dos textarea {
    background: #fff;
    color: #000;
    border: 1px solid #808080;
    border-radius: 0;
    font: inherit;
}

body.admin-dos th, body.admin-dos td { border: 1px solid #808080; padding: 4px 8px; }
body.admin-dos th { background: #c0c0c0; }
body.admin-dos .status-indicator { border-radius: 0; }
body.admin-dos .status-playing { background: #008000; }
body.admin-dos .status-stopped { background: #800000; }
body.admin-dos .status-error { background: #808000; }
body.admin-dos .status-static { background: #000080; }
body.admin-dos .schedule-item { background: #000080; color: #fff; border-radius: 0; }
body.admin-dos .channel-preview, body.admin-dos .preview-placeholder { border-radius: 0; background: #000; color: #c0c0c0; }

body.admin-dos .scheduler-container { height: calc(100vh - 88px); }

@media (max-width: 768px) {
    .dos-field-row { grid-template-columns: 1fr; }
    .dos-menubar { flex-wrap: wrap; }
}

/* Admin top navigation (replaces DOS menu/toolbar) */
.admin-top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
}

.admin-top-nav-link {
    background: #c0c0c0;
    color: #000;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 4px 12px;
    text-decoration: none;
    font-size: 13px;
}

.admin-top-nav-link:hover { background: #d6d6d6; }
.admin-top-nav-link.active {
    background: #000080;
    color: #fff;
    border-color: #404040;
}

.admin-logout-form { margin-left: auto; }

body.admin-dos .dos-workspace {
    padding: 12px;
    background: #808080;
}

body.admin-dos.scheduler-page .scheduler-workspace {
    padding: 0;
    background: #c0c0c0;
}

body.admin-dos .status-streaming,
body.admin-dos .status-playing { background: #008000; }

.dos-login-screen .dos-workspace {
    background: #000080;
    min-height: calc(100vh - 0px);
}

body.admin-dos .channel-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
