:root {
    --bg: #f6f7f1;
    --surface: #ffffff;
    --surface-soft: #eef5e8;
    --text: #1f2b24;
    --muted: #66736a;
    --brand: #0d4f2a;
    --brand-dark: #063219;
    --brand-light: #2f8a1f;
    --gold: #d6a400;
    --accent: #d6a400;
    --danger: #b83226;
    --line: #d8e2d0;
    --shadow: 0 16px 42px rgba(20, 48, 32, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

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

.main-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 560px) minmax(320px, 420px);
    gap: clamp(28px, 6vw, 80px);
    justify-content: center;
    align-items: center;
    padding: clamp(24px, 5vw, 64px);
    background:
        radial-gradient(circle at 20% 20%, rgba(214, 164, 0, 0.2), transparent 28rem),
        linear-gradient(135deg, #062a16, #0d4f2a 52%, #f6f7f1 52.2%, #ffffff);
}

.login-brand {
    width: min(100%, 460px);
    aspect-ratio: 970 / 420;
    padding: clamp(18px, 3vw, 30px);
    border-radius: 8px;
    background: #fff url("../../images/vos-logo-light.png") center / calc(100% - 42px) auto no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.28);
}

.login-container {
    width: min(100%, 420px);
    padding: 32px;
    text-align: left;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(216, 226, 208, 0.9);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--brand-dark);
    line-height: 1.2;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--muted);
}

input,
textarea,
select {
    width: 100%;
    padding: 11px 12px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font: inherit;
    color: var(--text);
}

textarea {
    min-height: 180px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(214, 164, 0, 0.18);
}

button,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 15px;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease;
}

button:hover,
.text-btn:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
    background:
        linear-gradient(90deg, rgba(214, 164, 0, 0.16), transparent 34rem),
        var(--brand-dark);
    color: #fff;
    border-bottom: 4px solid var(--gold);
}

.navbar::before {
    content: "";
    flex: 0 0 240px;
    height: 66px;
    border-radius: 6px;
    background: #fff url("../../images/vos-logo-light.png") center / contain no-repeat;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.navbar .left {
    font-size: clamp(1.2rem, 3vw, 1.9rem);
    font-weight: 800;
}

.navbar .right {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    margin-left: auto;
}

.user-info {
    color: #fff;
}

.user-avatar,
.user-avatar-big {
    border-radius: 50%;
    background: var(--gold);
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
}

.user-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.75);
}

.user-avatar-big {
    width: 160px;
    height: 160px;
    font-size: 3.8rem;
}

.logout-btn {
    background: var(--danger);
    color: #fff;
    padding: 9px 13px;
    border-radius: 6px;
    border: 0;
    font-weight: 800;
}

.logout-btn:hover {
    background: #a9362c;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(20, 48, 32, 0.06);
}

.menu button {
    min-height: 38px;
    padding: 8px 12px;
    background: transparent;
    color: var(--brand-dark);
    border: 1px solid var(--line);
}

.menu button:hover {
    color: var(--brand-dark);
    background: rgba(214, 164, 0, 0.18);
    border-color: var(--gold);
}

.content {
    padding: 24px;
}

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

.dashboard-wide {
    grid-column: 1 / -1;
}

