/* ================================================================
   АРТРЕСУРС — CSS v2.0
   ================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:          #f5f2ec;
    --bg-2:        #efece4;
    --bg-3:        #e6e2d8;
    --line:        #d9d3c6;
    --grid-fine:   #e6e0d2;
    --grid-bold:   #d8d0be;
    --muted:       #9c958a;
    --text:        #5a544b;
    --dark:        #2b2721;
    --header-h:    80px;
    --container:   1200px;
    --pad:         32px;
}

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* ---------- ФОН: МИЛЛИМЕТРОВКА ---------- */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-bold) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-bold) 1px, transparent 1px),
        linear-gradient(var(--grid-fine) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
}

/* ---------- ФОН: СОЗВЕЗДИЕ ---------- */
.bg-net {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-net .net-dots circle {
    fill: var(--muted);
    opacity: 0.45;
}

.bg-net .net-lines line {
    stroke: var(--muted);
    stroke-width: 1;
    opacity: 0.18;
    vector-effect: non-scaling-stroke;
}

::selection {
    background: var(--dark);
    color: var(--bg);
}

/* ================================================================
   ШАПКА
   ================================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 242, 236, 0.95);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}

/* ---------- ЛОГОТИП ---------- */
.logo {
    display: inline-flex;
    align-items: stretch;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--dark);
    border: 1.5px solid var(--dark);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    text-decoration: none;
}

.logo-art {
    background: var(--dark);
    color: #fff;
    padding: 6px 6px 6px 10px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-resurs {
    color: var(--dark);
    padding: 6px 10px 6px 6px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-footer {
    font-size: 14px;
    border-width: 1px;
}

.logo-footer .logo-art { padding: 4px 4px 4px 7px; }
.logo-footer .logo-resurs { padding: 4px 7px 4px 4px; }

/* ---------- ТЕЛЕФОН ---------- */
.header-phone {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark);
    white-space: nowrap;
    margin-right: auto;
}

.header-phone:hover {
    color: var(--muted);
}

/* ---------- МЕНЮ ---------- */
.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    font-size: 15px;
    color: var(--text);
    padding: 6px 12px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav a:hover {
    background: var(--dark);
    color: #fff;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 24px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.nav-login svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.nav-username {
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-login:hover {
    background: var(--dark);
    color: #fff;
}

.menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--line);
    padding: 8px 16px;
    font: inherit;
    font-size: 14px;
    color: var(--dark);
    cursor: pointer;
    border-radius: 4px;
}

/* ================================================================
   HERO
   ================================================================ */

.hero {
    padding: 140px 0 100px;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero h1,
.hero-title {
    font-size: clamp(48px, 8vw, 104px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 36px;
}

.hero-line {
    display: inline-block;
    white-space: nowrap;
    line-height: 1.1;
}

.hero-line-accent {
    background: var(--dark);
    color: #fff;
    padding: 0.04em 0.28em 0.12em 20px;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
}

.hero-sub-stretch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    font-size: clamp(15px, 1.5vw, 19px);
    color: var(--dark);
    line-height: 1.6;
}

.hero-sub-stretch a {
    padding: 4px 10px;
    border-radius: 2px;
    color: var(--dark);
}

.hero-sub-stretch a:hover {
    background: var(--dark);
    color: #fff;
}

.hero-sub-stretch .sep {
    color: var(--muted);
    user-select: none;
    padding: 0 2px;
}

/* ================================================================
   СЕКЦИИ
   ================================================================ */

section { padding: 100px 0; }

.section-title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #fff;
    background: var(--dark);
    display: inline-block;
    padding: 8px 20px;
    margin-left: -20px;
    margin-bottom: 60px;
    border-radius: 3px;
}

.page-head {
    padding: 100px 0 30px;
}

.page-head h1 {
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #fff;
    background: var(--dark);
    display: inline-block;
    padding: 8px 20px;
    margin-left: -20px;
    margin-bottom: 24px;
    border-radius: 3px;
}

.page-sub {
    font-size: 17px;
    color: var(--text);
    max-width: 640px;
}

/* ================================================================
   УСЛУГИ
   ================================================================ */

.services { padding-top: 40px; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.service {
    background: rgba(255, 255, 255, 0.55);
    padding: 28px 24px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.service:hover {
    background: rgba(255, 255, 255, 0.75);
}

.service-num {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 16px;
}

.service-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--dark);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.service-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

/* ================================================================
   КОНТАКТЫ
   ================================================================ */

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 48px 40px;
}

