:root {
    --bg: #0c0906;
    --panel: #17110c;
    --panel-soft: #211911;
    --line: rgba(201, 161, 99, 0.22);
    --text: #f5ede2;
    --muted: #c2b3a0;
    --gold: #c9a163;
    --gold-strong: #e0b774;
    --danger: #a84a44;
    --success: #2f7d52;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(201, 161, 99, 0.14), transparent 35%),
        linear-gradient(135deg, #0a0705 0%, #15100b 100%);
    color: var(--text);
}

body.is-authenticated {
    overflow: hidden;
}

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

.system-shell {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    padding: 28px 22px;
    background: rgba(9, 7, 5, 0.88);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold), var(--gold-strong));
    color: #1b140e;
    font-size: 24px;
    font-weight: 800;
}

.brand strong,
.hero-card h1,
.panel-card h2,
.auth-card h1 {
    color: var(--gold-strong);
}

.brand small,
.muted,
.sidebar-card p,
.panel-card p,
.stat-card small,
.login-note {
    color: var(--muted);
}

.sidebar-card,
.auth-card,
.hero-card,
.stat-card,
.panel-card,
.alert {
    border: 1px solid var(--line);
    background: rgba(23, 17, 12, 0.88);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.stat-card {
    text-align: center;
}

.sidebar-card {
    padding: 18px;
}

.btn-full {
    width: 100%;
}

.sidebar-profile-card {
    display: grid;
    gap: 14px;
}

.sidebar-profile-head {
    display: grid;
    gap: 10px;
    align-items: center;
    justify-items: center;
    text-align: center;
}

.sidebar-profile-photo-wrap,
.employee-photo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile-head strong {
    display: block;
}

.sidebar-profile-head p {
    margin: 6px 0 0;
    font-size: 14px;
}

.sidebar-profile-photo,
.profile-modal-photo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(201, 161, 99, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-profile-photo-placeholder,
.profile-modal-photo-placeholder {
    display: grid;
    place-items: center;
    color: var(--gold-strong);
    font-size: 18px;
    font-weight: 800;
}

.sidebar-label,
.eyebrow {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: var(--gold);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    flex: 1 1 auto;
    overflow-y: auto;
    align-content: start;
    padding-right: 4px;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted);
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(201, 161, 99, 0.12);
    color: var(--text);
}

.content {
    min-width: 0;
    padding: clamp(20px, 2.4vw, 32px);
    display: grid;
    align-content: start;
    gap: 20px;
    height: 100vh;
    overflow-y: auto;
}

.auth-card,
.hero-card,
.panel-card {
    min-width: 0;
    padding: 28px;
}

.auth-card {
    max-width: 520px;
    margin: 8vh auto 0;
}

.grid-stats,
.panel-grid,
.feature-grid {
    display: grid;
    gap: 18px;
}

.grid-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-stats-inline {
    display: flex;
    gap: 8px;
}

.grid-stats-inline .stat-card {
    flex: 0 0 calc(25% - 6px);
}

.grid-stats-single .stat-card {
    flex-basis: 100%;
}

.panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-card-wide {
    grid-column: 1 / -1;
}

.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 34px;
    color: var(--gold-strong);
}

.form-grid {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

input {
    width: 100%;
    border: 1px solid rgba(201, 161, 99, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
}

textarea {
    width: 100%;
    border: 1px solid rgba(201, 161, 99, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    resize: vertical;
}

select {
    width: 100%;
    border: 1px solid rgba(201, 161, 99, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
}

select option {
    background: #1a140e;
    color: #f5ede2;
}

input:focus {
    outline: 2px solid rgba(201, 161, 99, 0.24);
    border-color: rgba(201, 161, 99, 0.36);
}

select:focus {
    outline: 2px solid rgba(201, 161, 99, 0.24);
    border-color: rgba(201, 161, 99, 0.36);
}

textarea:focus {
    outline: 2px solid rgba(201, 161, 99, 0.24);
    border-color: rgba(201, 161, 99, 0.36);
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-strong));
    color: #1b140e;
}

.btn-light {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions-emphasis {
    margin-top: 22px;
}

.hero-primary-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
    padding: 18px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gold), var(--gold-strong));
    color: #1b140e;
    box-shadow: 0 18px 36px rgba(201, 161, 99, 0.18);
}

