:root {
    --primary: #12967e;
    --primary-dark: #08776d;
    --primary-soft: #ddf8ef;
    --sidebar: #0d1f3d;
    --sidebar-2: #07172f;
    --text: #0b1631;
    --text-soft: #52627d;
    --muted: #8a94a6;
    --bg: #f6f8fa;
    --surface: #ffffff;
    --surface-soft: #fbfcfe;
    --border: #e6ecf2;
    --border-strong: #d2d9e3;
    --success: #16a34a;
    --success-soft: #e6f7ed;
    --warning: #f59e0b;
    --warning-soft: #fff4da;
    --danger: #ef4444;
    --danger-soft: #fee9e9;
    --info: #2563eb;
    --info-soft: #eaf2ff;
    --purple: #885cf6;
    --purple-soft: #f0e9ff;
    --shadow-1: 0 6px 20px rgba(7, 23, 47, .08);
    --shadow-2: 0 18px 48px rgba(7, 23, 47, .12);
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --sidebar-width: 320px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: inline-block; vertical-align: middle; }

.sf-icon { flex: 0 0 auto; display: block; }
.sf-body { background: radial-gradient(circle at top right, rgba(207, 221, 238, .35), transparent 34%), var(--bg); }

/* Logo */
.sf-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-weight: 800;
    letter-spacing: -.04em;
    color: #fff;
}
.sf-logo__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, #2ff2c6 5%, #1389f9 55%, #2146df 100%);
    color: #fff;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .32);
    font-style: italic;
}
.sf-logo__text { font-size: 30px; color: #fff; }
.sf-logo--compact .sf-logo__mark { width: 40px; height: 40px; font-size: 26px; }
.sf-logo--dark .sf-logo__text { color: #fff; }
.kit-header .sf-logo__text { color: var(--text); }
.kit-header .sf-logo__mark { width: 34px; height: 34px; border-radius: 10px; font-size: 22px; }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 24px 16px 20px;
    background:
        radial-gradient(circle at 30% 0%, rgba(31, 117, 255, .26), transparent 30%),
        linear-gradient(180deg, var(--sidebar) 0%, #071a35 100%);
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: inset -1px 0 rgba(255, 255, 255, .08);
}
.sidebar::after {
    content: "";
    position: absolute;
    inset: auto -100px -140px 0;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 139, 255, .28), transparent 68%);
    pointer-events: none;
}
.sidebar__top { position: relative; z-index: 1; flex: 0 0 auto; padding: 0 8px 14px; }
.sidebar__top .sf-logo { gap: 10px; }
.sidebar__top .sf-logo__mark { width: 36px; height: 36px; border-radius: 12px; font-size: 22px; box-shadow: 0 8px 18px rgba(37, 99, 235, .28); }
.sidebar__top .sf-logo__text { font-size: 22px; }
.sidebar__caption { margin-top: 6px; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.35; }
.sidebar__body {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-top: 6px;
    padding: 0 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.24) transparent;
}
.sidebar__body::-webkit-scrollbar { width: 6px; }
.sidebar__body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.24);
    border-radius: 999px;
}
.sidebar__nav { position: relative; z-index: 1; display: grid; gap: 6px; }
.sidebar__nav--admin { margin-top: 10px; }
.sidebar__divider {
    position: relative;
    z-index: 1;
    margin: 12px 8px 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.26), rgba(255,255,255,.08));
}
.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    color: rgba(255,255,255,.86);
    font-size: 15px;
    transition: .18s ease;
}
.sidebar__link .sf-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.sidebar__link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar__link.is-active {
    background: linear-gradient(135deg, var(--primary), #08766d);
    color: #fff;
    box-shadow: 0 8px 18px rgba(18, 150, 126, .24);
}

.app-main { flex: 1; min-width: 0; padding: 38px 48px 56px; }
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.page-header__intro { min-width: 0; flex: 1 1 auto; }
.page-header__aside {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}
.page-header h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -.04em;
    color: var(--text);
}
.page-header p { margin: 8px 0 0; color: var(--text-soft); font-size: 20px; line-height: 1.4; }
.header-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.user-menu { position: relative; flex: 0 0 auto; }
.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-1);
    transition: .18s ease;
}
.user-menu__trigger:hover { border-color: var(--border-strong); }
.user-menu.is-open .user-menu__trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(18, 150, 126, .12);
}
.user-menu__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #08766d);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
}
.user-menu__name {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
}
.user-menu__chevron { color: var(--text-soft); transition: transform .18s ease; }
.user-menu.is-open .user-menu__chevron { transform: rotate(180deg); }
.user-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(280px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-2);
}
.user-menu__panel[hidden] { display: none; }
.user-menu__identity {
    padding: 4px 8px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.user-menu__identity strong {
    display: block;
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
}
.user-menu__identity small {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}
.user-menu__item,
.user-menu__panel form { display: block; width: 100%; }
.user-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.user-menu__item:hover { background: var(--surface-soft); }
.user-menu__item--danger { color: var(--danger); }
.user-menu__item--danger:hover { background: var(--danger-soft); }

/* Cards and sections */
.card {
    background: linear-gradient(180deg, #fff 0%, #fff 72%, #fbfcfe 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
}
.card-pad { padding: 28px 32px; }
.card-title { margin: 0; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.card-subtitle { margin: 8px 0 0; color: var(--text-soft); font-size: 16px; line-height: 1.45; }
.section-stack { display: grid; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-center { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--text-soft); }
.small { font-size: 14px; }

/* Buttons */
.btn {
    border: 0;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(7, 23, 47, .08); }
.btn:active { transform: translateY(0); }
.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #14a98d, #08766d);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(18, 150, 126, .22);
}
.btn-primary:hover { box-shadow: 0 14px 28px rgba(18, 150, 126, .28); }
.btn-secondary { color: var(--text); background: #fff; border-color: var(--border-strong); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-danger { color: var(--danger); background: #fff7f7; border-color: rgba(239,68,68,.35); }
.btn-danger.is-filled { color: #fff; background: linear-gradient(180deg, #ff4a4a, #e1182a); border-color: transparent; }
.btn-icon {
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    color: #10224a;
    border-radius: 10px;
}
.btn-icon.is-danger,
.btn-icon.btn-danger { color: var(--danger); border-color: rgba(239,68,68,.35); background: #fff7f7; }
.btn-icon.is-success { color: var(--success); border-color: rgba(22, 163, 74, .25); background: #f4fcf7; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 64px; padding: 0 34px; border-radius: 12px; font-size: 20px; }
.btn[disabled], .is-disabled { opacity: .55; pointer-events: none; }
.btn-with-icon .sf-icon { color: currentColor; }

/* Forms */
.form-grid { display: grid; gap: 20px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: 16px; color: var(--text); }
.field-hint { color: var(--text-soft); font-size: 13px; line-height: 1.4; }
.form-control {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    border-radius: 10px;
    padding: 0 16px;
    outline: 0;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea.form-control { min-height: 100px; padding: 14px 16px; resize: vertical; }
select.form-control {
    appearance: none;
    padding-right: 48px;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.25 1.5L7 7.25L12.75 1.5' stroke='%23243657' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: calc(100% - 18px) 50%;
    background-size: 14px 9px;
    background-repeat: no-repeat;
}
.form-control:focus { border-color: rgba(18,150,126,.68); box-shadow: 0 0 0 4px rgba(18,150,126,.12); }
.form-control::placeholder { color: #8490a7; }
.form-control.is-error { border-color: rgba(239,68,68,.65); box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.form-control.is-success { border-color: rgba(22,163,74,.65); box-shadow: 0 0 0 3px rgba(22,163,74,.08); }
.form-control--time {
    padding-right: 12px;
    color-scheme: light;
}
.form-control--time::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.72;
}
.form-control--time::-webkit-datetime-edit-ampm-field {
    display: none;
}
.input-wrap { position: relative; }
.input-wrap .form-control { padding-left: 48px; padding-right: 48px; }
.input-wrap > .form-control:first-child { padding-left: 16px; }
.input-wrap > .sf-icon:first-child { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #7f8aa1; }
.input-action { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #6b7690; cursor: pointer; padding: 6px; display: grid; place-items: center; }
.check-row { display: inline-flex; align-items: flex-start; gap: 12px; color: var(--text-soft); line-height: 1.45; }
.checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 6px;
    border: 2px solid #aeb8c8;
    background: #fff;
    position: relative;
    flex: 0 0 24px;
}
.checkbox:checked { background: linear-gradient(180deg, #14a98d, #08766d); border-color: transparent; }
.checkbox:checked::after { content: ""; position: absolute; left: 6px; top: 1px; width: 7px; height: 12px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.switch { width: 48px; height: 26px; border-radius: 99px; background: #d7dee8; padding: 3px; position: relative; }
.switch::after { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.16); transition: .18s; }
.switch.is-on { background: var(--primary); }
.switch.is-on::after { transform: translateX(22px); }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.section-head > div { min-width: 0; }
.section-head h2 { margin-top: 0; }
.section-head p { margin-bottom: 0; color: var(--text-soft); }

/* Badges, chips, progress */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warning { color: #a36300; background: var(--warning-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }
.badge-muted { color: #536079; background: #eef2f6; }
.badge-primary { color: var(--primary); background: var(--primary-soft); }
.badge-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    background: #fff;
    font-weight: 700;
}
.chip.is-active { color: var(--info); background: var(--info-soft); border-color: rgba(37,99,235,.2); }
.progress { height: 10px; background: #e6eaf0; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #1f7afa, #0067ff); border-radius: inherit; }
.progress.success > span { background: linear-gradient(90deg, #3ecb81, #18a35a); }
.progress.warning > span { background: linear-gradient(90deg, #ffca68, #f59e0b); }
.progress-thin { height: 6px; }

/* Tables and lists */
.table-card { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
.sf-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.sf-table th, .sf-table td { padding: 20px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.sf-table th { color: #33415f; font-weight: 800; font-size: 15px; }
.sf-table td { color: #1b2a4d; font-size: 16px; }
.sf-table tr:last-child td { border-bottom: 0; }
.action-row { display: flex; align-items: center; gap: 12px; }
.user-filter-grid { grid-template-columns: minmax(260px,1fr) 260px 260px auto; margin-top: 34px; align-items: center; }
.list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.list-row + .list-row { margin-top: 12px; }
.list-row__content { flex: 1; min-width: 0; }
.list-row__content strong { display: block; font-size: 16px; }
.list-row__content small { color: var(--text-soft); }
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: var(--info-soft);
    color: var(--info);
}
.logo-icon-box {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    aspect-ratio: 1;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--info-soft);
    color: var(--info);
}
.logo-icon-box.teal { color: var(--primary); background: var(--primary-soft); }
.logo-icon-box.green { color: var(--success); background: var(--success-soft); }
.logo-icon-box.orange { color: var(--warning); background: var(--warning-soft); }
.logo-icon-box.red { color: var(--danger); background: var(--danger-soft); }
.logo-icon-box.purple { color: var(--purple); background: var(--purple-soft); }

/* Auth */
.auth-page { min-height: 100vh; background: var(--bg); }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 46vw) 1fr; }
.auth-side {
    position: relative;
    overflow: hidden;
    padding: 70px 72px;
    color: #fff;
    background:
        radial-gradient(circle at 84% 63%, rgba(0, 116, 255, .45), transparent 22%),
        radial-gradient(circle at 0% 100%, rgba(38, 123, 255, .55), transparent 26%),
        linear-gradient(180deg, #071633 0%, #0a2e6d 100%);
}
.auth-side::before,
.auth-side::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(39, 144, 255, .24);
    border-radius: 50%;
    pointer-events: none;
}
.auth-side::before { width: 620px; height: 620px; left: -240px; bottom: -220px; }
.auth-side::after { width: 420px; height: 420px; right: -140px; bottom: -120px; }
.auth-side__brand { position: relative; z-index: 1; }
.auth-side__brand p { margin: 16px 0 0; color: rgba(255,255,255,.75); font-size: 22px; }
.auth-features { position: relative; z-index: 1; display: grid; gap: 34px; margin-top: 82px; max-width: 560px; }
.auth-feature { display: grid; grid-template-columns: 72px 1fr; gap: 22px; align-items: center; }
.auth-feature__icon { width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center; color: #22d9c3; border: 1px solid rgba(34, 217, 195, .55); background: rgba(0, 60, 130, .35); }
.auth-feature strong { display: block; font-size: 19px; margin-bottom: 8px; }
.auth-feature p { margin: 0; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.45; }
.auth-side__lead { position: relative; z-index: 1; margin-top: 80px; max-width: 520px; font-size: 26px; line-height: 1.45; color: rgba(255,255,255,.92); }
.auth-illustration { position: absolute; left: 110px; bottom: 110px; width: 410px; height: 250px; opacity: .92; }
.auth-illustration__window { position: absolute; inset: 32px 20px 30px 0; border: 1px solid rgba(96, 169, 255, .25); border-radius: 18px; background: linear-gradient(135deg, rgba(63,111,238,.25), rgba(0,24,80,.6)); box-shadow: 0 30px 80px rgba(0,0,0,.2); }
.auth-illustration__window > span { position: absolute; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: rgba(96,169,255,.7); }
.auth-illustration__window > span:nth-child(1) { left: 24px; }
.auth-illustration__window > span:nth-child(2) { left: 48px; }
.auth-illustration__window > span:nth-child(3) { left: 72px; width: 140px; border-radius: 12px; opacity: .25; }
.auth-illustration__chart { position: absolute; left: 110px; top: 78px; width: 150px; height: 72px; border-radius: 10px; background: linear-gradient(180deg, rgba(31,122,250,.28), rgba(31,122,250,.06)); }
.auth-illustration__chart::after { content: ""; position: absolute; left: 18px; right: 18px; top: 28px; height: 38px; border-top: 3px solid #20d4c6; border-radius: 50%; transform: rotate(-8deg); }
.auth-illustration__bars { position: absolute; right: 18px; top: 78px; width: 86px; height: 88px; border-radius: 10px; background: rgba(31,122,250,.22); display: flex; align-items: end; justify-content: center; gap: 10px; padding: 14px; }
.auth-illustration__bars i { width: 10px; border-radius: 8px; background: #1f7afa; }
.auth-illustration__bars i:nth-child(1) { height: 46px; }
.auth-illustration__bars i:nth-child(2) { height: 62px; }
.auth-illustration__bars i:nth-child(3) { height: 34px; }
.auth-illustration__plane { position: absolute; right: -16px; bottom: 18px; width: 90px; height: 90px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: linear-gradient(135deg, #27d7b8, #1a8bff); box-shadow: 0 0 40px rgba(34, 217, 195, .48); }
.auth-main { display: grid; place-items: center; padding: 48px; background: radial-gradient(circle at top, rgba(224, 232, 243, .68), transparent 40%), var(--bg); }
.auth-card { width: min(690px, 100%); padding: 72px 64px; border-radius: 24px; }
.auth-card--register { padding-bottom: 0; overflow: hidden; }
.auth-card__head { text-align: center; margin-bottom: 42px; }
.auth-card__head h1 { margin: 0; font-size: 44px; line-height: 1.08; letter-spacing: -.04em; }
.auth-card__head p { margin: 16px 0 0; font-size: 22px; color: var(--text-soft); }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 4px 0 24px; }
.auth-link { color: #1478ff; font-weight: 700; }
.auth-card__footer { margin: 34px -64px 0; padding: 26px 64px; text-align: center; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 18px; }
.auth-card__footer a { color: var(--primary); font-weight: 800; margin-left: 8px; }
.auth-note { display: flex; align-items: flex-start; gap: 12px; color: var(--text-soft); font-size: 14px; line-height: 1.45; margin: 18px 0 0; }
.auth-note .sf-icon { color: #7f8aa1; }

/* Dashboard metrics */
.metric-card { padding: 26px 24px; min-height: 148px; display: grid; align-content: space-between; gap: 12px; }
.metric-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; color: var(--text-soft); font-weight: 700; }
.metric-card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); }
.metric-card__value { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.metric-card__value.is-success { color: var(--primary); }
.metric-card__value.is-danger { color: var(--danger); }
.metric-card__foot { font-size: 14px; color: var(--text-soft); }
.metric-progress { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }

/* Calendar */
.calendar-card { padding: 24px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 12px 0 24px; }
.calendar-toolbar h3 { margin: 0; font-size: 20px; min-width: 140px; text-align: center; }
.calendar-nav { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; color: var(--text-soft); font-size: 13px; margin-bottom: 20px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: -1px; background: var(--border-strong); }
.legend-dot.work { background: #bfead7; }
.legend-dot.weekend { background: #ffdcdc; }
.legend-dot.personal { background: #ffe8af; }
.legend-dot.vacation { background: #cfe3ff; }
.legend-dot.overtime { background: transparent; border: 2px solid var(--danger); border-radius: 4px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekdays { margin-bottom: 10px; color: #344466; font-weight: 800; font-size: 13px; text-align: center; }
.day {
    min-height: 76px;
    padding: 10px 10px 8px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    display: grid;
    gap: 8px;
    align-content: space-between;
    color: #17274d;
    position: relative;
    text-align: left;
    cursor: pointer;
}
.day.is-disabled, .day-blank { cursor: default; }
.day.is-today::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}
.day-blank { border-color: transparent; background: transparent; }
.day.is-muted { color: #98a5bb; background: #fbfcfe; }
.day.is-weekend { background: #fff1f1; }
.day.is-personal { background: #fff6dc; }
.day.is-vacation { background: #eef6ff; }
.day.is-selected { border: 2px solid var(--primary); box-shadow: 0 0 0 3px rgba(18,150,126,.08); }
.day.is-overtime { border: 2px solid var(--danger); background: #fffafa; }
.day__num { font-weight: 800; font-size: 16px; }
.day__percent { font-size: 13px; font-weight: 800; color: #415172; }
.day__bar { height: 8px; border-radius: 99px; background: #e5eaf2; overflow: hidden; }
.day__bar span { display: block; height: 100%; border-radius: inherit; background: #b9e8d3; }
.day.is-overtime .day__bar span { background: #9be1c4; }

/* Tasks */
.task-list { display: grid; gap: 16px; }
.task-item { padding: 18px 20px; border-radius: 14px; background: #fbfcfe; border: 1px solid transparent; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
.task-item a { color: #1a73ff; text-decoration: underline; font-weight: 800; }
.task-item p { margin: 6px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.35; }
.task-item strong:last-child { align-self: center; }
.dashboard-calendar-layout { grid-template-columns: minmax(0, 1.4fr) minmax(360px, .9fr); align-items: start; }
.dashboard-task-panel { align-self: start; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.dashboard-task-panel [data-calendar-detail-body] { overflow-y: auto; min-height: 0; padding-right: 4px; }
.dashboard-task-empty { padding: 18px 20px; border-radius: 14px; background: #fbfcfe; color: var(--text-soft); }
.dashboard-task-panel [data-status-dispatch-form].is-submitting [data-send-status-button] {
    pointer-events: none;
    opacity: .6;
}
.summary-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.summary-card { padding: 20px 26px; display: flex; align-items: center; gap: 18px; }
.summary-card strong { display: block; font-size: 28px; margin-top: 4px; }

/* Integrations */
.telegram-card {
    display: grid;
    grid-template-columns: 214px 1fr 360px;
    gap: 40px;
    align-items: center;
    overflow: visible;
    padding-block: 36px;
}
.telegram-card--unlinked { grid-template-columns: 214px 1fr; }
.telegram-orb { width: 142px; height: 142px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #20d4c6, #1a8bff); box-shadow: 0 0 0 18px rgba(26,139,255,.08), 0 0 0 36px rgba(26,139,255,.04); }
.telegram-orb .sf-icon { transform: translateX(-2px); }
.telegram-card__actions { align-self: start; gap: 14px; padding-top: 4px; }
.code-box { display: inline-flex; align-items: center; gap: 20px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 16px 22px; background: #fbfcfe; font-size: 34px; letter-spacing: .32em; color: #1675ff; font-weight: 800; }
.code-box__actions { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; letter-spacing: 0; }
.flow-steps { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; }
.telegram-card--unlinked > .flow-steps { grid-column: 2 / 4; justify-self: start; width: min(100%, 820px); }
.flow-step { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--text-soft); font-size: 14px; }
.flow-step .logo-icon-box { width: 46px; height: 46px; }
.integration-card { padding: 24px; display: grid; gap: 16px; min-height: 184px; }
.integration-card__logo { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #f5f7fa; font-weight: 900; color: var(--text); }
.integration-card__logo.jira { color: #0c66e4; background: #eef5ff; }
.integration-card__logo.youtrack { color: #111827; background: linear-gradient(135deg, #f4e6ff, #e9f7ff); }

/* Planner */
.info-strip { display: flex; align-items: center; gap: 22px; padding: 22px 24px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-1); }
.info-strip.is-danger { border-color: rgba(239,68,68,.25); background: #fff7f7; color: var(--danger); }
.info-strip .logo-icon-box {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
}
.number-list { display: grid; gap: 26px; padding: 4px 0; }
.number-list li { display: flex; align-items: center; gap: 18px; list-style: none; color: #263759; font-weight: 700; }
.number-list span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info); font-weight: 800; }
.exception-list { display: grid; gap: 14px; }
.exception-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 12px; padding: 16px; background: #f4f8ff; border: 1px solid #cfe1ff; font-weight: 800; }
.exception-item.personal { background: #fff7e4; border-color: #ffe1a2; }
.exception-item .btn-icon { width: 38px; min-width: 38px; height: 38px; background: #fff; }
.planner-calendar-layout { grid-template-columns: minmax(0, 1.45fr) 480px; align-items: start; }
.schedule-group { display: grid; gap: 14px; }
.exception-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fbfcfe; }
.exception-edit-row.single { grid-template-columns: minmax(0, 1fr) auto; }
.exception-edit-row .field { margin-bottom: 0; }

/* FAQ */
.faq-hero { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: center; }
.faq-art { display: grid; place-items: center; height: 150px; }
.faq-bubble { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #2a8cff, #2363eb); color: #fff; font-size: 54px; font-weight: 800; box-shadow: 0 22px 42px rgba(37,99,235,.22); }
.accordion { display: grid; gap: 0; overflow: hidden; }
.accordion-item { border: 1px solid var(--border); background: #fff; }
.accordion-item:first-child { border-radius: 14px 14px 0 0; }
.accordion-item:last-child { border-radius: 0 0 14px 14px; }
.accordion-item + .accordion-item { border-top: 0; }
.accordion-trigger { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 0 18px; background: #fff; border: 0; color: var(--text); font-weight: 800; font-size: 17px; cursor: pointer; text-align: left; }
.accordion-trigger__left { display: flex; align-items: center; gap: 12px; }
.accordion-panel { display: none; padding: 0 24px 24px 64px; color: var(--text-soft); line-height: 1.55; }
.accordion-item.is-open { background: linear-gradient(180deg, #f7fbff, #fff); }
.accordion-item.is-open .accordion-panel { display: block; }
.accordion-item.is-open .accordion-trigger > .sf-icon:last-child { transform: rotate(180deg); }
.faq-steps { display: grid; gap: 8px; margin-top: 10px; }
.faq-step { display: flex; align-items: flex-start; gap: 10px; }
.faq-step span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info); font-weight: 800; flex: 0 0 auto; }
.faq-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    align-items: center;
}
.faq-search-submit {
    align-self: center;
    justify-self: end;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: #7f8aa1;
}
.faq-search-submit:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: none;
    color: var(--text);
}

/* Bot illustration */
.robot-hero { display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 34px; }
.robot-art { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--primary-soft), #f6fffb); color: var(--primary); box-shadow: 0 0 0 20px rgba(18,150,126,.05); }
.robot-art .sf-icon { width: 84px; height: 84px; }
.form-card { padding: 28px; }

/* Alerts */
.alert { display: flex; align-items: center; gap: 16px; min-height: 58px; border-radius: 12px; padding: 14px 18px; border: 1px solid transparent; }
.alert .sf-icon:last-child { margin-left: auto; }
.alert-info { background: var(--info-soft); color: #2f5eaf; border-color: #d4e4ff; }
.alert-success { background: var(--success-soft); color: #267143; border-color: #cfefd9; }
.alert-warning { background: var(--warning-soft); color: #8f5e00; border-color: #ffe1a2; }
.alert-danger { background: var(--danger-soft); color: #b52929; border-color: #ffd0d0; }

/* UI kit */
.kit-body { background: #f8fafc; }
.kit-page { padding: 26px 34px 46px; }
.kit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.kit-header__brand { display: flex; align-items: center; gap: 24px; }
.kit-header__brand > span { width: 1px; height: 34px; background: var(--border-strong); }
.kit-header h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.kit-badge { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 12px; background: #eaf0f6; color: #536079; font-weight: 800; }
.kit-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.kit-section { padding: 24px; }
.kit-section h2 { margin: 0 0 22px; font-size: 21px; }
.kit-span-6 { grid-column: span 6; }
.kit-span-7 { grid-column: span 7; }
.kit-span-5 { grid-column: span 5; }
.kit-span-12 { grid-column: span 12; }
.swatch-grid { display: grid; grid-template-columns: repeat(6, minmax(90px, 1fr)); gap: 18px; }
.swatch { display: grid; gap: 8px; color: #33415f; font-size: 13px; font-weight: 700; }
.swatch i { display: block; height: 76px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.type-table { width: 100%; border-collapse: collapse; }
.type-table td, .type-table th { padding: 14px; border-bottom: 1px solid var(--border); text-align: left; }
.type-table th { color: var(--text-soft); font-size: 13px; }
.icon-grid { display: grid; grid-template-columns: repeat(12, minmax(70px,1fr)); gap: 14px; }
.icon-cell { min-height: 80px; display: grid; place-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: #fff; font-size: 11px; text-align: center; }
.icon-cell .sf-icon { width: 28px; height: 28px; }
.button-matrix { display: grid; grid-template-columns: 160px repeat(4, 1fr); gap: 16px; align-items: center; }
.button-matrix > strong { color: var(--text-soft); }
.demo-calendar { max-width: 520px; }

/* Templates */
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.template-card { padding: 24px; display: grid; gap: 18px; }
.template-card textarea { min-height: 150px; }

@media (max-width: 1280px) {
    :root { --sidebar-width: 280px; }
    .app-main { padding: 30px; }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .telegram-card { grid-template-columns: 214px 1fr; }
    .telegram-card > .flow-steps { grid-column: 1 / -1; }
    .robot-hero { grid-template-columns: 160px 1fr; }
    .robot-hero .btn { grid-column: 2; width: max-content; }
}
@media (max-width: 980px) {
    .app-shell { display: block; }
    .sidebar { position: relative; width: 100%; height: auto; padding: 24px; }
    .sidebar__nav { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header__aside { width: 100%; justify-content: space-between; }
    .header-actions { width: 100%; justify-content: flex-start; }
    .grid-2, .grid-3, .grid-4, .grid-5, .summary-row, .template-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-main { min-height: 100vh; padding: 24px; }
    .auth-card { padding: 40px 24px; }
    .auth-card__footer { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
    .faq-hero, .telegram-card, .robot-hero { grid-template-columns: 1fr; }
    .kit-grid { display: grid; grid-template-columns: 1fr; }
    .kit-span-5, .kit-span-6, .kit-span-7, .kit-span-12 { grid-column: auto; }
    .swatch-grid, .icon-grid, .button-matrix { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .app-main { padding: 24px 16px; }
    .page-header h1 { font-size: 32px; }
    .page-header p { font-size: 16px; }
    .card-pad { padding: 22px; }
    .calendar-weekdays, .calendar-grid { gap: 5px; }
    .day { min-height: 62px; padding: 8px; }
    .day__bar { display: none; }
    .header-actions .btn { width: 100%; }
    .user-menu { margin-left: auto; }
    .user-menu__name { max-width: 120px; }
    .sidebar__nav { grid-template-columns: 1fr; }
}
.kit-section .grid-2 .card:first-child .sf-logo__text { color: var(--text); }

/* App-only helpers that are not full UI-kit components. */
.note-box { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.note-box h3 { margin-top: 0; }
.link { color: #1a73ff; text-decoration: none; font-weight: 700; }
.link:hover { text-decoration: underline; }
.inline-form { margin: 0; display: inline; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.quick-link-card { display: block; color: inherit; border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: #fff; box-shadow: var(--shadow-1); }
.quick-link-card strong { display: block; margin-bottom: 8px; font-size: 17px; }
.quick-link-card span { color: var(--text-soft); }

/* FAQ admin */
.faq-admin-meta-row { align-items: start; }
.faq-admin-meta-row .field-hint--placeholder { visibility: hidden; }
.faq-tag-suggest { position: relative; }
.faq-tag-suggest__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-1);
}
.faq-tag-suggest__menu[hidden] {
    display: none;
}
.faq-tag-suggest__item {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
    min-height: 36px;
    padding: 0 10px;
    cursor: pointer;
}
.faq-tag-suggest__item:hover {
    background: var(--surface-soft);
}

/* Status templates pages */
.templates-page { gap: 24px; }
.templates-hero {
    min-height: 250px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    align-items: center;
    gap: 34px;
    padding: 38px 42px;
}
.templates-hero__content { max-width: 650px; display: grid; gap: 14px; }
.templates-hero__content .badge { width: max-content; }
.templates-hero__content .card-title { font-size: 30px; }
.templates-hero__content .card-subtitle { font-size: 18px; line-height: 1.5; }
.templates-hero__button { min-width: 350px; }
.templates-hero__art { display: flex; justify-content: center; }
.template-illustration { position: relative; width: 190px; height: 160px; }
.template-illustration__paper {
    position: absolute;
    left: 36px;
    top: 4px;
    width: 118px;
    height: 150px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f3f0ff 0%, #eef2ff 100%);
    box-shadow: 0 18px 38px rgba(63, 90, 200, .12);
}
.template-illustration__paper::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    border-style: solid;
    border-width: 0 36px 36px 0;
    border-color: transparent #fff transparent transparent;
    opacity: .8;
}
.template-illustration__paper i {
    position: absolute;
    left: 26px;
    height: 7px;
    border-radius: 99px;
    background: #9ea8ff;
}
.template-illustration__paper i:nth-child(1) { top: 38px; width: 74px; }
.template-illustration__paper i:nth-child(2) { top: 62px; width: 82px; }
.template-illustration__paper i:nth-child(3) { top: 86px; width: 58px; }
.template-illustration__paper i:nth-child(4) { top: 112px; width: 44px; opacity: .55; }
.template-illustration__bubble {
    position: absolute;
    right: 6px;
    bottom: 14px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(145deg, #8a8cff, #3f7dff);
    box-shadow: 0 20px 36px rgba(63, 125, 255, .22);
}
.template-illustration__bubble::after {
    content: "";
    position: absolute;
    left: 20px;
    bottom: -7px;
    border-style: solid;
    border-width: 16px 16px 0 0;
    border-color: #627cff transparent transparent transparent;
}
.template-illustration__bubble i {
    position: absolute;
    left: 28px;
    height: 6px;
    border-radius: 99px;
    background: #fff;
    opacity: .9;
}
.template-illustration__bubble i:first-child { top: 30px; width: 34px; }
.template-illustration__bubble i:last-child { top: 46px; width: 48px; }
.template-illustration__dot { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #e6e8ff; }
.template-illustration__dot--left { left: 0; top: 100px; }
.template-illustration__dot--top { right: 18px; top: 0; width: 22px; height: 22px; }
.template-filter-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 300px 300px auto;
    gap: 20px;
    align-items: center;
    margin-top: 30px;
}
.templates-table th:last-child,
.templates-table td:last-child { width: 230px; }
.template-info-strip { min-height: 84px; }
.template-info-strip strong { font-size: 17px; }
.template-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
    gap: 24px;
    align-items: start;
}
.template-editor-card { padding: 24px 26px 28px; }
.template-back-link { width: max-content; margin-bottom: 22px; padding-inline: 18px; }
.template-editor-head { margin-bottom: 22px; }
.template-editor-head .badge { margin-bottom: 14px; }
.template-form { gap: 18px; }
.template-textarea { font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.45; color: #142446; }
.template-textarea--layout { min-height: 220px; }
.template-textarea--task { min-height: 100px; }
.template-textarea--small { min-height: 82px; }
.template-format-grid { gap: 28px; }
.label-with-help { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.help-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    display: grid;
    place-items: center;
    color: #6c7892;
    font-size: 14px;
    font-weight: 800;
    background: #fff;
}
.template-help-stack { gap: 12px; }
.template-side-card { padding: 22px 26px; }
.template-side-card .card-title { font-size: 22px; }
.template-side-card--compact { padding-block: 18px; }
.placeholder-table-wrap { margin-top: 14px; overflow-x: auto; }
.placeholder-table { width: 100%; border-collapse: collapse; min-width: 460px; }
.placeholder-table th,
.placeholder-table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    color: #203151;
    font-size: 15px;
}
.placeholder-table th {
    color: #203151;
    font-size: 14px;
    font-weight: 800;
}
.placeholder-table td:first-child {
    width: 42%;
    font-weight: 800;
    color: #34446a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
}
.placeholder-table tr:last-child td { border-bottom: 0; }
.template-examples { display: grid; gap: 8px; margin-top: 16px; color: #2b3a5c; }
.template-examples div { display: flex; align-items: center; gap: 8px; }
.template-examples span { color: var(--text-soft); }
.template-examples strong { font-weight: 600; }
.template-preview {
    margin-top: 14px;
    padding: 18px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #fbfcfe;
    color: #172744;
    font-size: 15px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}
.template-preview a { color: #1a73ff; font-weight: 800; }
@media (max-width: 1380px) {
    .templates-hero { grid-template-columns: 210px minmax(0, 1fr); }
    .templates-hero__button { grid-column: 2; width: max-content; min-width: 300px; }
    .template-filter-grid { grid-template-columns: minmax(250px, 1fr) repeat(2, 220px) auto; }
    .template-editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .templates-hero { grid-template-columns: 1fr; text-align: left; }
    .templates-hero__art { justify-content: flex-start; }
    .templates-hero__button { grid-column: auto; width: 100%; min-width: 0; }
    .template-filter-grid { grid-template-columns: 1fr; }
    .template-format-grid { grid-template-columns: 1fr; }
}

/* Suggestions */
.suggestion-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.suggestion-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: zoom-in;
    aspect-ratio: 1;
}
.suggestion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 18, 36, .82);
}
.lightbox[hidden] {
    display: none;
}
.lightbox__image {
    max-width: min(96vw, 1600px);
    max-height: 92vh;
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    object-fit: contain;
    background: #fff;
}
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
}
.lightbox__close:hover {
    background: rgba(255, 255, 255, .24);
}
