:root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --surface: #1f2630;
    --surface-2: #151b24;
    --text: #e6edf3;
    --muted: #9aa4b2;
    --accent: #3fb950;
    --accent-hover: #34a347;
    --danger: #e5536b;
    --danger-bg: #3a1f24;
    --danger-text: #ffb3bd;
    --success-bg: #183124;
    --success-text: #9fe8bf;
    --border: #2d3642;
    --shadow: rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, #1a2433 0%, transparent 45%),
        radial-gradient(circle at bottom right, #1f2a1f 0%, transparent 40%),
        var(--bg);
}

.layout-center {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

body.login-page {
    background:
    radial-gradient(circle at 18% 18%, rgba(57, 122, 215, 0.28), transparent 36%),
    radial-gradient(circle at 84% 76%, rgba(63, 185, 80, 0.2), transparent 38%),
        linear-gradient(145deg, #0b1018, #121a24 48%, #0d131c);
}

body.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(150, 176, 210, 0.2) 0,
            rgba(150, 176, 210, 0.2) 1px,
            transparent 1px,
            transparent 52px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(150, 176, 210, 0.14) 0,
            rgba(150, 176, 210, 0.14) 1px,
            transparent 1px,
            transparent 52px
        ),
        repeating-linear-gradient(
            135deg,
            rgba(114, 149, 192, 0.08) 0,
            rgba(114, 149, 192, 0.08) 1px,
            transparent 1px,
            transparent 104px
        );
    mask-image: radial-gradient(circle at center, black 62%, transparent 100%);
    opacity: 0.36;
}

body.login-page .layout-center {
    position: relative;
    overflow: hidden;
}

.login-card {
    position: relative;
    z-index: 2;
}

.card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(160deg, var(--bg-soft), var(--surface));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 16px 32px var(--shadow);
}

.login-logo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 0.9rem;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(154, 172, 192, 0.45);
    background: linear-gradient(180deg, rgba(240, 247, 255, 0.92), rgba(226, 236, 248, 0.88));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    filter: brightness(1.08) contrast(1.08);
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 1.45rem;
}

.subtext {
    margin: 0 0 1.25rem;
    color: var(--muted);
}

.form-grid {
    display: grid;
    gap: 0.65rem;
}

label {
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid var(--border);
    background: #0f141b;
    color: var(--text);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    outline: none;
}

select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #0f141b;
    color: var(--text);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    outline: none;
    font-family: inherit;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.2);
}

select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.2);
}

button,
.btn-link {
    display: inline-block;
    margin-top: 0.9rem;
    border: 0;
    border-radius: 10px;
    padding: 0.72rem 1rem;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0.72rem 1rem;
    border-radius: 10px;
    background: #273142;
    color: var(--text);
    border: 1px solid #344257;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-icon-only {
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    justify-content: center;
}

.btn-icon-only .icon {
    font-size: 0.95rem;
    width: auto;
}

.icon {
    font-size: 0.95rem;
    width: 1rem;
    text-align: center;
    flex: 0 0 auto;
}

.btn-secondary:hover {
    background: #303d52;
}

button:hover,
.btn-link:hover {
    background: var(--accent-hover);
}

.alert {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #6a2f3a;
    border-radius: 10px;
    background: var(--danger-bg);
    color: var(--danger-text);
}

.success {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #2a6a44;
    border-radius: 10px;
    background: var(--success-bg);
    color: var(--success-text);
}

.layout-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    transition: grid-template-columns 0.2s ease;
}