.hero-primary-link span {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(27, 20, 14, 0.08);
}

.hero-primary-link svg {
    width: 24px;
    height: 24px;
}

.hero-primary-link div {
    display: grid;
    gap: 4px;
}

.hero-primary-link strong {
    font-size: 18px;
}

.hero-primary-link small {
    color: rgba(27, 20, 14, 0.78);
}

.quick-access-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.1);
}

.quick-access-card > div {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.quick-access-card strong {
    display: block;
    color: var(--gold-strong);
}

.quick-access-card p {
    margin: 0;
    color: var(--muted);
}

.quick-access-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(201, 161, 99, 0.1);
    color: var(--gold-strong);
    border: 1px solid rgba(201, 161, 99, 0.16);
}

.quick-access-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card-centered {
    text-align: center;
}

.stat-card-centered span,
.stat-card-centered strong,
.stat-card-centered small {
    text-align: center;
}

.tag-list,
.unit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.tag-list li,
.unit-list li {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.unit-list span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.alert {
    padding: 14px 18px;
}

.alert-success {
    border-color: rgba(47, 125, 82, 0.4);
}

.alert-error {
    border-color: rgba(168, 74, 68, 0.5);
}

.alert-warning {
    border-color: rgba(201, 161, 99, 0.4);
}

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

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.schedule-manage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agenda-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.status-card {
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
}

.status-agendado::before {
    background: #3f8f63;
}

.status-confirmado::before {
    background: #3f73c9;
}

.status-concluido::before {
    background: var(--gold);
}

.status-cancelado::before {
    background: #b14f49;
}

.status-faltou::before {
    background: #cb8d33;
}

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

.section-header > * {
    min-width: 0;
}

.agenda-list {
    display: grid;
    gap: 16px;
}

.agenda-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.agenda-board-units {
    display: grid;
    gap: 20px;
}

.board-unit-group {
    display: grid;
    gap: 14px;
}

.board-unit-header {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 161, 99, 0.12);
}

.board-unit-header h3 {
    margin: 0;
    color: var(--gold-strong);
}

.board-column {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.1);
    overflow: hidden;
}

.board-column-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid rgba(201, 161, 99, 0.1);
    background: rgba(201, 161, 99, 0.05);
}

.board-column-header strong {
    color: var(--gold-strong);
}

.board-column-header span {
    color: var(--muted);
    font-size: 12px;
}

.board-column-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.board-item {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.board-item-time strong,
.board-item-content strong {
    display: block;
}

.board-item-time small,
.board-item-content p {
    color: var(--muted);
}

.board-item-content p {
    margin: 8px 0 0;
    line-height: 1.45;
}

.agenda-card {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.1);
    display: grid;
    gap: 16px;
    min-width: 0;
}

.agenda-card-top,
.agenda-meta,
.status-form,
.reschedule-form,
.agenda-actions-grid {
    display: grid;
    gap: 16px;
}

.agenda-card-top {
    grid-template-columns: 1fr auto;
    align-items: start;
}

.agenda-card-top > div,
.agenda-meta > div,
.board-column,
.board-item-content {
    min-width: 0;
}

.agenda-card-top h3 {
    margin: 10px 0 6px;
}

.agenda-time {
    text-align: right;
}

.agenda-time strong,
.agenda-meta strong {
    display: block;
}

.agenda-time small,
.agenda-meta span,
.agenda-meta small {
    color: var(--muted);
}

.agenda-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.status-pill-agendado {
    background: rgba(63, 143, 99, 0.18);
    color: #95e1b2;
}

.status-pill-confirmado {
    background: rgba(63, 115, 201, 0.18);
    color: #99bbff;
}