.dashboard-card,
.add-user {
    width: auto;
    margin: 0 0 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

fieldset.add-user {
    min-inline-size: 0;
}

legend {
    padding: 0 8px;
}

legend h2,
legend h3 {
    margin: 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.add-user-btn {
    margin: 16px 0 0 24px;
    background: var(--accent);
}

.add-user-btn:hover {
    background: #225e9b;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
}

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

th {
    background: var(--brand-dark);
    color: #fff;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

tr:nth-child(even) {
    background: #f8faf7;
}

.ident-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.ident {
    padding: 12px 14px;
    background: var(--brand-dark);
    color: #fff;
    font-weight: 800;
}

.ident_main {
    padding: 16px;
    background: #fff;
    color: var(--text);
}

.ident_foot {
    padding: 12px 16px;
    background: #f8faf7;
    border-top: 1px solid var(--line);
}

.inline-form {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 8px;
    vertical-align: middle;
}

.inline-form select {
    width: min(360px, 42vw);
    margin: 0;
}

.success-msg,
.delete-msg,
.empty-msg,
.error {
    margin: 16px 24px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 700;
}

.success-msg {
    color: #245b37;
    background: #e5f5e8;
    border: 1px solid #b7dfc0;
}

.delete-msg,
.error {
    color: #8e2f27;
    background: #fff0ec;
    border: 1px solid #efb5a5;
}

.empty-msg {
    margin: 0;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    overflow: auto;
    background: rgba(17, 26, 20, 0.58);
    padding: 24px;
}

.modal-content {
    width: min(100%, 620px);
    margin: 6vh auto;
    padding: 28px;
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.close {
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.close:hover {
    color: var(--text);
}

@media (max-width: 900px) {
    .main-page {
        grid-template-columns: 1fr;
        background:
            linear-gradient(180deg, #063219, #0d4f2a 42%, #f6f7f1 42.2%, #ffffff);
    }

    .login-brand {
        width: min(82vw, 420px);
        justify-self: center;
    }

    .navbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .navbar::before {
        flex-basis: auto;
        width: min(100%, 260px);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 16px;
    }

    .add-user-btn {
        margin-left: 16px;
    }
}

@media (max-width: 620px) {
    .main-page {
        padding: 18px;
    }

    .login-container {
        padding: 24px;
    }

    .navbar .right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 10px;
    }

    .menu button {
        width: 100%;
    }

    table,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    th {
        display: none;
    }

    td {
        border-bottom: 0;
    }

    tr {
        border-bottom: 1px solid var(--line);
    }
}

/* 2026 visual refresh aligned with the public website */
body {
    background:
        linear-gradient(180deg, #ffffff 0, #ffffff 86px, #f7f8f3 86px),
        var(--bg);
}

.main-page {
    background:
        linear-gradient(90deg, rgba(255, 250, 228, 0.96) 0%, rgba(255, 250, 228, 0.78) 42%, rgba(255, 250, 228, 0.18) 68%),
        url("../../pictures/rost_vyr1.jpg") center / cover no-repeat;
}

.login-brand {
    background-color: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.86);
}

.login-container {
    border-top: 5px solid var(--gold);
}

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 0.84rem;
    font-weight: 900;
    text-transform: uppercase;
}

.navbar {
    min-height: 92px;
    padding: 12px clamp(18px, 4vw, 54px);
    background: rgba(255, 255, 255, 0.97);
    color: var(--text);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(20, 48, 32, 0.08);
}

.navbar::before {
    flex: 0 0 220px;
    height: 66px;
    background: url("../../images/vos-logo-dark.png") center / contain no-repeat;
    box-shadow: none;
}

.navbar .left {
    color: var(--brand-dark);
    text-transform: uppercase;
    letter-spacing: 0;
}

.navbar .right,
.user-info {
    color: var(--text);
}

.menu {
    position: sticky;
    top: 0;
    z-index: 10;
    justify-content: center;
    padding: 12px clamp(12px, 3vw, 28px);
}

.menu button {
    border-radius: 6px;
    font-weight: 900;
    text-transform: uppercase;
}

.content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.dashboard-card,
.add-user,
.modal-content,
.login-container {
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(21, 45, 30, 0.12);
}

.dashboard-card {
    border-top: 4px solid var(--gold);
}

.section-head {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    color: var(--brand-dark);
    text-transform: uppercase;
}

table {
    background: #fff;
    box-shadow: 0 10px 26px rgba(21, 45, 30, 0.06);
}

th {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.ident {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.logout-btn {
    background: #8f2f25;
}

.logout-btn:hover {
    background: #73251e;
}

.settings-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

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

.admin-contact-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf7;
}

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

@media (max-width: 900px) {
    .main-page {
        background:
            linear-gradient(180deg, rgba(255, 250, 228, 0.96), rgba(255, 250, 228, 0.5)),
            url("../../pictures/rost_vyr1.jpg") center / cover no-repeat;
    }

    .navbar::before {
        width: min(100%, 260px);
    }

    .admin-contact-grid {
        grid-template-columns: 1fr;
    }
}
