﻿:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --line: #d8e2f0;
    --text: #1d2b42;
    --muted: #61718a;
    --primary: #1f5aa6;
    --primary-dark: #15427d;
    --secondary: #eef4fb;
    --danger: #d14545;
    --success: #198754;
    --warning: #f59f00;
    --shadow: 0 18px 45px rgba(20, 42, 74, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #eef4fb 0%, #f7f9fc 100%);
    color: var(--text);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-shell,
.app-shell {
    width: min(1180px, 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 24px;
}

.card {
    background: var(--card);
    border: 1px solid rgba(216, 226, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    padding: 36px;
    align-items: center;
}

.login-card {
    padding: 32px;
}

.hero-copy h1,
.app-header h1,
.form-card h2 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 2.5vw, 2.7rem);
}

.hero-copy p,
.helper-text,
.status-message,
.user-badge,
label span,
.table-wrap,
.menu-chip,
.ghost-link,
.eyebrow {
    font-size: 0.95rem;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 8px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-points {
    margin: 20px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.hero-visual {
    background: radial-gradient(circle at top left, rgba(31, 90, 166, 0.16), transparent 60%), linear-gradient(135deg, #f6fbff 0%, #edf3ff 100%);
    border-radius: 22px;
    padding: 22px;
}

.stack-form {
    display: grid;
    gap: 18px;
}

label,
fieldset {
    display: grid;
    gap: 8px;
    border: 0;
    padding: 0;
    margin: 0;
}

label span,
legend {
    font-weight: 700;
}

input,
textarea,
select,
.rich-editor {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
}

.editor-shell {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: #f7faff;
}

.editor-button {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
}

.editor-button:hover {
    background: #edf4ff;
}

.rich-editor {
    min-height: 220px;
    overflow: auto;
    line-height: 1.6;
    border: 0;
    border-radius: 0;
}

input:focus,
textarea:focus,
select:focus,
.rich-editor:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(31, 90, 166, 0.12);
}

.editor-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(31, 90, 166, 0.12);
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    align-items: end;
}

.captcha-box {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    text-align: center;
    background: var(--secondary);
}

#captchaText {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.25em;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.ghost-link,
.action-button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.primary-button {
    background: var(--primary);
    color: #fff;
}

.secondary-button {
    background: var(--secondary);
    color: var(--primary);
}

.danger-button {
    background: var(--danger);
    color: #fff;
}

.ghost-button,
.ghost-link,
.action-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover,
.ghost-link:hover,
.action-button:hover {
    transform: translateY(-1px);
}

.full-width {
    width: 100%;
}

.helper-text {
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.status-message {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f7fafc;
}

.status-message.success {
    border-color: rgba(25, 135, 84, 0.25);
    background: rgba(25, 135, 84, 0.09);
    color: #146c43;
}

.status-message.error {
    border-color: rgba(209, 69, 69, 0.25);
    background: rgba(209, 69, 69, 0.09);
    color: #a32828;
}

.status-message.info {
    border-color: rgba(31, 90, 166, 0.22);
    background: rgba(31, 90, 166, 0.08);
    color: var(--primary-dark);
}

.app-shell {
    padding: 24px 16px 36px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.app-header.compact h1 {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
}

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

.user-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--primary-dark);
    font-weight: 700;
}

.menu-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.menu-bar a {
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
}

.menu-bar a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-grid {
    display: grid;
    gap: 24px;
}

.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: stretch;
}

.dashboard-card {
    position: relative;
    min-height: 220px;
    padding: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(145deg, #ffffff 0%, #f4f8ff 100%);
}

.dashboard-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(31, 90, 166, 0.07);
}

.dashboard-card .icon-wrap {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(31, 90, 166, 0.09);
    color: var(--primary);
}

.dashboard-card h3 {
    margin: 16px 0 8px;
    font-size: 1.2rem;
}

.dashboard-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.filter-card,
.form-card,
.table-card {
    padding: 24px;
}

.filter-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stretch-row {
    align-self: stretch;
    align-items: end;
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

th {
    background: #f3f7fd;
    color: var(--primary-dark);
    font-size: 0.92rem;
}

tbody tr:hover {
    background: rgba(31, 90, 166, 0.03);
}

.inline-field {
    align-content: end;
}

.schedule-panel {
    display: grid;
    grid-template-columns: minmax(260px, 360px);
}

.select-all,
.radio-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
}

.checkbox-option input {
    width: auto;
    margin: 0;
}

.checkbox-option span {
    font-weight: 700;
}

.radio-row {
    flex-wrap: wrap;
}

.menu-fieldset {
    display: grid;
    gap: 12px;
}

.checkbox-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.users-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: start;
}

.empty-row {
    text-align: center;
    color: var(--muted);
}

.truncate {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 980px) {
    .login-shell,
    .users-layout,
    .login-hero {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }
}

@media (max-width: 720px) {
    .app-header,
    .captcha-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .header-actions,
    .button-row,
    .menu-bar {
        width: 100%;
    }

    .button-row > * {
        flex: 1 1 100%;
    }

    .filter-card,
    .form-card,
    .table-card,
    .login-card,
    .login-hero {
        padding: 18px;
    }

    th,
    td {
        padding: 10px 12px;
    }
}