.status-pill-concluido {
    background: rgba(201, 161, 99, 0.18);
    color: #f3cc8a;
}

.status-pill-cancelado {
    background: rgba(177, 79, 73, 0.18);
    color: #f1a29b;
}

.status-pill-faltou {
    background: rgba(203, 141, 51, 0.18);
    color: #efbb78;
}

.status-form {
    grid-template-columns: 1fr auto;
    align-items: end;
}

.reschedule-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
}

.agenda-actions-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(201, 161, 99, 0.22);
}

.status-locked {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.12);
}

.status-locked strong {
    display: block;
    margin-bottom: 6px;
}

.status-locked p {
    margin: 0;
    color: var(--muted);
}

.client-link {
    color: var(--gold-strong);
    text-decoration: none;
}

.client-link:hover {
    text-decoration: underline;
}

.empty-state h3 {
    margin-top: 0;
}

.clients-note {
    margin-top: 14px;
}

.clients-list {
    display: grid;
    gap: 16px;
}

.catalog-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.single-column-form {
    grid-template-columns: 1fr;
}

.catalog-form-full {
    grid-column: 1 / -1;
}

.catalog-groups {
    display: grid;
    gap: 18px;
}

.catalog-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.catalog-category-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.1);
}

.category-create-form {
    max-width: 420px;
    margin-bottom: 20px;
}

.unit-hours {
    display: grid;
    gap: 6px;
}

.unit-hours span {
    color: var(--muted);
    font-size: 13px;
}

.unit-hours strong {
    font-weight: 600;
}

.catalog-group {
    border-radius: 18px;
    border: 1px solid rgba(201, 161, 99, 0.1);
    background: rgba(255, 255, 255, 0.03);
    padding: 18px;
}

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

.catalog-group-header h3 {
    margin: 0;
    color: var(--gold-strong);
}

.catalog-group-header span {
    color: var(--muted);
}

.catalog-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.catalog-item-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.catalog-item-card span,
.catalog-item-card p {
    color: var(--muted);
}

.catalog-item-card p {
    margin: 0;
}

.catalog-item-card.is-inactive,
.client-card.is-inactive,
.catalog-picker-item.is-inactive {
    opacity: 0.72;
}

.catalog-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.catalog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 6px;
}

.catalog-code {
    color: var(--gold-strong);
}

.catalog-picker {
    display: grid;
    gap: 14px;
}

.section-subtitle {
    display: grid;
    gap: 4px;
}

.section-subtitle strong {
    color: var(--gold-strong);
}

.section-subtitle span {
    color: var(--muted);
    font-size: 13px;
}

.catalog-picker-group {
    display: grid;
    gap: 12px;
}

.catalog-picker-group header strong {
    color: var(--gold-strong);
}

.catalog-picker-items {
    display: grid;
    gap: 10px;
}

.catalog-picker-item {
    grid-template-columns: 1fr 92px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.catalog-picker-item span {
    color: var(--muted);
    font-size: 13px;
}

.catalog-picker-item input {
    padding: 10px 12px;
}

.catalog-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: start;
}

.inline-editor {
    width: 100%;
    border-top: 1px solid rgba(201, 161, 99, 0.12);
    padding-top: 12px;
}

.inline-editor summary {
    cursor: pointer;
    color: var(--gold-strong);
    font-weight: 600;
}

.inline-editor[open] summary {
    margin-bottom: 12px;
}

.compact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-editor-wide {
    width: 100%;
}

.inline-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.compact-picker {
    margin-top: 8px;
}

.client-detail-grid {
    grid-template-columns: 1.25fr 0.95fr;
}

.client-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.1);
}

.client-card-top,
.client-overview-grid,
.client-kpis {
    display: grid;
    gap: 14px;
}

.client-card-top {
    grid-template-columns: 1fr auto;
    align-items: start;
}

.client-card-top h3 {
    margin: 10px 0 6px;
}

.client-card-side {
    text-align: right;
}