.sidebar {
    background: linear-gradient(180deg, #10161f, #0c1118);
    border-right: 1px solid var(--border);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-head {
    display: block;
    margin-bottom: 0.8rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(150, 169, 190, 0.34);
    background: linear-gradient(180deg, rgba(238, 246, 255, 0.9), rgba(224, 235, 248, 0.84));
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    filter: brightness(1.08) contrast(1.08);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.75rem;
}

.sidebar-user-link {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid #2f3a49;
    border-radius: 11px;
    padding: 0.5rem 0.6rem;
    background: #121925;
}

.sidebar-user-link:hover {
    background: #192334;
    border-color: #3f556f;
}

.sidebar-user-link.active {
    border-color: #2f6e3a;
    background: #1a2a1d;
}

.sidebar-user-avatar {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: #2d4158;
    color: #d7e6f7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 0 0 auto;
}

.sidebar-user-meta {
    display: grid;
    min-width: 0;
}

.sidebar-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.sidebar-user-subtext {
    color: var(--muted);
    font-size: 0.78rem;
}

.sidebar-toggle {
    position: fixed;
    left: 0.9rem;
    bottom: 0.9rem;
    margin-top: 0;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #3a4a5f;
    background: rgba(17, 24, 34, 0.88);
    color: #c7d5e8;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 1100;
}

.sidebar-toggle:hover {
    background: rgba(29, 39, 53, 0.96);
    border-color: #4c5f77;
}

.sidebar-scroll {
    margin-top: 0.9rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.2rem;
    min-width: 0;
}

.sidebar-nav {
    display: grid;
    gap: 0.6rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.nav-label,
.group-label,
.submenu-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sidebar-link:hover {
    background: #1a212d;
    border-color: #2c3645;
}

.sidebar-link.active {
    background: #1a2a1d;
    border-color: #2f6e3a;
    color: #c9f6d3;
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 0.8rem;
}

.btn-logout {
    width: 100%;
    margin-top: 0;
    background: #1b2431;
    border: 1px solid #334357;
    color: #d5deea;
}

.btn-logout:hover {
    background: #243143;
}

.sidebar-group {
    display: grid;
    gap: 0.35rem;
}

.sidebar-group-toggle {
    margin-top: 0;
    width: auto;
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    background: #151d27;
    color: #c7d5e8;
    border: 1px solid #2d3a4a;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
}

.sidebar-group-toggle:hover {
    background: #1d2735;
}

.sidebar-group-caret {
    margin-left: auto;
    font-size: 0.82rem;
    opacity: 0.85;
    transition: transform 0.15s ease;
}

.sidebar-group-toggle[aria-expanded="false"] .sidebar-group-caret {
    transform: rotate(-90deg);
}

.group-icon {
    color: #9fb7d6;
}

.sidebar-subnav {
    display: grid;
    gap: 0.35rem;
}

.sidebar-group > .sidebar-subnav {
    padding-left: 0.55rem;
}

.sidebar-subnav-nested {
    margin-left: 0;
    padding-left: 0.55rem;
}

.sidebar-subnav.is-hidden {
    display: none;
}

.sidebar-subgroup {
    margin-left: 0;
}

.sidebar-subgroup-toggle {
    background: #121925;
    border-color: #263446;
    padding: 0.5rem 0.6rem;
}

.sidebar-subgroup-toggle:hover {
    background: #182131;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
    min-width: 0;
    text-decoration: none;
    color: #d5dfea;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    margin-left: 0;
}

.sidebar-sublink:hover {
    background: #1a212d;
    border-color: #2c3645;
}

.sidebar-sublink.active {
    background: #1a2a1d;
    border-color: #2f6e3a;
    color: #c9f6d3;
}

.sidebar-sublink-l3 {
    margin-left: 0;
    padding-left: 1.15rem;
    font-size: 0.92rem;
}

.layout-app.layout-app-collapsed {
    grid-template-columns: 0 1fr;
}

.layout-app.layout-app-collapsed .sidebar {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

.layout-app.layout-app-collapsed .sidebar-brand,
.layout-app.layout-app-collapsed .nav-label,
.layout-app.layout-app-collapsed .group-label,
.layout-app.layout-app-collapsed .submenu-label,
.layout-app.layout-app-collapsed .sidebar-group-caret,
 .layout-app.layout-app-collapsed .logout-label,
 .layout-app.layout-app-collapsed .sidebar-user-meta {
    display: none;
}

.layout-app.layout-app-collapsed .sidebar-head {
    margin-bottom: 0;
}

.layout-app.layout-app-collapsed .sidebar-link,
.layout-app.layout-app-collapsed .sidebar-sublink,
.layout-app.layout-app-collapsed .sidebar-group-toggle,
.layout-app.layout-app-collapsed .sidebar-toggle {
    justify-content: center;
}

.layout-app.layout-app-collapsed .sidebar-user-link {
    justify-content: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.layout-app.layout-app-collapsed .sidebar-sublink {
    margin-left: 0;
}

.layout-app.layout-app-collapsed .sidebar-subgroup,
.layout-app.layout-app-collapsed .sidebar-group > .sidebar-subnav,
.layout-app.layout-app-collapsed .sidebar-subnav-nested,
.layout-app.layout-app-collapsed .sidebar-sublink-l3 {
    margin-left: 0;
    padding-left: 0;
}

.layout-content {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    align-content: start;
    position: relative;
    overflow: hidden;
}

.layout-content::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(150, 176, 210, 0.24) 0,
            rgba(150, 176, 210, 0.24) 1px,
            transparent 1px,
            transparent 48px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(150, 176, 210, 0.18) 0,
            rgba(150, 176, 210, 0.18) 1px,
            transparent 1px,
            transparent 48px
        );
    opacity: 0.46;
    z-index: 0;
}

.layout-content > * {
    position: relative;
    z-index: 1;
}

.layout-title {
    margin: 0;
}

.content-card {
    max-width: 1000px;
}

.panel-card {
    max-width: 100%;
    padding: 1.15rem;
}

.panel-title {
    margin: 0;
    font-size: 1.2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.modal-meta-inline {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
}

.modal-meta-icon {
    font-size: 0.92rem;
    color: #8ea0b6;
    opacity: 0.85;
    cursor: help;
}

.modal-meta-icon:hover {
    color: #b8c7d8;
}

.modal-actions button,
.modal-actions a {
    margin-top: 0;
}

.modal-actions [data-modal-close] {
    margin-left: auto;
}

.toolbar-actions button,
.toolbar-actions a {
    margin-top: 0;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto auto;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-toolbar .btn-secondary {
    margin-top: 0;
}

.table-container {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        left: 0.65rem;
        bottom: 0.65rem;
        width: 2.4rem;
        height: 2.4rem;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    text-align: left;
    padding: 0.65rem;
    border-bottom: 1px solid var(--border);
}

th {
    color: #d3dce6;
    font-weight: 700;
    background: var(--surface-2);
}

th.table-sortable-col {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.35rem;
}

th.table-sortable-col::after {
    content: "\f0dc";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    color: #8ea0b6;
}

th.table-sortable-col[data-sort-state='asc']::after {
    content: "\f0de";
    color: #d8e5f3;
}

th.table-sortable-col[data-sort-state='desc']::after {
    content: "\f0dd";
    color: #d8e5f3;
}

.form-inline {
    display: inline;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.checkbox-inline input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 2.8rem;
    height: 1.55rem;
    margin: 0;
    border: 1px solid #3a4658;
    border-radius: 999px;
    background: #18212e;
    position: relative;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.checkbox-inline input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 0.14rem;
    left: 0.14rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #d7e1ee;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, background 0.18s ease;
}

.checkbox-inline input[type="checkbox"]:checked {
    background: linear-gradient(180deg, #3fb950, #2f9a41);
    border-color: #2f9a41;
}

.checkbox-inline input[type="checkbox"]:checked::before {
    transform: translateX(1.22rem);
    background: #ffffff;
}

.checkbox-inline input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.28);
}

.table-action-btn {
    margin-right: 0.35rem;
}

.btn-danger {
    margin-top: 0;
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c94158;
}

.tag {
    display: inline-block;
    background: #1f2f3f;
    color: #bcd6f3;
    border: 1px solid #31475d;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.82rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 7, 12, 0.72);
    z-index: 1200;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(160deg, #141b25, #1a2432);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1rem 1.2rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.modal-close {
    margin-top: 0;
    background: transparent;
    color: #c7d5e8;
    border: 1px solid #314257;
    padding: 0.3rem 0.55rem;
    line-height: 1;
}

.modal-close:hover {
    background: #1f2937;
}

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1600;
    transition: opacity 0.25s ease;
}

.toast-stack.hide {
    opacity: 0;
}

.toast {
    min-width: 280px;
    max-width: 420px;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0.75rem 2.2rem 0.75rem 0.85rem;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    position: relative;
}

.toast-success {
    background: #1b3428;
    border-color: #2f6a4c;
    color: #bdf2d2;
}

.toast-error {
    background: #3a1f24;
    border-color: #6a2f3a;
    color: #ffb3bd;
}

.toast-close {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: inherit;
    padding: 0.2rem 0.45rem;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.assignment-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.assignment-column {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #141b25;
    min-height: 280px;
    display: grid;
    grid-template-rows: auto 1fr;
}

.assignment-column-head {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

.assignment-column-head h3 {
    margin: 0;
    font-size: 0.96rem;
}

.assignment-dropzone {
    padding: 0.6rem;
    display: grid;
    gap: 0.5rem;
    align-content: start;
    min-height: 220px;
    border-radius: 0 0 12px 12px;
    transition: background 0.15s ease;
}

.assignment-dropzone.is-over {
    background: rgba(63, 185, 80, 0.14);
}

.user-card {
    border: 1px solid #314257;
    background: #1a2432;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    cursor: grab;
    user-select: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.user-card.is-dragging {
    opacity: 0.55;
}

.user-card-name {
    font-weight: 700;
    margin-bottom: 0.12rem;
}

.user-card-user {
    color: var(--muted);
    font-size: 0.84rem;
}

.assignment-board[data-can-write="0"] .user-card {
    cursor: default;
}

.sample-form {
    max-width: 980px;
}

.sample-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.sample-fieldset {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
}

.sample-fieldset legend {
    color: #cbd7e4;
    padding: 0 0.35rem;
}

.sample-inline-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.75rem;
}

.sample-inline-choice input[type="checkbox"],
.sample-inline-choice input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.08rem;
    height: 1.08rem;
    margin: 0;
    border: 1px solid #4c6078;
    background: #182131;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
}

.sample-inline-choice input[type="checkbox"] {
    border-radius: 0.3rem;
}

.sample-inline-choice input[type="radio"] {
    border-radius: 50%;
}

.sample-inline-choice input[type="checkbox"]:checked {
    background: linear-gradient(180deg, #3fb950, #2f9a41);
    border-color: #2f9a41;
}

.sample-inline-choice input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.25rem;
    height: 0.52rem;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -58%) rotate(45deg);
}

.sample-inline-choice input[type="radio"]:checked {
    border-color: #3fb950;
}

.sample-inline-choice input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    background: #3fb950;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.sample-inline-choice input[type="checkbox"]:focus-visible,
.sample-inline-choice input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.24);
}

.sample-slider-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: center;
}

.sample-slider-value {
    min-width: 2.7rem;
    text-align: center;
    font-weight: 700;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    border: 1px solid #3a4a5f;
    background: #1a2432;
    color: #dce9f7;
}

.sample-picker {
    color-scheme: dark;
    background: #0f141b;
    color: var(--text);
    border-color: #3a4a5f;
}

.sample-date-picker::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1);
    opacity: 1;
    cursor: pointer;
    border-radius: 6px;
}