.contact {
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.contact-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.contact-value {
    font-size: 20px;
    font-weight: 500;
    color: var(--dark);
    word-break: break-word;
}

a.contact-value:hover {
    color: var(--muted);
}

/* ================================================================
   ФУТЕР
   ================================================================ */

.footer {
    padding: 40px 0;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--muted);
}

.footer-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.footer-contacts {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-contacts a {
    color: var(--text);
}

.footer-contacts a:hover {
    color: var(--dark);
}

/* ================================================================
   ФОРМЫ
   ================================================================ */

.auth-section { padding: 40px 0 100px; }

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 36px 32px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
    font: inherit;
    font-size: 16px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    color: var(--dark);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--dark);
}

.btn-submit {
    display: inline-block;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 24px;
    border: none;
    border-radius: 4px;
    background: var(--dark);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-submit:hover { background: #000; }

.btn-logout {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid var(--dark);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    text-align: center;
}

.btn-logout:hover {
    background: var(--dark);
    color: #fff;
}

.auth-error {
    padding: 12px 16px;
    margin-bottom: 24px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #900;
    font-size: 14px;
}

/* ================================================================
   АДМИНКА
   ================================================================ */

.admin-section { padding: 40px 0 100px; }

.admin-h2 {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark);
    margin-bottom: 16px;
    margin-top: 32px;
}

.admin-create {
    padding: 28px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 32px;
}

.admin-create .admin-h2 { margin-top: 0; }

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

.form-field-action .btn-submit { width: 100%; }

.admin-msg {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.admin-msg-ok { background: #efe; border: 1px solid #cfc; color: #060; }
.admin-msg-err { background: #fee; border: 1px solid #fcc; color: #900; }

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.admin-table th {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.4);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.4); }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--bg-3);
    color: var(--text);
}

.badge-admin { background: var(--dark); color: #fff; }
.badge-ok { background: #dfd; color: #060; }
.badge-off { background: #fdd; color: #900; }

.admin-actions { white-space: nowrap; }
.inline-form { display: inline-block; margin-right: 4px; }

.btn-mini {
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.btn-mini:hover { border-color: var(--dark); color: var(--dark); }
.btn-mini-danger:hover { border-color: #900; color: #900; }
.admin-self { color: var(--muted); font-size: 12px; font-style: italic; }

.password-row td {
    background: rgba(255, 255, 255, 0.6) !important;
    padding: 16px !important;
    border-top: 1px dashed var(--line) !important;
}

.password-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.password-form label { font-size: 14px; color: var(--text); }

.password-form input {
    font: inherit;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--bg);
    color: var(--dark);
    min-width: 200px;
}

.password-form input:focus { outline: none; border-color: var(--dark); }

/* ================================================================
   КАЛЕНДАРЬ
   ================================================================ */

.calendar-section { padding: 40px 0 100px; }

.cal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.cal-month {
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark);
    margin: 0;
}

.cal-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--dark);
    border: 1px solid var(--line);
    border-radius: 4px;
    text-decoration: none;
    background: var(--bg);
}

.cal-arrow:hover {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}

.cal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cal-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-filter label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.cal-filter select {
    font: inherit;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    color: var(--dark);
    cursor: pointer;
    min-width: 180px;
}

.cal-bar .btn-submit {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    text-decoration: none;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.cal-dow {
    background: var(--bg-2);
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.cal-cell {
    background: rgba(255, 255, 255, 0.4);
    min-height: 110px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-cell-off { background: rgba(255, 255, 255, 0.15); }
.cal-cell-active { cursor: pointer; }
.cal-cell-active:hover { background: rgba(255, 255, 255, 0.85); }

.cal-cell-today {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 2px var(--dark);
}

.cal-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.cal-num { font-size: 13px; font-weight: 600; color: var(--text); }
.cal-cell-today .cal-num { color: var(--dark); }

.cal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--dark);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

.cal-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.cal-chip {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.85);
    border-left: 3px solid var(--muted);
    border-radius: 2px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-chip b { font-weight: 600; color: var(--dark); margin-right: 4px; }

.cal-more {
    font-size: 10px;
    color: var(--muted);
    font-style: italic;
    padding: 2px 4px;
}

/* ================================================================
   МОДАЛЬНОЕ ОКНО ДНЯ
   ================================================================ */

.day-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.day-modal.open { opacity: 1; }

.day-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(43, 39, 33, 0.5);
}

.day-box {
    position: relative;
    background: var(--bg);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(43, 39, 33, 0.25);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

.day-head h3 {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark);
    margin: 0;
}

.day-x {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.day-x:hover { background: var(--bg-3); color: var(--dark); }

.day-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-ev {
    display: block;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 3px solid var(--muted);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

.modal-ev:hover { background: #fff; }

.modal-ev-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.modal-ev-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 6px;
}

.modal-assignees {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.modal-user {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-3);
    color: var(--text);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* ================================================================
   ФОРМА ДОБАВЛЕНИЯ В МОДАЛКЕ
   ================================================================ */

.day-add-wrap {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.3);
}

.btn-add-toggle {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark);
    cursor: pointer;
    text-align: left;
}

.btn-add-toggle:hover { background: rgba(255, 255, 255, 0.6); }
.btn-add-toggle.active { background: var(--dark); color: #fff; }

.day-add-form {
    padding: 20px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px dashed var(--line);
}

.day-add-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.day-add-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.day-add-field-half { flex: 1; }

.day-add-field label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.day-add-field input[type="text"],
.day-add-field input[type="time"],
.day-add-field textarea {
    font: inherit;
    font-size: 15px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    color: var(--dark);
    width: 100%;
    box-sizing: border-box;
}

.day-add-field input:focus,
.day-add-field textarea:focus {
    outline: none;
    border-color: var(--dark);
}

.day-add-field textarea {
    resize: vertical;
    min-height: 44px;
}

.day-add-users {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    max-height: 140px;
    overflow-y: auto;
}

.day-add-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}

.day-add-user input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--dark);
}

.day-add-error {
    padding: 10px 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #900;
    font-size: 13px;
}

.day-add-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}

