@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
    --void: #02070b;
    --panel: #041019;
    --panel-deep: #020a10;
    --line: #12384c;
    --line-bright: #08baf7;
    --cyan: #10bdff;
    --cyan-soft: #86dcff;
    --text: #a8bfd0;
    --green: #45db84;
    --amber: #ff9f1a;
    --red: #ff463e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }

.app-root.mode-cool {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 139, 204, .08), transparent 42%),
        linear-gradient(rgba(8, 32, 45, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 32, 45, .16) 1px, transparent 1px),
        var(--void);
    background-size: auto, 42px 42px, 42px 42px, auto;
    font-family: "Chakra Petch", "Arial Narrow", sans-serif;
}

.mode-switcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    display: flex;
    padding: 4px;
    border: 1px solid #316279;
    border-radius: 999px;
    background: rgba(1, 8, 13, .92);
    box-shadow: 0 0 20px rgba(0, 183, 255, .2);
    backdrop-filter: blur(8px);
}

.mode-switcher button {
    min-width: 62px;
    padding: 7px 12px;
    color: #7891a3;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: 700 12px/1 "Share Tech Mono", monospace;
    letter-spacing: .1em;
}

.mode-switcher button.active {
    color: #001018;
    background: var(--cyan);
    box-shadow: 0 0 12px rgba(16, 189, 255, .65);
}

.mode-fool .mode-switcher {
    border-color: #b8b8b8;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
}

.mode-fool .mode-switcher button.active { color: #fff; background: #6c757d; box-shadow: none; }

.cool-shell {
    display: grid;
    grid-template-columns: 220px minmax(610px, 1fr) 335px;
    gap: 18px;
    min-height: 100vh;
    padding: 14px 18px 16px 6px;
}

.cyber-panel,
.cyber-sidebar,
.cyber-rightbar > article {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(4, 17, 26, .97), rgba(1, 8, 13, .98));
    box-shadow: inset 0 0 22px rgba(0, 112, 164, .025);
}

.cyber-panel::after,
.cyber-sidebar::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: .12;
    background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(83, 193, 244, .08) 4px);
}

.cyber-sidebar {
    position: fixed;
    left: 6px;
    top: 14px;
    width: 220px;
    height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.brand-block {
    display: flex;
    min-height: 168px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--line);
}

.brand-bell {
    width: 98px;
    height: 86px;
    fill: rgba(8, 160, 224, .09);
    stroke: #67c8ff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    filter: drop-shadow(0 0 8px #147eaf);
}