.sample-date-picker::-webkit-calendar-picker-indicator:hover {
    filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.35));
}

.sample-date-picker::-webkit-calendar-picker-indicator:active {
    filter: brightness(0) invert(1) drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

.sample-color-picker {
    height: 2.45rem;
    padding: 0.18rem;
    border-radius: 10px;
    border: 1px solid #3a4a5f;
    background: #0f141b;
    cursor: pointer;
}

.sample-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.sample-color-picker::-webkit-color-swatch {
    border: 0;
    border-radius: 8px;
}

.sample-color-picker::-moz-color-swatch {
    border: 0;
    border-radius: 8px;
}

.sample-picker:focus {
    border-color: #2f6e3a;
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.2);
}

.sample-signature-wrap {
    display: grid;
    gap: 0.55rem;
}

.sample-signature-pad {
    width: 100%;
    min-height: 11.2rem;
    border-radius: 10px;
    border: 1px solid #3a4a5f;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        #0f141b;
    touch-action: none;
    cursor: crosshair;
}

.sample-signature-pad.has-signature {
    border-color: #4b6a87;
}

.sample-signature-actions {
    display: flex;
    justify-content: flex-end;
}

.sample-signature-actions .btn-secondary {
    margin-top: 0;
}

.sample-output {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #121925;
    padding: 0.8rem;
}