.client-card-side strong {
    display: block;
    font-size: 28px;
    color: var(--gold-strong);
}

.client-card-side small {
    color: var(--muted);
}

.client-overview-grid,
.client-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-overview-grid div,
.client-kpis div {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.client-overview-grid span,
.client-kpis span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
}

.client-overview-grid strong,
.client-kpis strong {
    display: block;
}

.client-card-actions {
    display: flex;
    justify-content: flex-end;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.check-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(201, 161, 99, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.check-card input {
    width: auto;
    margin: 0;
}

.check-card small {
    color: var(--muted);
    font-size: 12px;
}

.employee-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.employee-readonly-card {
    display: grid;
    gap: 14px;
}

.employee-list-clean {
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    align-items: start;
}

.employee-card-clean {
    gap: 14px;
    height: 100%;
}

.employee-card-head {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.employee-photo {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    object-fit: cover;
    border: 1px solid rgba(201, 161, 99, 0.22);
    background: rgba(255, 255, 255, 0.04);
}

.employee-photo-placeholder {
    display: grid;
    place-items: center;
    color: var(--gold-strong);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.employee-card-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.employee-primary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.employee-card-status {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.employee-status-toggle {
    margin: 0;
}

.employee-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.1);
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.employee-switch input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--success);
}

.employee-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.employee-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.1);
    color: var(--muted);
    font-size: 13px;
}

.employee-badge-gold {
    color: var(--gold-strong);
    border-color: rgba(201, 161, 99, 0.22);
    background: rgba(201, 161, 99, 0.08);
}