.btn-cancel,
.btn-save {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-cancel {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-cancel:hover {
    border-color: var(--dark);
    color: var(--dark);
}

.btn-save {
    background: var(--dark);
    color: #fff;
}

.btn-save:hover { background: #000; }
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

/* ================================================================
   СТАТУСЫ
   ================================================================ */

.cal-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.modal-ev-time .cal-status-dot {
    width: 10px;
    height: 10px;
    margin-right: 6px;
}

.status-dot-lg {
    width: 12px;
    height: 12px;
    margin: 0;
}

.cal-status-clickable {
    cursor: pointer;
}

.cal-status-clickable:hover {
    box-shadow: 0 0 0 3px rgba(43, 39, 33, 0.15);
}

.status-menu {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(43, 39, 33, 0.15);
    padding: 6px;
    min-width: 180px;
}

.status-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
}

.status-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.status-menu-item .cal-status-dot {
    margin: 0;
    flex-shrink: 0;
}

.event-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.status-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
}

.status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.status-option:hover {
    background: rgba(0, 0, 0, 0.03);
}

.status-option input[type="radio"] {
    display: none;
}

.status-option input[type="radio"]:checked + .status-dot {
    box-shadow: 0 0 0 3px rgba(43, 39, 33, 0.15);
}

.status-option input[type="radio"]:checked ~ .status-label {
    font-weight: 600;
    color: var(--dark);
}

.status-option .status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 0;
}

.status-label {
    color: var(--text);
}

/* ================================================================
   COOKIE BANNER
   ================================================================ */

.cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 200;
    max-width: 420px;
    background: var(--dark);
    color: #fff;
    padding: 18px 20px;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(43, 39, 33, 0.18);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner.cookie-visible { opacity: 1; transform: translateY(0); }

.cookie-inner { display: flex; flex-direction: column; gap: 14px; }
.cookie-text { color: rgba(255, 255, 255, 0.85); margin: 0; }

.cookie-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 8px 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.cookie-btn-accept { background: #fff; color: var(--dark); }
.cookie-btn-accept:hover { background: var(--bg-3); }

.cookie-btn-decline {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
}

.cookie-btn-decline:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

/* ================================================================
   СПИСОК УЧАСТНИКОВ В ФОРМЕ
   ================================================================ */

.users-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    max-height: 240px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 0;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--dark);
}

/* ================================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ================================================================ */

@media (max-width: 1024px) {
    .container { padding: 0 24px; }
    .header-inner { gap: 16px; }
    .nav { gap: 16px; }
    .hero h1, .hero-title { font-size: clamp(40px, 6.5vw, 76px); }
    .services-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .cal-cell { min-height: 90px; }
}