.brand-block strong { color: #ccdfec; font-size: 20px; letter-spacing: .025em; }
.brand-block small { color: #668296; font: 13px "Share Tech Mono", monospace; }

.cyber-nav { padding-top: 14px; }
.cyber-nav button {
    width: 100%;
    height: 61px;
    padding: 0 20px;
    color: #9ab3c5;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    text-align: left;
    transition: .2s ease;
}
.cyber-nav button span { display: inline-block; width: 38px; color: #7693aa; font-size: 27px; vertical-align: middle; }
.cyber-nav button:hover,
.cyber-nav button.active { color: #e2f5ff; border-left-color: var(--cyan); background: linear-gradient(90deg, rgba(0, 164, 230, .35), rgba(0, 118, 178, .08)); }
.cyber-nav button.active span { color: var(--cyan-soft); text-shadow: 0 0 12px var(--cyan); }

.system-status { margin: auto 20px 0; padding: 24px 12px; border-top: 1px solid var(--line); }
.system-status div { color: var(--green); font-size: 14px; }
.system-status i { display: inline-block; width: 11px; height: 11px; margin-right: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.system-status small { display: block; color: #8da6b9; line-height: 1.5; }
.sidebar-footer { padding: 12px; color: var(--cyan); border-top: 1px solid var(--line); font: 13px "Share Tech Mono", monospace; text-align: center; }

.cyber-main { min-width: 0; grid-column: 2; }
.hero-panel { min-height: 325px; padding: 20px 36px 15px; text-align: center; }
.scan-grid {
    position: absolute;
    inset: 0;
    opacity: .5;
    background-image: radial-gradient(circle, rgba(17, 162, 222, .32) 1px, transparent 1px);
    background-size: 11px 11px;
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
.hero-panel > *:not(.scan-grid) { position: relative; z-index: 1; }
.hero-panel > time {
    display: block;
    color: #3dd1ff;
    font: 76px/.9 "Share Tech Mono", monospace;
    letter-spacing: .02em;
    text-shadow: 0 0 7px #009cd7, 0 0 18px rgba(0, 179, 255, .35);
}
.date-line { margin: 8px 0 20px; color: #3aace0; font-size: 17px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hero-panel h1 { margin: 0; color: #1ab8ff; font-size: 29px; font-weight: 600; letter-spacing: .08em; }
.hero-panel p { margin: 2px 0 7px; color: #a6b8c6; font-size: 20px; }
.progress-row { display: flex; max-width: 660px; margin: 0 auto 10px; align-items: center; gap: 15px; }
.progress-row b { min-width: 44px; color: #aabeca; font: 16px "Share Tech Mono", monospace; }
.cyber-progress { overflow: visible; position: relative; width: 100%; height: 10px; border-radius: 10px; background: #1a2a35; box-shadow: inset 0 1px 2px #000; }
.cyber-progress span { display: block; position: relative; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00a9ec, #19c9ff); box-shadow: 0 0 12px #00bfff; }
.cyber-progress span::after { content: ""; position: absolute; right: -8px; top: -5px; width: 18px; height: 18px; border: 1px solid #5bdaff; border-radius: 50%; background: #149ed2; box-shadow: 0 0 10px #23c8ff; }
.hero-panel h2 { margin: 0; color: var(--cyan); font-size: 22px; font-weight: 600; letter-spacing: .08em; }
.hero-panel h3 { margin: 2px 0 0; color: #a9bed0; font-size: 16px; font-weight: 500; letter-spacing: .08em; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; padding: 16px 32px 18px; }
.action-card {
    overflow: hidden;
    min-width: 0;
    height: 151px;
    padding: 12px 0 0;
    color: var(--cyan);
    border: 1px solid currentColor;
    border-radius: 8px;
    background: linear-gradient(rgba(0, 84, 124, .08), rgba(0, 20, 30, .8));
    box-shadow: inset 0 0 25px rgba(0, 155, 229, .08), 0 0 10px rgba(0, 183, 255, .12);
    transition: transform .16s ease, box-shadow .16s ease;
}
.action-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 30px rgba(0, 155, 229, .14), 0 0 18px rgba(0, 183, 255, .22); }
.action-card strong { display: block; font-size: 15px; }
.action-card .bell-icon, .action-card .alarm-icon { display: block; height: 103px; margin: 0 auto; font: 70px/1.25 "Share Tech Mono", monospace; text-shadow: 0 0 15px currentColor; }
.action-card svg.bell-icon { width: 76px; padding: 5px; fill: rgba(0, 174, 240, .08); stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px currentColor); }
.action-card .alarm-icon { transform: none; font-size: 51px; }
.action-card em { display: block; height: 35px; padding-top: 7px; border-top: 1px solid rgba(62, 207, 255, .22); font-style: normal; text-shadow: 0 0 8px currentColor; }
.action-card.amber { color: var(--amber); background: linear-gradient(rgba(97, 56, 0, .18), rgba(28, 16, 0, .84)); box-shadow: inset 0 0 25px rgba(255, 153, 0, .11), 0 0 12px rgba(255, 153, 0, .15); }
.action-card.red { color: var(--red); background: linear-gradient(rgba(112, 13, 8, .18), rgba(38, 5, 3, .88)); box-shadow: inset 0 0 25px rgba(255, 48, 40, .12), 0 0 12px rgba(255, 48, 40, .15); }

.workspace-grid { display: block; }
.workspace-grid > article { width: 100%; }
.cyber-panel > header { position: relative; z-index: 2; display: flex; height: 47px; padding: 0 14px 0 18px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.cyber-panel header h2 { margin: 0; color: var(--cyan); font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.cyber-panel header button,
.lesson-form button,
.data-panel button,
.file-button { color: var(--cyan); border: 1px solid #1e5e7d; border-radius: 5px; background: rgba(0, 91, 133, .08); }
.cyber-panel header button { padding: 5px 10px; font-size: 12px; }

.schedule-panel, .sounds-panel, .data-panel { min-height: 465px; }
.data-panel { display: grid; grid-template-columns: 1fr 1fr; }
.data-panel > header { grid-column: 1 / -1; }
.lesson-form { position: relative; z-index: 3; display: flex; gap: 22px; padding: 14px 17px; border-bottom: 1px solid var(--line); background: #06141d; align-items: center; flex-wrap: wrap; font-size: 12px; }
.lesson-form label { display: flex; align-items: center; gap: 5px; }
.lesson-form input { width: 58px; padding: 6px 8px; color: #c5e5f5; border: 1px solid #28536a; border-radius: 4px; background: #020b11; text-align: center; }
.lesson-form button { min-width: 130px; margin-left: auto; padding: 7px 14px; }
.timeline { position: relative; z-index: 1; padding: 9px 17px; }
.timeline::before { content: ""; position: absolute; left: 84px; top: 21px; bottom: 22px; border-left: 1px dashed #3a5d70; }
.timeline-row { display: grid; position: relative; grid-template-columns: 58px 22px 1fr 20px; min-height: 54px; align-items: start; font-size: 14px; }
.timeline-row > time { padding-top: 5px; color: #9ab5c8; font: 14px "Share Tech Mono", monospace; }
.timeline-dot { z-index: 1; width: 13px; height: 13px; margin-top: 7px; border: 1px solid #7291a4; border-radius: 50%; background: #0c1d29; }
.timeline-row > div { display: flex; padding: 2px 6px; align-items: center; justify-content: space-between; gap: 8px; }
.timeline-row b { color: #91a8b9; font-weight: 500; }
.timeline-row small { color: #7892a5; font: 12px "Share Tech Mono", monospace; }
.timeline-row > button { color: #566f80; border: 0; background: transparent; font-size: 20px; opacity: 0; }
.timeline-row:hover > button { opacity: 1; }
.timeline-row.passed .timeline-dot { border-color: var(--green); background: var(--green); box-shadow: 0 0 10px var(--green); }
.timeline-row.passed b { color: #64c78a; }
.timeline-row.active .timeline-dot { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.timeline-row.active b, .timeline-row.active time { color: #33caff; font-weight: 700; }
.empty-state { position: relative; z-index: 2; padding: 105px 20px; color: #557185; text-align: center; }
.empty-state small { color: #3c5668; }

.sound-row { position: relative; z-index: 2; display: flex; padding: 0 12px 10px; border-bottom: 1px solid #183441; align-items: center; column-gap: 24px; flex-wrap: wrap; font: 11px "Share Tech Mono", monospace; }
.sound-heading { display: flex; width: calc(100% + 24px); height: 33px; margin: 0 -12px 7px; padding: 0 12px; color: var(--amber); align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255, 159, 26, .27); }
.sound-heading button { color: currentColor; border: 0; background: transparent; }
.sound-heading.cyan-text { color: var(--cyan); border-color: rgba(16, 189, 255, .25); }
.sound-row label { display: flex; min-width: 0; margin: 3px 0; color: #8096a5; align-items: center; gap: 8px; white-space: nowrap; }
.sound-row .source-control { flex: 1 0 100%; }
.sound-row .volume-control { min-width: 280px; flex: 1 1 320px; }
.sound-row .duration-control,
.sound-row .sign-offset { flex: 0 0 auto; }
.sound-row input:not([type="range"]) { min-width: 0; flex: 1; padding: 3px 7px; color: #9cb3c4; border: 1px solid #193747; border-radius: 3px; background: #020b11; }
.sound-row input[type="range"] { width: 100%; min-width: 120px; accent-color: var(--cyan); }
.sound-row.amber-row input[type="range"] { accent-color: var(--amber); }
.sound-row.red-row input[type="range"] { accent-color: var(--red); }
.sound-row input.short-input { width: 52px; flex: none; }
.sound-row .sign-offset { justify-content: flex-end; }
.mode-cool input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.mode-cool input[type="number"]::-webkit-inner-spin-button,
.mode-cool input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.mode-cool input:focus,
.mode-cool textarea:focus,
.mode-cool select:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(16, 189, 255, .2), 0 0 10px rgba(16, 189, 255, .12); }
.red-row .sound-heading { color: var(--red); border-color: rgba(255, 70, 62, .25); }

.data-panel section { position: relative; z-index: 2; margin: 13px; padding: 20px 14px; border: 1px solid #14394c; border-radius: 6px; }
.data-panel h3 { color: var(--cyan); font-size: 16px; }
.data-panel p { min-height: 42px; color: #7892a5; font-size: 13px; }
.data-panel button, .file-button { display: inline-block; padding: 11px 17px; font-size: 13px; cursor: pointer; }
.file-button input { display: none; }
.data-panel section > small { display: block; margin-top: 9px; color: #526f83; text-align: center; }

.cyber-rightbar { display: flex; min-width: 0; grid-column: 3; flex-direction: column; gap: 14px; }
.cyber-rightbar article { position: relative; z-index: 1; }
.event-card { position: relative; z-index: 2; display: grid; grid-template-columns: 50px 1fr auto; margin: 8px 10px; min-height: 62px; padding: 8px 12px; color: var(--cyan); border: 1px solid #155474; border-radius: 6px; align-items: center; }
.event-card > span { font: 43px/1 "Share Tech Mono", monospace; transform: rotate(45deg); text-shadow: 0 0 10px currentColor; }
.event-card div { display: flex; flex-direction: column; }
.event-card b { font-size: 14px; }
.event-card small { color: #b3c6d3; font: 13px "Share Tech Mono", monospace; }
.event-card time { color: #a1acb4; font: 12px "Share Tech Mono", monospace; }
.event-card.sign { color: var(--amber); border-color: #60451d; background: rgba(82, 45, 0, .08); }
.day-panel { min-height: 280px; }
.day-row { position: relative; z-index: 2; display: grid; grid-template-columns: 65px 1fr 20px; height: 33px; padding: 0 14px; align-items: center; color: #8299aa; font-size: 13px; }
.day-row b { font-weight: 500; }
.day-row span { font: 13px "Share Tech Mono", monospace; }
.day-row i { color: #637d90; font-style: normal; }
.day-row.passed i { color: var(--green); }
.day-row.active { color: var(--cyan); font-weight: 700; }
.day-row.active i { color: var(--cyan); }
.empty-mini { position: relative; z-index: 2; padding: 30px 14px; color: #557185; text-align: center; }

.legacy-shell { min-height: 100vh; background: #fff; color: #212529; }

@media (max-width: 1250px) {
    .cool-shell { grid-template-columns: 190px minmax(560px, 1fr); }
    .cyber-sidebar { width: 190px; }
    .cyber-rightbar { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; }
    .cyber-sidebar { grid-row: 1 / span 2; }
    .data-panel { min-height: 250px; }
}

@media (max-width: 850px) {
    .cool-shell { display: block; padding: 8px; }
    .cyber-sidebar { position: relative; left: auto; top: 0; width: 100%; height: auto; margin-bottom: 10px; }
    .brand-block { min-height: 100px; }
    .brand-bell { width: 64px; height: 53px; }
    .cyber-nav { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; }
    .cyber-nav button { height: 53px; padding: 4px; border-left: 0; border-bottom: 2px solid transparent; text-align: center; font-size: 10px; }
    .cyber-nav button span { display: block; width: auto; font-size: 18px; }
    .cyber-nav button.active { border-bottom-color: var(--cyan); }
    .system-status, .sidebar-footer { display: none; }
    .hero-panel { min-height: 310px; padding: 24px 15px; }
    .hero-panel > time { font-size: clamp(48px, 12vw, 74px); }
    .hero-panel h1 { font-size: 22px; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 4px; }
    .data-panel { display: block; min-height: auto; }
    .cyber-rightbar { display: grid; grid-template-columns: 1fr; margin-top: 12px; }
}

@media (max-width: 500px) {
    .mode-switcher { right: 10px; bottom: 10px; }
    .mode-switcher button { min-width: 53px; padding: 6px 8px; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .action-card { height: 128px; }
    .action-card .bell-icon, .action-card .alarm-icon { height: 86px; font-size: 55px; }
    .hero-panel { min-height: 285px; }
    .hero-panel h2 { font-size: 17px; }
    .hero-panel h3 { font-size: 13px; }
    .sound-row { grid-template-columns: 1fr; }
    .sound-row .source-control,
    .sound-row .volume-control,
    .sound-row .duration-control,
    .sound-row .sign-offset { min-width: 0; flex-basis: 100%; }
    .lesson-form label { flex: 1 1 100%; }
    .lesson-form button { width: 100%; margin-left: 0; }
    .legacy-shell .btn-lg { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
