:root {
    --cherrie-primary: #0F2A24;
    --cherrie-secondary: #C8A96A;
    --cherrie-background: #F5EFE6;
    --cherrie-text: #1E1E1E;
    --cherrie-white: #FFFFFF;
    --cherrie-muted: #766F68;
    --cherrie-border: rgba(15, 42, 36, 0.12);
    --cherrie-shadow: 0 14px 35px rgba(15, 42, 36, 0.08);
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(245, 239, 230, 0.92)),
        var(--cherrie-background);
    color: var(--cherrie-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.app-shell {
    min-height: 100vh;
}

.navbar-cherrie {
    background: rgba(15, 42, 36, 0.96);
    box-shadow: 0 12px 32px rgba(15, 42, 36, 0.16);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-brand {
    align-items: center;
    color: var(--cherrie-white);
    display: flex;
    font-weight: 700;
    gap: 0.65rem;
}

.navbar-brand:hover,
.navbar-brand:focus,
.navbar-cherrie .nav-link,
.navbar-cherrie .navbar-toggler {
    color: var(--cherrie-white);
}

.navbar-cherrie .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar-cherrie .navbar-toggler-icon {
    filter: invert(1);
}

.navbar-cherrie .nav-link {
    border-radius: 999px;
    font-size: 0.94rem;
    margin: 0 0.1rem;
    opacity: 0.82;
    padding: 0.48rem 0.85rem;
}

.navbar-cherrie .nav-link.active,
.navbar-cherrie .nav-link:hover {
    background: rgba(200, 169, 106, 0.18);
    color: var(--cherrie-secondary);
    opacity: 1;
}

.brand-mark {
    align-items: center;
    background: var(--cherrie-secondary);
    border-radius: 50%;
    color: var(--cherrie-primary);
    display: inline-flex;
    font-weight: 800;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.app-main {
    padding-bottom: 3rem;
    padding-top: 2.25rem;
}

.user-pill {
    align-items: flex-start;
    color: var(--cherrie-white);
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    line-height: 1.1;
}

.user-pill small {
    color: var(--cherrie-secondary);
    text-transform: uppercase;
}

.page-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-heading h1,
.panel-header h2,
.empty-state h1 {
    color: var(--cherrie-primary);
    font-weight: 700;
    margin: 0;
}

.page-heading h1 {
    font-size: 2rem;
}

.panel-header h2 {
    font-size: 1.15rem;
}

.eyebrow {
    color: var(--cherrie-secondary);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.content-panel,
.metric-card,
.auth-panel {
    background: var(--cherrie-white);
    border: 1px solid var(--cherrie-border);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 42, 36, 0.08);
}

.content-panel {
    padding: 1.35rem;
}

.form-panel {
    max-width: 980px;
}

.metric-card {
    min-height: 8rem;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    background: var(--cherrie-secondary);
    content: "";
    height: 3px;
    left: 1.2rem;
    position: absolute;
    right: 1.2rem;
    top: 0;
}

.metric-card span {
    color: var(--cherrie-muted);
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
}

.metric-card strong {
    color: var(--cherrie-primary);
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.panel-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.table {
    --bs-table-hover-bg: rgba(200, 169, 106, 0.08);
}

.table thead th {
    border-bottom-color: var(--cherrie-border);
    color: var(--cherrie-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.table td {
    border-color: rgba(15, 42, 36, 0.08);
}

.table-actions {
    min-width: 12rem;
    white-space: nowrap;
}

.data-table-toolbar {
    align-items: end;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(16rem, 1.2fr) minmax(0, 2fr) auto;
    margin-bottom: 1rem;
}

.data-table-search {
    display: block;
    margin: 0;
    min-width: 0;
    position: relative;
}

.data-table-search-icon {
    align-items: center;
    color: var(--cherrie-muted);
    display: inline-flex;
    height: 100%;
    left: 0.85rem;
    pointer-events: none;
    position: absolute;
    top: 0;
}

.data-table-search .form-control {
    min-height: 2.65rem;
    padding-left: 2.55rem;
}

.data-table-filters {
    align-items: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    min-width: 0;
}

.data-table-filter,
.data-table-page-size {
    color: var(--cherrie-muted);
    display: flex;
    font-size: 0.72rem;
    font-weight: 800;
    gap: 0.35rem;
    margin: 0;
    text-transform: uppercase;
}

.data-table-filter {
    flex-direction: column;
    min-width: 10rem;
}

.data-table-filter .form-select,
.data-table-page-size .form-select {
    color: var(--cherrie-text);
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 2.4rem;
    text-transform: none;
}

.data-table-actions {
    align-items: end;
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.data-table-page-size {
    align-items: center;
}

.data-table-page-size .form-select {
    width: 5.25rem;
}

.data-table-reset {
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.14);
    height: 2.4rem;
    min-width: 2.4rem;
}

.data-table-reset.is-active {
    background: rgba(200, 169, 106, 0.18);
    border-color: rgba(200, 169, 106, 0.48);
    color: #765820;
}

.data-table-footer {
    align-items: center;
    border-top: 1px solid rgba(15, 42, 36, 0.08);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.9rem;
}

.data-table-info {
    color: var(--cherrie-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.data-table-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.data-table-page-btn {
    align-items: center;
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.12);
    border-radius: 8px;
    color: var(--cherrie-primary);
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 800;
    height: 2.18rem;
    justify-content: center;
    min-width: 2.18rem;
    padding: 0 0.55rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.data-table-page-btn:hover,
.data-table-page-btn:focus {
    background: rgba(200, 169, 106, 0.16);
    border-color: rgba(200, 169, 106, 0.45);
    outline: 0;
    transform: translateY(-1px);
}

.data-table-page-btn.is-active {
    background: var(--cherrie-primary);
    border-color: var(--cherrie-primary);
    color: var(--cherrie-white);
}

.data-table-page-btn:disabled {
    background: rgba(108, 117, 125, 0.08);
    color: rgba(118, 111, 104, 0.58);
    cursor: not-allowed;
    transform: none;
}

.data-table-page-ellipsis {
    color: var(--cherrie-muted);
    font-weight: 800;
    padding: 0 0.15rem;
}

.table .data-table-empty-row td {
    border-bottom: 0;
}

.data-table-empty {
    color: var(--cherrie-muted);
    font-weight: 700;
    padding: 2rem 1rem;
    text-align: center;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.52rem 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
}

.btn-gold {
    background: var(--cherrie-secondary);
    border-color: var(--cherrie-secondary);
    box-shadow: 0 10px 22px rgba(200, 169, 106, 0.22);
    color: var(--cherrie-primary);
}

.btn-gold:hover,
.btn-gold:focus {
    background: #b89551;
    border-color: #b89551;
    color: var(--cherrie-primary);
}

.btn-outline-primary,
.btn-primary-soft {
    border-color: var(--cherrie-primary);
    color: var(--cherrie-primary);
}

.btn-outline-primary:hover,
.btn-primary-soft:hover {
    background: var(--cherrie-primary);
    border-color: var(--cherrie-primary);
    color: var(--cherrie-white);
}

.form-control,
.form-select {
    background-color: #fffdfa;
    border-color: rgba(15, 42, 36, 0.14);
    border-radius: 8px;
    min-height: 2.8rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cherrie-secondary);
    box-shadow: 0 0 0 0.2rem rgba(200, 169, 106, 0.24);
}

.form-select.is-loading,
.entity-input-wrap.is-loading {
    background-color: #f8f5ef;
    border-color: rgba(200, 169, 106, 0.46);
    box-shadow: inset 0 0 0 1px rgba(200, 169, 106, 0.12);
    opacity: 0.86;
}

.form-label {
    color: var(--cherrie-primary);
    font-weight: 700;
}

.form-actions {
    border-top: 1px solid rgba(15, 42, 36, 0.08);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.form-section-title {
    border-top: 1px solid rgba(15, 42, 36, 0.08);
    color: var(--cherrie-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    margin: 1.35rem 0 0.8rem;
    padding-top: 1rem;
    text-transform: uppercase;
}

.form-section-title:first-child {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.check-group {
    align-items: center;
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.14);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 2.8rem;
    padding: 0.55rem 0.8rem;
}

.role-pill,
.status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.42rem 0.68rem;
}

.role-pill {
    background: rgba(15, 42, 36, 0.08);
    color: var(--cherrie-primary);
    text-transform: uppercase;
}

.badge-soft-primary {
    background: rgba(15, 42, 36, 0.1);
    color: var(--cherrie-primary);
}

.badge-soft-gold {
    background: rgba(200, 169, 106, 0.22);
    color: #6d5526;
}

.badge-soft-success {
    background: rgba(25, 135, 84, 0.13);
    color: #146c43;
}

.badge-soft-muted {
    background: rgba(108, 117, 125, 0.13);
    color: #5c636a;
}

.badge-soft-danger {
    background: rgba(220, 53, 69, 0.12);
    color: #a71d2a;
}

.empty-inline,
.empty-state {
    color: var(--cherrie-muted);
    padding: 2rem;
    text-align: center;
}

.empty-state {
    background: var(--cherrie-white);
    border: 1px solid var(--cherrie-border);
    border-radius: 8px;
    box-shadow: var(--cherrie-shadow);
    margin: 2rem auto;
    max-width: 680px;
}

.appointment-summary {
    background: #f8f5ef;
    border: 1px solid var(--cherrie-border);
    border-radius: 8px;
    color: var(--cherrie-primary);
    font-weight: 700;
    padding: 0.85rem 1rem;
}

.appointment-detail {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.appointment-detail div {
    background: rgba(15, 42, 36, 0.04);
    border: 1px solid rgba(15, 42, 36, 0.08);
    border-radius: 8px;
    padding: 1rem;
}

.appointment-detail span {
    color: var(--cherrie-muted);
    display: block;
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.appointment-detail strong {
    color: var(--cherrie-primary);
    display: block;
}

.auth-page {
    background:
        linear-gradient(135deg, rgba(15, 42, 36, 0.98), rgba(36, 66, 58, 0.96)),
        var(--cherrie-primary);
}

.auth-wrapper {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 1.5rem;
}

.auth-panel {
    margin: 0 auto;
    max-width: 430px;
    padding: 2.15rem;
    width: 100%;
}

.lucide {
    height: 1.1rem;
    stroke-width: 2.1;
    width: 1.1rem;
}

.icon-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--cherrie-primary);
    display: inline-flex;
    height: 2.35rem;
    justify-content: center;
    min-width: 2.35rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover,
.icon-btn:focus {
    background: rgba(200, 169, 106, 0.18);
    color: #765820;
    outline: 0;
    transform: translateY(-1px);
}

.password-field {
    align-items: stretch;
}

.password-field .form-control {
    padding-right: 0.75rem;
}

.password-field .btn-password-toggle {
    align-items: center;
    background: #fffdfa;
    border-color: rgba(15, 42, 36, 0.14);
    color: var(--cherrie-primary);
    display: inline-flex;
    justify-content: center;
    min-height: 2.8rem;
    min-width: 2.8rem;
    padding: 0 0.75rem;
}

.password-field .btn-password-toggle:hover,
.password-field .btn-password-toggle:focus {
    background: rgba(200, 169, 106, 0.12);
    border-color: var(--cherrie-secondary);
    color: #765820;
    transform: none;
}

.password-field .btn-password-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(200, 169, 106, 0.24);
}

.password-field .invalid-feedback {
    flex-basis: 100%;
    margin-top: 0.25rem;
}

.cliente-picker {
    position: relative;
}

.entity-picker {
    position: relative;
}

.cliente-input-wrap {
    align-items: center;
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.14);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 2.8rem;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.entity-input-wrap {
    align-items: center;
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.14);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 2.8rem;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.entity-picker:not([data-manage="1"]) .entity-input-wrap {
    grid-template-columns: minmax(0, 1fr) auto;
}

.specialty-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.specialty-list-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.specialty-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.specialty-input-wrap {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.specialty-remove-button {
    color: #a71d2a;
}

.specialty-remove-button:hover,
.specialty-remove-button:focus {
    background: rgba(220, 53, 69, 0.1);
    color: #842029;
}

.cliente-input-wrap:focus-within {
    border-color: var(--cherrie-secondary);
    box-shadow: 0 0 0 0.2rem rgba(200, 169, 106, 0.24);
}

.entity-input-wrap:focus-within {
    border-color: var(--cherrie-secondary);
    box-shadow: 0 0 0 0.2rem rgba(200, 169, 106, 0.24);
}

.cliente-search-input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
}

.entity-search-input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
}

.cliente-search-input:focus {
    border: 0;
    box-shadow: none;
}

.entity-search-input:focus {
    border: 0;
    box-shadow: none;
}

.cliente-picker.is-invalid .cliente-input-wrap {
    border-color: #dc3545;
}

.entity-picker.is-invalid .entity-input-wrap {
    border-color: #dc3545;
}

.cliente-picker.is-invalid .cliente-required-feedback {
    display: block;
}

.entity-picker.is-invalid .entity-required-feedback {
    display: block;
}

.cliente-results {
    background: var(--cherrie-white);
    border: 1px solid var(--cherrie-border);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 42, 36, 0.14);
    display: none;
    left: 0;
    margin-top: 0.4rem;
    max-height: 16rem;
    overflow: auto;
    padding: 0.35rem;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1040;
}

.entity-results {
    background: var(--cherrie-white);
    border: 1px solid var(--cherrie-border);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 42, 36, 0.14);
    display: none;
    left: 0;
    margin-top: 0.4rem;
    max-height: 16rem;
    overflow: auto;
    padding: 0.35rem;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1040;
}

.cliente-results.show {
    display: block;
}

.entity-results.show {
    display: block;
}

.cliente-result-item {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--cherrie-text);
    display: block;
    padding: 0.75rem;
    text-align: left;
    width: 100%;
}

.entity-result-item {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--cherrie-text);
    display: block;
    padding: 0.75rem;
    text-align: left;
    width: 100%;
}

.cliente-result-item:hover,
.cliente-result-item:focus {
    background: rgba(200, 169, 106, 0.14);
    outline: 0;
}

.entity-result-item:hover,
.entity-result-item:focus {
    background: rgba(200, 169, 106, 0.14);
    outline: 0;
}

.cliente-result-item strong,
.cliente-result-item span {
    display: block;
}

.entity-result-item strong,
.entity-result-item span {
    display: block;
}

.cliente-result-item strong {
    color: var(--cherrie-primary);
    font-size: 0.95rem;
}

.entity-result-item strong {
    color: var(--cherrie-primary);
    font-size: 0.95rem;
}

.cliente-result-item span,
.cliente-result-empty {
    color: var(--cherrie-muted);
    font-size: 0.86rem;
}

.entity-result-item span,
.entity-result-empty {
    color: var(--cherrie-muted);
    font-size: 0.86rem;
}

.cliente-result-empty {
    padding: 0.75rem;
}

.entity-result-empty {
    padding: 0.75rem;
}

.cliente-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 42, 36, 0.22);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

.entity-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 42, 36, 0.22);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

.cliente-modal > form,
.entity-modal > form {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    min-height: 0;
}

.cliente-modal .modal-header,
.cliente-modal .modal-footer {
    border-color: rgba(15, 42, 36, 0.08);
    flex: 0 0 auto;
}

.entity-modal .modal-header,
.entity-modal .modal-footer {
    border-color: rgba(15, 42, 36, 0.08);
    flex: 0 0 auto;
}

.cliente-modal .modal-body,
.entity-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.cliente-modal .modal-title {
    color: var(--cherrie-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.entity-modal .modal-title {
    color: var(--cherrie-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-feedback {
    background: rgba(220, 53, 69, 0.08);
    border-radius: 8px;
    color: #a71d2a;
    display: none;
    font-weight: 700;
    margin-top: 1rem;
    padding: 0.8rem 0.95rem;
}

.modal-feedback.show {
    display: block;
}

.agenda-config {
    background: rgba(15, 42, 36, 0.03);
    border: 1px solid rgba(15, 42, 36, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.agenda-config-header {
    align-items: center;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
}

.agenda-config-header strong {
    color: var(--cherrie-primary);
    display: block;
}

.agenda-config-header span {
    color: var(--cherrie-muted);
    font-size: 0.88rem;
}

.agenda-week-grid,
.agenda-block-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.agenda-day-row {
    align-items: end;
    background: var(--cherrie-white);
    border: 1px solid rgba(15, 42, 36, 0.1);
    border-radius: 8px;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(10rem, 1.3fr) repeat(4, minmax(6.5rem, 1fr));
    padding: 0.8rem;
}

.agenda-day-row.is-disabled {
    background: rgba(108, 117, 125, 0.08);
}

.agenda-day-toggle {
    align-self: center;
}

.agenda-blocks {
    border-top: 1px solid rgba(15, 42, 36, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 1rem;
}

.agenda-block-row {
    align-items: end;
    background: var(--cherrie-white);
    border: 1px solid rgba(15, 42, 36, 0.1);
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    grid-template-areas:
        "data repeat type start end category remove"
        "reason reason reason reason reason reason remove";
    grid-template-columns: minmax(7.4rem, 1fr) minmax(7.8rem, 1fr) minmax(7.3rem, 0.9fr) minmax(5.4rem, 0.7fr) minmax(5.4rem, 0.7fr) minmax(7rem, 0.9fr) auto;
    padding: 0.8rem;
}

.agenda-block-row > div {
    min-width: 0;
}

.agenda-block-row > div:nth-child(1) {
    grid-area: data;
}

.agenda-block-row > div:nth-child(2) {
    grid-area: repeat;
}

.agenda-block-row > div:nth-child(3) {
    grid-area: type;
}

.agenda-block-row > div:nth-child(4) {
    grid-area: start;
}

.agenda-block-row > div:nth-child(5) {
    grid-area: end;
}

.agenda-block-row > div:nth-child(6) {
    grid-area: category;
}

.agenda-block-row > div:nth-child(7) {
    grid-area: reason;
}

.agenda-block-row.is-full-day .js-block-time {
    opacity: 0.55;
}

.agenda-block-remove {
    align-self: start;
    color: #a71d2a;
    grid-area: remove;
    justify-self: center;
    margin-top: 1.8rem;
}

.agenda-block-remove:hover,
.agenda-block-remove:focus {
    background: rgba(220, 53, 69, 0.1);
    color: #842029;
}

.smart-scheduler {
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.12);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}

.smart-scheduler-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.smart-scheduler-header strong {
    color: var(--cherrie-primary);
    display: block;
}

.smart-scheduler-header span {
    color: var(--cherrie-muted);
    font-size: 0.88rem;
}

.smart-scheduler-legend {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    white-space: nowrap;
}

.legend-dot {
    border-radius: 50%;
    display: inline-block;
    height: 0.65rem;
    width: 0.65rem;
}

.legend-available {
    background: #198754;
}

.legend-blocked {
    background: #dc3545;
}

.smart-scheduler-feedback {
    align-items: center;
    border-radius: 8px;
    display: flex;
    gap: 0.55rem;
    font-weight: 700;
    padding: 0.75rem 0.9rem;
    transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.smart-scheduler-feedback.is-muted,
.relationship-filter-feedback.is-muted {
    background: rgba(108, 117, 125, 0.1);
    color: #5c636a;
}

.smart-scheduler-feedback.is-valid,
.relationship-filter-feedback.is-valid {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

.smart-scheduler-feedback.is-invalid,
.relationship-filter-feedback.is-invalid {
    background: rgba(220, 53, 69, 0.1);
    color: #a71d2a;
}

.smart-scheduler-feedback.is-loading,
.relationship-filter-feedback.is-loading {
    background: rgba(200, 169, 106, 0.16);
    color: #765820;
}

.smart-scheduler-feedback.is-loading::before,
.relationship-filter-feedback.is-loading::before {
    animation: cherrie-spin 0.75s linear infinite;
    border: 2px solid rgba(118, 88, 32, 0.22);
    border-top-color: #765820;
    border-radius: 50%;
    content: "";
    flex: 0 0 auto;
    height: 0.9rem;
    width: 0.9rem;
}

.smart-scheduler-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fill, minmax(5.8rem, 1fr));
    transition: opacity 0.16s ease;
}

.schedule-slot {
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    min-height: 2.55rem;
    padding: 0.45rem 0.5rem;
}

.schedule-slot.is-available {
    background: rgba(25, 135, 84, 0.13);
    border-color: rgba(25, 135, 84, 0.25);
    color: #146c43;
}

.schedule-slot.is-available:hover,
.schedule-slot.is-available:focus {
    background: #198754;
    color: var(--cherrie-white);
    outline: 0;
}

.schedule-slot.is-blocked {
    background: rgba(108, 117, 125, 0.12);
    border-color: rgba(108, 117, 125, 0.18);
    color: #6c757d;
    cursor: not-allowed;
}

.schedule-slot.is-danger-blocked {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.22);
    color: #a71d2a;
}

.schedule-slot.is-skeleton {
    animation: cherrie-skeleton 1.05s ease-in-out infinite;
    background: linear-gradient(90deg, rgba(15, 42, 36, 0.06), rgba(200, 169, 106, 0.2), rgba(15, 42, 36, 0.06));
    background-size: 220% 100%;
    border-color: rgba(200, 169, 106, 0.16);
    color: transparent;
    cursor: wait;
}

.smart-scheduler-empty {
    color: var(--cherrie-muted);
    grid-column: 1 / -1;
    padding: 0.75rem;
    text-align: center;
}

.admin-authorization-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 42, 36, 0.25);
}

.authorization-alert {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.14);
    border-radius: 8px;
    color: #842029;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.modal-backdrop.show {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.auth-brand {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-brand h1 {
    color: var(--cherrie-primary);
    font-size: 2rem;
    margin: 0;
}

.auth-brand p {
    color: var(--cherrie-muted);
    margin: 0;
}

.client-auth-wrapper {
    align-items: flex-start;
    padding: 2rem 1rem;
}

.client-auth-card {
    background: var(--cherrie-white);
    border: 1px solid rgba(200, 169, 106, 0.22);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 42, 36, 0.24);
    margin: 0 auto;
    max-width: 780px;
    padding: 2rem;
    width: 100%;
}

.client-auth-tabs {
    background: #f8f5ef;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    padding: 0.28rem;
}

.client-auth-tabs .nav-link {
    border-radius: 999px;
    color: var(--cherrie-primary);
    font-weight: 800;
    width: 100%;
}

.client-auth-tabs .nav-item {
    flex: 1 1 0;
    text-align: center;
}

.client-auth-tabs .nav-link.active {
    background: var(--cherrie-primary);
    color: var(--cherrie-white);
}

.client-card-list,
.notification-list,
.request-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.client-appointment-card,
.notification-item,
.request-item {
    background: #fffdfa;
    border: 1px solid rgba(15, 42, 36, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.client-appointment-card {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.client-appointment-main,
.client-appointment-actions {
    min-width: 0;
}

.client-appointment-main strong,
.notification-item strong,
.request-item strong {
    color: var(--cherrie-primary);
    display: block;
}

.client-appointment-main span,
.client-appointment-main small,
.notification-item span,
.notification-item small,
.request-item span {
    color: var(--cherrie-muted);
    display: block;
}

.client-appointment-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.client-appointment-actions form {
    display: inline-flex;
    margin: 0;
}

.notification-item.is-unread {
    border-color: rgba(200, 169, 106, 0.5);
    box-shadow: inset 4px 0 0 var(--cherrie-secondary);
}

.appointment-confirmation {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.appointment-confirmation h2 {
    color: var(--cherrie-primary);
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0.1rem 0;
}

.appointment-detail-wide {
    grid-column: span 2;
}

.request-action-form {
    min-width: 13rem;
}

.client-scheduler .smart-scheduler-grid {
    grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
}

.relationship-filter-feedback {
    align-items: center;
    border-radius: 8px;
    display: flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0.55rem;
    min-height: 2.65rem;
    padding: 0.72rem 0.9rem;
    transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

@keyframes cherrie-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cherrie-skeleton {
    0% {
        background-position: 120% 0;
    }

    100% {
        background-position: -120% 0;
    }
}

@media (max-width: 991.98px) {
    .user-pill {
        margin: 1rem 0;
    }

    .navbar-cherrie .nav-link {
        border-radius: 8px;
        margin: 0.1rem 0;
    }

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

    .agenda-day-row,
    .agenda-block-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agenda-block-row {
        grid-template-areas:
            "data repeat"
            "type category"
            "start end"
            "reason reason"
            "remove remove";
    }

    .agenda-day-toggle {
        grid-column: 1 / -1;
    }

    .agenda-block-remove {
        justify-self: end;
        margin-top: 0;
    }

    .smart-scheduler-header {
        flex-direction: column;
    }

    .data-table-toolbar {
        grid-template-columns: 1fr;
    }

    .data-table-actions {
        justify-content: space-between;
    }
}

@media (max-width: 767.98px) {
    .app-main {
        padding-top: 1rem;
    }

    .page-heading,
    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading h1 {
        font-size: 1.55rem;
    }

    .content-panel {
        padding: 1rem;
    }

    .appointment-detail {
        grid-template-columns: 1fr;
    }

    .table-actions {
        min-width: 9rem;
    }

    .data-table-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .data-table-filter {
        min-width: 0;
    }

    .data-table-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .data-table-pagination {
        justify-content: flex-start;
    }

    .agenda-config-header,
    .agenda-day-row,
    .agenda-block-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .agenda-block-row {
        grid-template-areas:
            "data"
            "repeat"
            "type"
            "start"
            "end"
            "category"
            "reason"
            "remove";
    }

    .agenda-config-header {
        flex-direction: column;
    }

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

    .client-auth-card {
        padding: 1.2rem;
    }

    .client-appointment-card,
    .appointment-confirmation {
        align-items: stretch;
        flex-direction: column;
    }

    .client-appointment-actions {
        justify-content: flex-start;
    }

    .appointment-detail-wide {
        grid-column: auto;
    }
}
