:root {
    --bg: #edf4ff;
    --bg-deep: #dbe9ff;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-alt: #f4f8ff;
    --text: #11213f;
    --muted: #62779f;
    --line: rgba(100, 134, 201, 0.18);
    --primary: #1f6fff;
    --primary-dark: #1552c7;
    --accent: #2fd1ff;
    --success: #25b58a;
    --success-soft: rgba(37, 181, 138, 0.14);
    --danger: #d33d5c;
    --sidebar-top: #0d43c8;
    --sidebar-bottom: #081f65;
    --shadow: 0 16px 42px rgba(26, 74, 163, 0.12);
    --shadow-soft: 0 10px 24px rgba(26, 74, 163, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(47, 209, 255, 0.26), transparent 26%),
        radial-gradient(circle at top right, rgba(31, 111, 255, 0.12), transparent 20%),
        linear-gradient(135deg, #eff5ff 0%, #edf4ff 46%, #f8fbff 100%);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 18px;
    padding: 18px;
}

.sidebar {
    padding: 22px 18px;
    background:
        radial-gradient(circle at top right, rgba(47, 209, 255, 0.3), transparent 22%),
        linear-gradient(180deg, var(--sidebar-top), var(--sidebar-bottom));
    color: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-self: start;
    position: sticky;
    top: 18px;
    min-height: calc(100vh - 36px);
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(8, 31, 101, 0.26);
    overflow: hidden;
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(47, 209, 255, 0.14);
    filter: blur(10px);
    pointer-events: none;
}

.sidebar-main,
.sidebar-footer {
    position: relative;
    z-index: 1;
}

.sidebar-main {
    display: grid;
    gap: 20px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, #4ccfff, #1f6fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sidebar h1,
.hero h2,
.panel h2,
.panel h3,
.record-card h4,
.stat-card strong {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}

.sidebar h1 {
    font-size: 1.02rem;
    line-height: 1.15;
}

.brand-subtitle {
    margin: 2px 0 0;
    color: rgba(232, 241, 255, 0.72);
    font-size: 0.78rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.64rem;
    font-weight: 700;
    color: #7a92bd;
    margin: 0 0 6px;
}

.sidebar .eyebrow {
    color: rgba(207, 228, 255, 0.72);
}

.nav {
    display: grid;
    gap: 7px;
}

.nav a,
.button {
    border-radius: 12px;
    padding: 10px 12px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.nav a {
    color: rgba(242, 247, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    font-size: 0.92rem;
}

.nav a:hover,
.nav a.active,
.button:hover {
    transform: translateY(-1px);
}

.nav a.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(47, 209, 255, 0.22));
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.sidebar-footer {
    display: grid;
    gap: 6px;
    font-size: 0.86rem;
    color: #d9e7ff;
    padding-top: 16px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-aircraft-selector {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-aircraft-selector label {
    display: grid;
    gap: 8px;
}

.sidebar-aircraft-selector span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(207, 228, 255, 0.72);
}

.sidebar-aircraft-selector select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fbff;
    font: inherit;
}

.sidebar-aircraft-selector option {
    color: var(--text);
}

.content {
    padding: 2px 0;
    display: grid;
    gap: 14px;
    align-content: start;
    align-items: start;
}

.content-owner {
    gap: 8px;
    align-content: start;
}

.content-owner > section:first-of-type.panel {
    padding-top: 14px;
}

.content-owner > section:first-of-type.collapsible-panel summary {
    padding-top: 14px;
    padding-bottom: 14px;
}

.content-owner > section:first-of-type.stats,
.content-owner > section:first-of-type.dashboard-grid {
    margin-top: -2px;
}

.content-owner > section:first-of-type .panel-heading {
    margin-bottom: 10px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    height: 62px;
    padding: 8px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.topbar > div:first-child {
    display: grid;
    align-content: center;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

.topbar strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.1;
    white-space: nowrap;
}

.topbar-meta {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.hero,
.panel,
.stat-card,
.record-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero {
    position: relative;
    padding: 24px 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at right center, rgba(47, 209, 255, 0.16), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(230, 240, 255, 0.88));
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 130px;
    height: 130px;
    top: -54px;
    right: -16px;
    background: rgba(31, 111, 255, 0.08);
}

.hero::after {
    width: 88px;
    height: 88px;
    right: 88px;
    bottom: -28px;
    background: rgba(47, 209, 255, 0.12);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.03em;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr);
    gap: 18px;
    align-items: stretch;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.hero-summary-card {
    align-self: stretch;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(226, 239, 255, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.hero-notice-board {
    align-self: stretch;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(17, 85, 199, 0.96), rgba(31, 111, 255, 0.92) 55%, rgba(47, 209, 255, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(21, 82, 199, 0.22);
    display: grid;
    gap: 14px;
}

.hero-notice-board .eyebrow,
.hero-notice-board .muted,
.hero-notice-board h2,
.hero-notice-board h4,
.hero-notice-board strong,
.hero-notice-board a {
    color: #ffffff;
}

.hero-notice-board .eyebrow {
    color: rgba(226, 239, 255, 0.84);
}

.hero-notice-board .muted {
    color: rgba(240, 247, 255, 0.86);
}

.hero-notice-board .panel-heading {
    margin-bottom: 0;
}

.hero-notice-board .button {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: none;
}

.hero-summary-card h3 {
    margin: 0 0 4px;
    font-size: 1.35rem;
}

.mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.mini-stat-grid div {
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(31, 111, 255, 0.08);
}

.mini-stat-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mini-stat-grid strong {
    font-size: 1.15rem;
    color: var(--primary-dark);
}

.panel {
    padding: 20px;
}

.panel.narrow {
    max-width: 620px;
}

.collapsible-panel {
    padding: 0;
    overflow: hidden;
}

.collapsible-panel summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
}

.collapsible-panel summary::-webkit-details-marker {
    display: none;
}

.collapsible-panel summary::after {
    content: "Show";
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: rgba(31, 111, 255, 0.1);
    border: 1px solid rgba(31, 111, 255, 0.12);
    border-radius: 999px;
    padding: 6px 10px;
}

.collapsible-panel details[open] summary::after {
    content: "Hide";
}

.collapsible-panel-body {
    padding: 0 20px 20px;
    display: grid;
    gap: 14px;
}

.panel-heading,
.record-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.notice-board-panel {
    background:
        radial-gradient(circle at top right, rgba(47, 209, 255, 0.18), transparent 24%),
        linear-gradient(135deg, rgba(229, 241, 255, 0.94), rgba(255, 255, 255, 0.96));
    border-color: rgba(31, 111, 255, 0.14);
}

.muted {
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.92rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stats.single {
    grid-template-columns: minmax(0, 240px);
}

.stat-card {
    position: relative;
    padding: 16px 18px;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -22px -28px auto;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(31, 111, 255, 0.08);
}

.stat-card span,
.stat-card strong {
    position: relative;
    z-index: 1;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.84rem;
}

.stat-card strong {
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
}

.span-2 {
    grid-column: span 2;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.notice-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.notice-board-grid.featured {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.notice-board-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(235, 244, 255, 0.95), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(31, 111, 255, 0.12);
    box-shadow: var(--shadow-soft);
}

.notice-board-card.highlight {
    background: linear-gradient(145deg, rgba(31, 111, 255, 0.16), rgba(47, 209, 255, 0.12) 60%, rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(31, 111, 255, 0.16);
    box-shadow: 0 12px 24px rgba(26, 74, 163, 0.08);
}

.notice-board-card.highlight .button {
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary-dark);
}

.notice-board-feature {
    padding: 14px 15px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.12), rgba(47, 209, 255, 0.1));
    border: 1px solid rgba(31, 111, 255, 0.12);
}

.notice-board-feature.empty {
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.08), rgba(47, 209, 255, 0.08));
}

.notice-board-card h4 {
    margin: 0;
    font-size: 1.05rem;
}

.notice-board-card .button {
    justify-self: start;
    margin-top: 4px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.photo-card {
    margin: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 247, 255, 0.96));
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.photo-card img {
    width: 100%;
    height: 148px;
    object-fit: cover;
    display: block;
}

.photo-card figcaption {
    padding: 12px;
    display: grid;
    gap: 6px;
}

.owner-selector {
    grid-template-columns: minmax(0, 320px);
}

.top-gap {
    margin-top: 18px;
}

.motion-editor {
    display: grid;
    gap: 14px;
}

.motion-form-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.motion-form-card .panel-heading {
    margin-bottom: 2px;
}

.motion-form-card textarea {
    min-height: 220px;
    padding-top: 14px;
}

.motion-form-card label {
    gap: 8px;
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.attachment-list a {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid rgba(31, 111, 255, 0.14);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(47, 209, 255, 0.06));
    color: var(--primary-dark);
    width: fit-content;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.vote-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.vote-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-alt);
    font-size: 0.9rem;
}

.vote-option input[type="radio"] {
    width: auto;
}

.record-card {
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.92));
}

.emphasis-panel {
    display: grid;
    gap: 14px;
    background: linear-gradient(180deg, rgba(233, 242, 255, 0.92), rgba(255, 255, 255, 0.92));
}

.compact-metric-list {
    display: grid;
    gap: 10px;
}

.compact-metric-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 111, 255, 0.08);
}