.sample-output h3 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
}

.sample-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #cde3ff;
}

@media (max-width: 900px) {
    .sample-grid-two {
        grid-template-columns: 1fr;
    }
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background:
        radial-gradient(circle at 92% 8%, rgba(63, 185, 80, 0.18), transparent 38%),
        linear-gradient(160deg, var(--bg-soft), var(--surface));
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #365145;
    border-radius: 999px;
    color: #b8f0c5;
    background: rgba(20, 54, 35, 0.45);
    font-size: 0.9rem;
    white-space: nowrap;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(160deg, #16212d, #1b2936);
}

.stat-label {
    margin: 0;
    color: #9fb1c5;
    font-size: 0.88rem;
}

.stat-value {
    margin: 0.45rem 0 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.stat-delta {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.stat-delta.positive {
    color: #7fe0a0;
}

.stat-delta.warning {
    color: #ffce7a;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-panel {
    background: linear-gradient(160deg, #151e28, #1b2633);
}

.dashboard-panel h2 {
    margin: 0 0 0.9rem;
    font-size: 1.05rem;
}

.dashboard-chart-panel {
    min-height: 340px;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 270px;
}

.timeline-list,
.news-list,
.bar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline-list {
    display: grid;
    gap: 0.75rem;
}

.timeline-list li {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #2a3442;
}

.timeline-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline-date {
    display: inline-flex;
    justify-content: center;
    padding: 0.25rem 0.4rem;
    border-radius: 8px;
    background: #1b2634;
    border: 1px solid #324357;
    color: #cde0f3;
    font-weight: 700;
    font-size: 0.8rem;
}

.timeline-list p,
.news-list p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.news-list {
    display: grid;
    gap: 0.85rem;
}

.news-list li {
    padding: 0.7rem;
    border: 1px solid #2e3948;
    border-radius: 10px;
    background: #131a24;
}

.progress-block {
    margin-bottom: 0.75rem;
}

.progress-block:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.progress-track,
.bar-track {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: #0f141c;
    border: 1px solid #2b3541;
    overflow: hidden;
}

.progress-track span,
.bar-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2f8f45, #44c267);
}

.bar-list {
    display: grid;
    gap: 0.7rem;
}

.bar-list li {
    display: grid;
    grid-template-columns: 100px 1fr 46px;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.88rem;
}

@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .bar-list li {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}