@media (max-width: 768px) {

    /* HERO на мобилке — ровно, по центру */
    .hero-title {
        align-items: flex-start !important;
        width: 100%;
    }

    .hero h1,
    .hero-title {
        font-size: clamp(26px, 8.5vw, 40px);
        letter-spacing: -0.02em !important;
        line-height: 1.15;
    }

    .hero-line {
        letter-spacing: -0.02em !important;
        transform: none !important;
    }

    .hero-line-accent {
        width: auto !important;
        letter-spacing: -0.02em !important;
        padding: 4px 14px 6px 14px;
        margin-left: 0;
    }

    :root { --header-h: 64px; }
    .container { padding: 0 20px; }
    section { padding: 64px 0; }

    .section-title {
        font-size: 22px;
        margin-bottom: 32px;
        padding: 6px 14px;
        margin-left: -14px;
    }

    .page-head { padding: 60px 0 20px; }
    .page-head h1 {
        font-size: 28px;
        padding: 6px 14px;
        margin-left: -14px;
    }
    .page-sub { font-size: 15px; }

    .bg-net { display: none; }

    .header-inner { gap: 12px; }
    .logo { font-size: 15px; }
    .logo-art { padding: 4px 4px 4px 7px; }
    .logo-resurs { padding: 4px 7px 4px 4px; }

    .header-phone { display: none; }

    .nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        background: var(--bg);
        border-left: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 80px 24px 24px 24px;
        margin: 0;
        z-index: 200;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s;
        box-shadow: -8px 0 24px rgba(43, 39, 33, 0.08);
    }

    .nav.open { display: flex; transform: translateX(0); }

    .nav a {
        display: block;
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
    }

    .nav a:first-of-type { border-top: 1px solid var(--line); }
    .nav a:hover { background: var(--dark); color: #fff; }

    .nav-login {
        margin: 16px 0 0 0;
        padding: 12px 16px;
        border-radius: 4px;
        justify-content: flex-start;
        width: 100%;
    }

    .nav-username { max-width: none; }

    .menu-btn {
        display: block;
        margin-left: auto;
        position: relative;
        z-index: 201;
        padding: 8px 14px;
        font-size: 14px;
        border-radius: 4px;
        background: var(--bg);
    }

    .hero { padding: 60px 0 40px; min-height: auto; }

    .hero h1,
    .hero-title {
        font-size: clamp(28px, 9vw, 44px);
        letter-spacing: -0.02em;
        margin-bottom: 20px;
    }

    .hero-line-accent {
        display: inline-block;
        width: auto !important;
        padding: 4px 10px 6px 10px;
        letter-spacing: 0 !important;
        font-size: 0.85em;
    }

    .hero-line {
        transform: none !important;
        letter-spacing: 0 !important;
    }

    .hero-sub-stretch {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: 20px;
        font-size: 15px;
        line-height: 1.4;
    }

    .hero-sub-stretch a {
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
        width: 100%;
        display: block;
        border-radius: 0;
    }

    .hero-sub-stretch a:last-of-type { border-bottom: none; }
    .hero-sub-stretch .sep { display: none; }

    .services { padding-top: 24px; }
    .services-grid { grid-template-columns: 1fr; gap: 0; }

    .service {
        padding: 24px 20px;
        margin-bottom: 12px;
        border-radius: 6px;
    }

    .service-title { font-size: 17px; }
    .service-desc { font-size: 14px; }

    .contacts-grid { grid-template-columns: 1fr; gap: 24px; }

    .footer { padding: 32px 0; margin-top: 48px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
    .footer-copy { justify-content: center; }
    .footer-contacts { justify-content: center; gap: 16px; }

    .cal-top { flex-wrap: wrap; gap: 12px; }

    .cal-month {
        font-size: 20px;
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }

    .cal-arrow { flex: 1; padding: 10px 12px; font-size: 13px; }
    .cal-bar { flex-direction: column; align-items: stretch; gap: 12px; }
    .cal-filter { width: 100%; }
    .cal-filter select { flex: 1; min-width: 0; }
    .cal-bar .btn-submit { text-align: center; width: 100%; }

    .cal-dow { padding: 8px 4px; font-size: 10px; }
    .cal-cell { min-height: 74px; padding: 4px; }
    .cal-num { font-size: 11px; }
    .cal-badge { min-width: 16px; height: 16px; font-size: 9px; }
    .cal-chip { font-size: 10px; padding: 2px 4px; }
    .cal-chip b { display: none; }

    .day-box { max-height: 90vh; }
    .day-head { padding: 16px 20px; }
    .day-body { padding: 12px 16px; }

    .day-add-form { padding: 16px 18px 20px 18px; gap: 12px; }
    .btn-add-toggle { padding: 14px 18px; font-size: 13px; }
    .day-add-row { flex-direction: column; gap: 10px; }
    .day-add-field-half { width: 100%; }
    .day-add-actions { flex-direction: column-reverse; }
    .btn-cancel, .btn-save { width: 100%; padding: 12px 16px; }

    .auth-section { padding: 20px 0 60px; }
    .auth-card { padding: 24px 20px; max-width: none; border-radius: 6px; }
    .auth-form { gap: 18px; }
    .form-field input, .form-field select, .form-field textarea,
    .password-form input { font-size: 16px; padding: 12px 14px; }
    .btn-submit { padding: 14px 20px; font-size: 15px; width: 100%; }

    .admin-section { padding: 20px 0 60px; }
    .admin-create { padding: 20px 16px; border-radius: 6px; }
    .admin-h2 { font-size: 15px; }
    .admin-form .form-row { grid-template-columns: 1fr; gap: 14px; }

    .admin-table-wrap {
        margin: 0 -20px;
        padding: 0 20px;
        border: none;
        background: transparent;
    }

    .admin-table {
        min-width: 600px;
        font-size: 13px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 6px;
    }

    .password-form { flex-direction: column; align-items: stretch; gap: 10px; }
    .password-form input { width: 100%; min-width: 0; }

    .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 16px 18px; }
    .cookie-actions { justify-content: stretch; gap: 10px; }
    .cookie-btn { flex: 1; padding: 12px 16px; font-size: 14px; }

    .status-option { font-size: 14px; padding: 10px 8px; }
    .event-status-badge { font-size: 13px; padding: 8px 14px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    section { padding: 48px 0; }
    .section-title { font-size: 20px; }
    .page-head { padding: 48px 0 16px; }
    .page-head h1 { font-size: 24px; }

    .hero { padding: 40px 0 32px; }
    .hero h1, .hero-title { font-size: clamp(26px, 8.5vw, 36px); }
    .hero-sub-stretch { font-size: 14px; }

    .logo { font-size: 14px; }
    .menu-btn { padding: 7px 12px; font-size: 13px; }
    .nav { width: 260px; padding: 70px 20px 20px 20px; }

    .service { padding: 20px 16px; }
    .service-title { font-size: 16px; }

    .cal-cell { min-height: 60px; padding: 3px; }
    .cal-num { font-size: 10px; }
    .cal-chip { font-size: 9px; padding: 2px 3px; }

    .auth-card { padding: 20px 16px; }

    .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; font-size: 13px; }
    .cookie-actions { flex-direction: column-reverse; }
    .cookie-btn { width: 100%; }
}