.employee-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.employee-detail-grid div {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.employee-detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.employee-detail-wide {
    grid-column: 1 / -1;
}

.employee-card-actions-clean {
    border-top: 1px solid rgba(201, 161, 99, 0.12);
    padding-top: 14px;
}

.entity-list-clean {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.entity-card-clean {
    height: 100%;
}

.entity-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.entity-card-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.remuneration-box {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.1);
}

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

.form-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.booking-mode-box {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(201, 161, 99, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.booking-mode-box-soft {
    transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.booking-mode-box-soft.is-disabled {
    opacity: 0.68;
}

.booking-type-highlight {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(201, 161, 99, 0.16);
    background: linear-gradient(135deg, rgba(201, 161, 99, 0.12), rgba(255, 255, 255, 0.03));
}

.schedule-note {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(201, 161, 99, 0.1);
    background: rgba(201, 161, 99, 0.06);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.combo-session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.combo-session-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(201, 161, 99, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.combo-session-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.combo-session-service {
    margin: -4px 0 0;
}

.is-hidden {
    display: none !important;
}

.unit-hours-secondary {
    background: rgba(255, 255, 255, 0.03);
}

.employee-manage-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.employee-manage-grid-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-form-main {
    min-width: 0;
}

.employee-photo-editor {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 161, 99, 0.1);
}

.employee-photo-editor-preview {
    display: flex;
    justify-content: center;
}

.employee-photo-large {
    width: 160px;
    height: 160px;
    border-radius: 28px;
}

.employee-profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.employee-profile-summary-card {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.employee-profile-summary-card span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
}

.employee-card-head-grid {
    grid-template-columns: minmax(0, 1fr) 108px;
    align-items: center;
}

.employee-card-info {
    min-width: 0;
}

.employee-photo-wrap-card {
    justify-content: flex-end;
}

.employee-photo-card {
    width: 92px;
    height: 92px;
    border-radius: 24px;
}

.employee-primary-meta-stack {
    display: grid;
    gap: 4px;
}

.employee-detail-grid-clean {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
}

[hidden] {
    display: none !important;
}

.modal-shell[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(23, 17, 12, 0.98);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
    display: grid;
    gap: 18px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
}

.profile-modal-head {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.profile-modal-photo {
    width: 84px;
    height: 84px;
    border-radius: 24px;
}

.profile-modal-grid {
    display: grid;
    gap: 12px;
}

.profile-modal-grid div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 161, 99, 0.08);
}

.profile-modal-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
}

.profile-modal-actions {
    justify-content: flex-end;
}

body.is-modal-open {
    overflow: hidden;
}

@media (max-width: 1400px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agenda-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .catalog-form-grid,
    .catalog-form,
    .compact-form,
    .agenda-actions-grid,
    .agenda-meta,
    .employee-profile-grid,
    .employee-manage-grid,
    .employee-manage-grid-inner,
    .employee-profile-summary-grid,
    .client-detail-grid,
    .client-overview-grid,
    .client-kpis,
    .remuneration-grid,
    .employee-detail-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .system-shell {
        grid-template-columns: 228px minmax(0, 1fr);
    }

    .sidebar {
        padding: 24px 18px;
    }

    .agenda-card-top,
    .status-form,
    .reschedule-form,
    .client-card-top,
    .employee-card-head,
    .employee-card-head-grid,
    .catalog-card-header,
    .catalog-picker-item {
        grid-template-columns: 1fr;
    }

    .employee-card-title-row {
        grid-template-columns: 1fr;
    }

    .agenda-time {
        text-align: left;
    }

    .catalog-card-header,
    .catalog-status-actions,
    .inline-editor-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .client-card-side {
        text-align: left;
    }

    .employee-photo-wrap-card {
        justify-content: flex-start;
    }


    .client-card-actions {
        justify-content: flex-start;
    }
}
@media (max-width: 960px) {
    body.is-authenticated {
        overflow: auto;
    }

    .system-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        position: static;
        height: auto;
        overflow: visible;
    }

    .grid-stats,
    .panel-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .grid-stats-inline {
        display: grid;
        gap: 18px;
    }

    .grid-stats-inline .stat-card {
        flex: initial;
    }

    .filter-grid,
    .agenda-stats,
    .agenda-board,
    .agenda-meta,
    .agenda-card-top,
    .status-form,
    .reschedule-form,
    .agenda-actions-grid,
    .board-item,
    .profile-modal-head {
        grid-template-columns: 1fr;
    }

    .agenda-time {
        text-align: left;
    }

    .content {
        height: auto;
        overflow: visible;
    }
}

.field-span-2 {
    grid-column: span 2;
}

.finance-stats {
    margin-top: 18px;
}

.finance-stats-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-list {
    display: grid;
    gap: 16px;
}

.finance-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(201, 161, 99, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.finance-card h3 {
    margin: 10px 0 6px;
}

.finance-card-compact h3 {
    margin-top: 0;
}

.finance-card-side {
    display: grid;
    gap: 4px;
    text-align: right;
}

.finance-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.finance-meta span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.finance-meta strong {
    color: var(--text);
}

.finance-production-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.finance-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(201, 161, 99, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.finance-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.finance-table th,
.finance-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.finance-table thead th {
    color: var(--gold-strong);
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(18, 13, 8, 0.72);
}

.finance-table tfoot th,
.finance-table tfoot td {
    padding: 13px 14px;
    border-top: 1px solid rgba(201, 161, 99, 0.18);
    border-bottom: 0;
    background: rgba(18, 13, 8, 0.72);
    color: var(--gold-strong);
    font-weight: 700;
}

.finance-table tbody tr:hover {
    background: rgba(201, 161, 99, 0.05);
}

.finance-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    white-space: normal;
}

.finance-table .is-number {
    text-align: right;
}

.status-locked .btn {
    margin-top: 12px;
}

.status-locked-payment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.status-locked-payment-copy {
    min-width: 0;
}

.status-locked-payment-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.status-locked-payment .btn {
    margin-top: 0;
}

@media (max-width: 960px) {
    .field-span-2 {
        grid-column: span 1;
    }

    .finance-stats-compact {
        grid-template-columns: 1fr;
    }

    .finance-card-side {
        text-align: left;
    }

    .status-locked-payment {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-locked-payment-side {
        justify-content: flex-start;
    }
}