.compact-metric-list span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.compact-metric-list strong {
    font-size: 0.92rem;
}

.info-strip {
    padding: 12px 13px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(47, 209, 255, 0.08));
    border: 1px solid rgba(31, 111, 255, 0.1);
}

.info-strip strong {
    display: block;
    margin: 2px 0 4px;
}

.meta {
    display: grid;
    gap: 8px;
}

.meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 7px;
}

.meta dt {
    color: var(--muted);
    font-weight: 600;
}

.meta dd {
    margin: 0;
    font-weight: 700;
    color: var(--text);
}

.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-width {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: var(--text);
    font-size: 0.92rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(93, 126, 186, 0.18);
    background: rgba(245, 249, 255, 0.95);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    color: inherit;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(31, 111, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 111, 255, 0.12);
}

textarea {
    resize: vertical;
}

.form-actions,
.inline-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-row {
    display: flex;
    align-items: center;
}

.checkbox-row span {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), #458eff);
    color: white;
    font: inherit;
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(31, 111, 255, 0.2);
}

.button.subtle {
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(47, 209, 255, 0.1));
    color: var(--primary-dark);
    box-shadow: none;
}

.logout-button {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    box-shadow: none;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.5);
}

.log-snapshots {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.log-snapshots div {
    display: grid;
    gap: 5px;
}

.log-snapshots span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.log-snapshots code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(240, 246, 255, 0.92);
    border: 1px solid rgba(31, 111, 255, 0.1);
    color: var(--primary-dark);
    font-size: 0.82rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th,
td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
}

tbody tr:hover {
    background: rgba(31, 111, 255, 0.035);
}

th {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.6);
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.alert.success {
    background: rgba(37, 181, 138, 0.12);
    color: #137958;
    border-color: rgba(37, 181, 138, 0.18);
}

.alert.error {
    background: rgba(211, 61, 92, 0.1);
    color: var(--danger);
    border-color: rgba(211, 61, 92, 0.16);
}

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

    .sidebar {
        position: static;
        min-height: auto;
        top: 0;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .dashboard-grid,
    .split,
    .stats,
    .form-grid.two-column {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .shell {
        padding: 16px;
        gap: 16px;
    }

    .content {
        gap: 16px;
    }

    .topbar,
    .panel-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .hero,
    .panel {
        padding: 18px;
    }
}