/* ================================================================
   [hidden] — принудительно скрывать
   ================================================================ */

[hidden] {
    display: none !important;
}

/* ================================================================
   СКРОЛЛБАР — скрыть визуальную полосу
   ================================================================ */

html {
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;               /* Chrome/Safari/Edge */
}

/* ================================================================
   БЛИКИ НА ЗАГОЛОВКАХ HERO
   ================================================================ */

/* МЕТАЛЛООБРАБОТКА — тёмный текст, светлый блик */
.hero-line[data-hero="ref"] {
    background-image: linear-gradient(
        100deg,
        var(--dark) 0%,
        var(--dark) 40%,
        #ffffff 50%,
        var(--dark) 60%,
        var(--dark) 100%
    );
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shine 2.4s ease-in-out 1s 1;
    animation-fill-mode: forwards;
}

/* ПОЛНОГО ЦИКЛА — чёрная плашка, светлый блик по фону */
.hero-line-accent {
    position: relative;
    overflow: hidden;
}

.hero-line-accent::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 300% 100%;
    background-position: 100% 0;
    pointer-events: none;
    /* Задержка 2.6s — перекрывается с первым бликом */
    animation: shine 2.4s ease-in-out 1.8s 1;
    animation-fill-mode: forwards;
}

@keyframes shine {
    0%   { background-position: 100% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-line[data-hero="ref"],
    .hero-line-accent::after {
        animation: none;
        background: none;
        color: inherit;
        -webkit-text-fill-color: inherit;
    }
}
