:root {
    --app-bg: #f3f7fb;
    --app-surface: rgba(255, 255, 255, 0.96);
    --app-surface-strong: #ffffff;
    --app-text: #10213a;
    --app-text-muted: #66768e;
    --app-border: rgba(16, 33, 58, 0.1);
    --app-primary: #165fb3;
    --app-primary-soft: rgba(22, 95, 179, 0.12);
    --app-success: #17925f;
    --app-warning: #ca8b11;
    --app-danger: #d74b57;
    --app-shadow: 0 24px 48px rgba(8, 22, 41, 0.08);
    --app-radius: 28px;
}

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

html,
body {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.app-body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(66, 180, 165, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(83, 154, 238, 0.12), transparent 28%),
        linear-gradient(180deg, #f6f9fc 0%, #eef3f8 100%);
    color: var(--app-text);
    font-family: "Manrope", sans-serif;
    overflow-x: hidden;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.skip-link {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1200;
    padding: 12px 16px;
    border-radius: 14px;
    background: #ffffff;
    color: var(--app-text);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(8, 22, 41, 0.12);
    transform: translateY(-140%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: var(--app-text);
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

.app-sidebar {
    width: 290px;
    flex: 0 0 290px;
    max-width: 100vw;
    min-height: 100vh;
    align-self: stretch;
    padding: 24px 18px;
    background: linear-gradient(180deg, #0e2f52 0%, #153f6c 55%, #195267 100%);
    color: #fff;
    box-shadow: 22px 0 48px rgba(8, 22, 41, 0.12);
}

.app-sidebar__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
}

.app-sidebar__nav {
    display: block;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
    padding: 14px 16px;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
    flex: 1;
}

.app-brand:hover {
    color: inherit;
    text-decoration: none;
}

.app-brand__mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #2cb2a1 0%, #79d5b4 100%);
    color: #0c2846;
    font-family: "Sora", sans-serif;
    font-weight: 800;
}

.app-brand strong,
.app-brand small {
    display: block;
}

.app-brand small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
}

.app-sidebar__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-section + .nav-section {
    margin-top: 18px;
}

.nav-section__title {
    margin: 0 0 10px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-link-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    padding: 13px 14px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link-panel:hover,
.nav-link-panel.is-active,
.nav-link-panel[aria-current="page"] {
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.nav-link-panel:focus-visible,
.app-topbar__toggle:focus-visible,
.app-user-menu:focus-visible,
.dropdown-item:focus-visible,
.btn:focus-visible,
.auth-submit:focus-visible,
.form-control:focus-visible,
.custom-select:focus-visible {
    outline: 2px solid transparent;
    border-color: rgba(121, 225, 207, 0.78);
    box-shadow: 0 0 0 4px rgba(121, 225, 207, 0.18);
}

.nav-link-panel i {
    width: 18px;
    text-align: center;
    flex: 0 0 18px;
}

.app-sidebar__logout-form {
    margin: 0;
}

.app-sidebar__logout-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.nav-link-panel--brand {
    color: #0c2846;
    background: linear-gradient(135deg, #2cb2a1 0%, #79d5b4 100%);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 20px rgba(44, 178, 161, 0.16);
    font-weight: 800;
}

.nav-link-panel--brand:hover,
.nav-link-panel--brand.is-active,
.nav-link-panel--brand[aria-current="page"] {
    color: #0c2846;
    background: linear-gradient(135deg, #32bda9 0%, #8be0c3 100%);
}

.nav-link-panel--accent {
    background: linear-gradient(180deg, rgba(255, 169, 77, 0.2) 0%, rgba(236, 112, 35, 0.14) 100%);
    border-color: rgba(255, 204, 153, 0.28);
    color: #fff4e6;
    box-shadow: 0 10px 20px rgba(236, 112, 35, 0.1);
    font-weight: 700;
}

.nav-link-panel--accent:hover,
.nav-link-panel--accent.is-active,
.nav-link-panel--accent[aria-current="page"] {
    color: #ffffff;
}

.nav-link-panel--text-left {
    justify-content: flex-start;
}

.nav-link-panel--section {
    background: linear-gradient(180deg, rgba(119, 221, 168, 0.18) 0%, rgba(40, 167, 107, 0.1) 100%);
    border-color: rgba(186, 255, 216, 0.16);
    color: #effff5;
    box-shadow: 0 8px 16px rgba(40, 167, 107, 0.05);
    font-weight: 700;
}

.nav-link-panel--soft-yellow {
    background: linear-gradient(180deg, rgba(255, 214, 102, 0.26) 0%, rgba(245, 184, 66, 0.16) 100%);
    border-color: rgba(255, 228, 148, 0.3);
    color: #fff7d6;
    box-shadow: 0 10px 20px rgba(245, 184, 66, 0.08);
    font-weight: 700;
}

.nav-link-panel--soft-yellow:hover,
.nav-link-panel--soft-yellow.is-active,
.nav-link-panel--soft-yellow[aria-current="page"] {
    background: linear-gradient(180deg, rgba(255, 220, 122, 0.34) 0%, rgba(247, 190, 74, 0.22) 100%);
    border-color: rgba(255, 233, 160, 0.42);
    color: #fff9e3;
    box-shadow: 0 12px 24px rgba(245, 184, 66, 0.12);
}

.nav-link-panel--soft-purple {
    background: linear-gradient(180deg, rgba(169, 126, 255, 0.24) 0%, rgba(122, 86, 214, 0.16) 100%);
    border-color: rgba(208, 188, 255, 0.24);
    color: #f3ebff;
    box-shadow: 0 10px 20px rgba(122, 86, 214, 0.1);
    font-weight: 700;
}

.nav-link-panel--soft-purple:hover,
.nav-link-panel--soft-purple.is-active,
.nav-link-panel--soft-purple[aria-current="page"] {
    background: linear-gradient(180deg, rgba(182, 144, 255, 0.32) 0%, rgba(133, 97, 224, 0.22) 100%);
    border-color: rgba(220, 203, 255, 0.4);
    color: #fbf7ff;
    box-shadow: 0 12px 24px rgba(122, 86, 214, 0.14);
}

.nav-link-panel--danger {
    background: linear-gradient(180deg, rgba(215, 75, 87, 0.26) 0%, rgba(191, 46, 72, 0.18) 100%);
    border-color: rgba(255, 196, 202, 0.24);
    color: #fff1f3;
    font-weight: 700;
}

.nav-link-panel > span,
.nav-link-panel__leading > span {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.nav-link-panel__meta {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.nav-group + .nav-group {
    margin-top: 10px;
}

.nav-group__title {
    margin: 0;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 800;
}

.nav-group--active .nav-group__title {
    color: #ffffff;
}

.nav-group--accordion {
    margin-top: 10px;
}

.nav-accordion {
    display: block;
}

.nav-accordion > summary {
    list-style: none;
}

.nav-accordion > summary::-webkit-details-marker {
    display: none;
}

.nav-link-panel--toggle {
    width: 100%;
    border: 0;
    background: transparent;
    justify-content: space-between;
    cursor: pointer;
}

.nav-link-panel--toggle.nav-link-panel--soft-yellow {
    background: linear-gradient(180deg, rgba(255, 214, 102, 0.26) 0%, rgba(245, 184, 66, 0.16) 100%);
    border-color: rgba(255, 228, 148, 0.3);
    color: #fff7d6;
    box-shadow: 0 10px 20px rgba(245, 184, 66, 0.08);
}

.nav-link-panel--toggle.nav-link-panel--soft-yellow:hover,
.nav-link-panel--toggle.nav-link-panel--soft-yellow.is-active,
.nav-link-panel--toggle.nav-link-panel--soft-yellow[aria-current="page"] {
    background: linear-gradient(180deg, rgba(255, 220, 122, 0.34) 0%, rgba(247, 190, 74, 0.22) 100%);
    border-color: rgba(255, 233, 160, 0.42);
    color: #fff9e3;
    box-shadow: 0 12px 24px rgba(245, 184, 66, 0.12);
}

.nav-link-panel--toggle.nav-link-panel--soft-purple {
    background: linear-gradient(180deg, rgba(169, 126, 255, 0.24) 0%, rgba(122, 86, 214, 0.16) 100%);
    border-color: rgba(208, 188, 255, 0.24);
    color: #f3ebff;
    box-shadow: 0 10px 20px rgba(122, 86, 214, 0.1);
}

.nav-link-panel--toggle.nav-link-panel--soft-purple:hover,
.nav-link-panel--toggle.nav-link-panel--soft-purple.is-active,
.nav-link-panel--toggle.nav-link-panel--soft-purple[aria-current="page"] {
    background: linear-gradient(180deg, rgba(182, 144, 255, 0.32) 0%, rgba(133, 97, 224, 0.22) 100%);
    border-color: rgba(220, 203, 255, 0.4);
    color: #fbf7ff;
    box-shadow: 0 12px 24px rgba(122, 86, 214, 0.14);
}

.nav-link-panel__leading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-accordion__chevron {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-accordion[open] > .nav-link-panel--toggle .nav-accordion__chevron {
    transform: rotate(180deg);
    color: #ffffff;
}

.nav-accordion > .nav-submenu {
    display: none;
}

.nav-accordion[open] > .nav-submenu {
    display: grid;
}

.nav-submenu {
    display: grid;
    gap: 6px;
    margin: 8px 0 4px 18px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.nav-submenu--static {
    margin-top: 8px;
}

.nav-link-panel--sub {
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.nav-link-panel--sub i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav-link-panel--sub > span:not(.nav-link-panel__badge):not(.nav-link-panel__meta) {
    flex: 1;
    text-align: left;
}

.nav-link-panel--sub .nav-link-panel__badge,
.nav-link-panel--sub .nav-link-panel__meta {
    margin-left: auto;
}

.nav-link-panel--sub.nav-link-panel--danger {
    color: #fff4f5;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(215, 75, 87, 0.92), rgba(191, 46, 72, 0.88));
    border: 1px solid rgba(255, 181, 189, 0.34);
    box-shadow: 0 10px 22px rgba(215, 75, 87, 0.22);
}

.nav-link-panel--sub.nav-link-panel--danger:hover,
.nav-link-panel--sub.nav-link-panel--danger.is-active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(225, 84, 96, 0.98), rgba(203, 52, 79, 0.94));
    border-color: rgba(255, 205, 210, 0.46);
    box-shadow: 0 14px 26px rgba(215, 75, 87, 0.28);
}

.nav-link-panel__badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(246, 200, 106, 0.22);
    color: #fff5d8;
    font-size: 11px;
    font-weight: 800;
}

.app-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.page-hero > div,
.panel-card__header > div,
.appointments-card__meta,
.app-user-menu__content {
    min-width: 0;
}

.page-title,
.page-subtitle,
.panel-card__title,
.panel-card__subtitle {
    overflow-wrap: anywhere;
}

.app-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    min-width: 0;
    padding: 22px 28px 0;
}

.app-topbar__toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--app-text);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 20px rgba(8, 22, 41, 0.06);
}

.app-topbar__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-topbar__date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--app-text-muted);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(8, 22, 41, 0.05);
}

.app-user-menu {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: min(100%, 340px);
    padding: 8px 10px 8px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(8, 22, 41, 0.08);
}

.app-topbar > .dropdown {
    min-width: 0;
    max-width: 100%;
}

.dropdown-item-form {
    margin: 0;
}

.dropdown-item-form .dropdown-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.app-user-menu__avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #103863 0%, #1f75bb 100%);
    color: #fff;
    font-weight: 800;
}

.app-user-menu__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.app-user-menu__content strong {
    font-size: 14px;
}

.app-user-menu__content small {
    color: var(--app-text-muted);
    font-size: 12px;
}

.app-user-menu__content strong,
.app-user-menu__content small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-content {
    padding: 24px 28px 28px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px;
    margin-bottom: 20px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(245, 201, 116, 0.2), transparent 26%),
        radial-gradient(circle at left center, rgba(92, 173, 255, 0.2), transparent 28%),
        linear-gradient(135deg, #10365c 0%, #185286 58%, #1f717a 100%);
    box-shadow: 0 28px 54px rgba(8, 22, 41, 0.12);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
}

.page-eyebrow,
.page-title,
.page-subtitle {
    position: relative;
    z-index: 1;
}

.page-eyebrow {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    color: #ffffff;
    font-family: "Sora", sans-serif;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.08;
}

.page-subtitle {
    margin: 10px 0 0;
    max-width: 780px;
    color: rgba(255, 255, 255, 0.78);
}

.page-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 800;
    box-shadow: none;
}

.btn-sm {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 13px;
    font-size: 13px;
}

.btn-primary {
    border-color: #175dad;
    background: linear-gradient(180deg, #1e6cc5 0%, #1659a5 100%);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    background: rgba(255, 255, 255, 0.92);
}

.btn-link {
    text-decoration: none;
}

.container-fluid {
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.app-content .row {
    margin-left: -12px;
    margin-right: -12px;
}

.app-content .row > [class^="col-"],
.app-content .row > [class*=" col-"] {
    padding-left: 12px;
    padding-right: 12px;
}

.dropdown-menu {
    max-width: calc(100vw - 32px);
}

.app-alert {
    margin-bottom: 18px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(8, 22, 41, 0.06);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.metric-card,
.panel-card,
.table-shell {
    border-radius: 28px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(14px);
}

.metric-card {
    display: flex;
    gap: 16px;
    padding: 22px;
}

.metric-card__icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 22px;
}

.metric-card__label,
.metric-card__meta {
    margin: 0;
}

.metric-card__label {
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card__value {
    margin-top: 8px;
    font-size: 28px;
    font-weight: 900;
}

.metric-card__meta {
    margin-top: 6px;
    color: var(--app-text-muted);
    font-size: 13px;
}

.panel-card + .panel-card {
    margin-top: 20px;
}

.panel-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--app-border);
}

.panel-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.panel-card__subtitle {
    margin: 6px 0 0;
    color: var(--app-text-muted);
}

.panel-card__body {
    padding: 22px 24px 24px;
}

.panel-toolbar,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.form-grid--stacked {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
}

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

.form-group label {
    display: inline-block;
    margin-bottom: 10px;
    color: #5b6c82;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-control,
.custom-select,
.form-control-file {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(16, 33, 58, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--app-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

textarea.form-control {
    min-height: 128px;
    padding: 14px 16px;
}

select[multiple].form-control {
    min-height: 164px;
    padding: 12px 14px;
}

.form-control:focus,
.custom-select:focus {
    border-color: rgba(15, 76, 129, 0.32);
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.12), 0 16px 34px rgba(8, 22, 41, 0.08);
    outline: 2px solid transparent;
}

.panel-form--stacked {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel-form--stacked .form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.panel-form--stacked .form-group,
.panel-form--stacked .form-group--full {
    margin-bottom: 0;
    padding: 20px 22px;
    border: 1px solid rgba(16, 33, 58, 0.08);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 252, 0.96) 100%);
    box-shadow: 0 16px 30px rgba(8, 22, 41, 0.05);
}

.panel-form--stacked .form-group--full {
    grid-column: auto;
}

.table-shell {
    overflow: auto;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--app-border);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.table-modern {
    width: 100%;
    min-width: 640px;
    margin: 0;
}

.table-modern thead th {
    border-top: 0;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(245, 248, 251, 0.98);
}

.table-modern tbody td {
    vertical-align: middle;
    border-top-color: var(--app-border);
    word-break: break-word;
}

.table-modern tbody tr:hover {
    background: rgba(15, 110, 253, 0.03);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill--primary {
    background: var(--app-primary-soft);
    color: var(--app-primary);
}

.status-pill--success {
    background: rgba(19, 156, 98, 0.18);
    color: #0f6241;
}

.status-pill--warning {
    background: rgba(212, 138, 7, 0.2);
    color: #714700;
}

.status-pill--danger {
    background: rgba(215, 68, 82, 0.18);
    color: #8f2836;
}

.password-field {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.password-field .form-control {
    min-width: 0;
    flex: 1;
}

.password-field__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(16, 33, 58, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #103863;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.upload-picker {
    position: relative;
}

.upload-picker__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-picker__surface {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 94px;
    padding: 18px 20px;
    border: 1px dashed rgba(15, 76, 129, 0.22);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.16), transparent 24%),
        radial-gradient(circle at 18% 14%, rgba(122, 226, 207, 0.18), transparent 32%),
        linear-gradient(180deg, #fbfdff 0%, #eef4fa 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.upload-picker:hover .upload-picker__surface,
.upload-picker__input:focus + .upload-picker__surface,
.upload-picker__input:active + .upload-picker__surface,
.upload-picker--dragging .upload-picker__surface {
    border-color: rgba(15, 76, 129, 0.36);
    box-shadow: 0 22px 42px rgba(8, 22, 41, 0.1);
    transform: translateY(-1px);
}

.upload-picker__icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #0e385f 0%, #1663a5 52%, #28aa9d 100%);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 18px 32px rgba(8, 22, 41, 0.16);
}

.upload-picker__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-picker__text {
    color: #52627d;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.upload-picker__button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
    border: 1px solid rgba(16, 33, 58, 0.08);
    color: #123765;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(8, 22, 41, 0.08);
}

.upload-picker__footer {
    margin-top: 10px;
}

.appointment-code--masked {
    letter-spacing: 0.18em;
}

.upload-picker--selected .upload-picker__surface {
    border-style: solid;
    border-color: rgba(60, 184, 169, 0.34);
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.12), transparent 24%),
        radial-gradient(circle at 18% 14%, rgba(122, 226, 207, 0.2), transparent 32%),
        linear-gradient(180deg, #f8fffd 0%, #edf8f5 100%);
}

.app-empty {
    padding: 30px;
    border: 1px dashed rgba(16, 33, 58, 0.12);
    border-radius: 22px;
    background: linear-gradient(180deg, #f7f9fc 0%, #eff4f8 100%);
    color: var(--app-text-muted);
    text-align: center;
}

.info-strip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 76, 129, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(235, 242, 250, 0.9), rgba(242, 246, 251, 0.92));
}

.info-strip span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.info-strip i {
    margin-top: 2px;
    color: var(--app-primary);
}

.info-strip--success {
    border-color: rgba(23, 146, 95, 0.2);
    background: linear-gradient(180deg, rgba(232, 248, 241, 0.96), rgba(241, 251, 246, 0.96));
}

.info-strip--success i {
    color: var(--app-success);
}

.info-strip--warning {
    border-color: rgba(202, 139, 17, 0.22);
    background: linear-gradient(180deg, rgba(255, 247, 228, 0.96), rgba(255, 251, 240, 0.96));
}

.info-strip--warning i {
    color: var(--app-warning);
}

.text-code-inline {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 33, 58, 0.08);
    color: var(--app-text);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

.crm-api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.crm-config-list {
    display: grid;
    gap: 12px;
}

.text-admin-only {
    color: var(--app-text-muted);
    font-size: 13px;
}

.appointments-page .page-hero {
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.16), transparent 22%),
        radial-gradient(circle at left center, rgba(72, 163, 255, 0.16), transparent 28%),
        linear-gradient(135deg, #0f3358 0%, #174b7e 58%, #1d7a88 100%);
}

.appointments-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.appointments-stat {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
    border: 1px solid rgba(16, 33, 58, 0.08);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.12), transparent 25%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 252, 0.96) 100%);
    box-shadow: 0 18px 36px rgba(8, 22, 41, 0.06);
}

.appointments-stat::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 170, 157, 0.16), transparent 68%);
}

.appointments-stat__label,
.appointments-stat__meta {
    display: block;
}

.appointments-stat__label {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.appointments-stat__value {
    display: block;
    color: #10213a;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 900;
    line-height: 1.1;
}

.appointments-stat__meta {
    margin-top: 8px;
    color: #5d6f87;
    font-size: 13px;
}

.appointments-card {
    border: 1px solid rgba(16, 33, 58, 0.06);
}

.appointments-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.appointments-filter-form__hint {
    margin: 0 0 18px;
    color: #61738b;
    font-size: 13px;
    font-weight: 600;
}

.appointments-filter-form .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.appointments-filter-form--legacy .filter-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 300px) minmax(220px, 300px);
}

.appointments-filter-form .form-group {
    padding: 18px 18px 16px;
    border: 1px solid rgba(16, 33, 58, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 252, 0.95));
}

.appointments-card__meta {
    display: flex;
    align-items: center;
}

.appointments-badge,
.appointments-inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(20, 84, 147, 0.08);
    color: #164b7e;
    font-size: 12px;
    font-weight: 800;
}

.appointments-inline-badge--muted {
    background: rgba(16, 33, 58, 0.06);
    color: #4c5d73;
}

.appointments-table-shell {
    border: 1px solid rgba(16, 33, 58, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
    overflow-x: auto;
    overflow-y: hidden;
}

.notes-page .notes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notes-page .note-entry {
    position: relative;
    width: calc(100% - 54px);
    max-width: 760px;
    padding: 18px 20px 18px;
    border: 1px solid var(--note-border, rgba(16, 33, 58, 0.12)) !important;
    border-radius: 26px;
    background: linear-gradient(180deg, var(--note-bg, #f5fbff), var(--note-bg-soft, #edf7ff)) !important;
    box-shadow: 0 18px 30px var(--note-shadow, rgba(8, 22, 41, 0.1));
}

.notes-page .note-entry--left {
    margin-right: auto;
    border-bottom-left-radius: 10px;
}

.notes-page .note-entry--right {
    margin-left: auto;
    border-bottom-right-radius: 10px;
}

.notes-page .note-entry__tail {
    position: absolute;
    bottom: -10px;
    width: 20px;
    height: 20px;
    background: var(--note-bg-soft, #edf7ff);
    border-bottom: 1px solid var(--note-border, rgba(16, 33, 58, 0.12));
    transform: rotate(45deg);
}

.notes-page .note-entry--left .note-entry__tail {
    left: 18px;
    border-left: 1px solid var(--note-border, rgba(16, 33, 58, 0.12));
}

.notes-page .note-entry--right .note-entry__tail {
    right: 18px;
    border-right: 1px solid var(--note-border, rgba(16, 33, 58, 0.12));
}

.notes-page .note-entry--mint {
    --note-bg: #dcf8c6;
    --note-bg-soft: #f3ffe8;
    --note-border: rgba(83, 153, 72, 0.28);
    --note-shadow: rgba(83, 153, 72, 0.18);
}

.notes-page .note-entry--sky {
    --note-bg: #dff2ff;
    --note-bg-soft: #eef8ff;
    --note-border: rgba(69, 137, 214, 0.28);
    --note-shadow: rgba(69, 137, 214, 0.18);
}

.notes-page .note-entry--sun {
    --note-bg: #fff1b8;
    --note-bg-soft: #fff8dd;
    --note-border: rgba(198, 155, 36, 0.3);
    --note-shadow: rgba(198, 155, 36, 0.16);
}

.notes-page .note-entry--rose {
    --note-bg: #ffd9d6;
    --note-bg-soft: #fff0ee;
    --note-border: rgba(210, 96, 105, 0.3);
    --note-shadow: rgba(210, 96, 105, 0.16);
}

.notes-page .note-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.notes-page .note-entry__content {
    margin-top: 14px;
    color: var(--app-text);
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.notes-page .note-entry__actions {
    margin-top: 16px;
}

.notes-page .note-entry .appointments-inline-badge--muted {
    background: rgba(255, 255, 255, 0.62);
    color: #3d536e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.notes-page .note-entry .btn-outline-primary,
.notes-page .note-entry .btn-outline-danger,
.notes-page .note-entry .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.7);
}

.appointments-page .appointments-table {
    width: max-content;
    min-width: 100%;
}

.appointments-page .appointments-table--legacy {
    table-layout: auto;
    width: max-content !important;
    min-width: 100% !important;
}

.appointments-page .appointments-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.appointments-page .appointments-table thead th,
.appointments-page .appointments-table tbody td {
    padding: 14px 16px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.appointments-page .appointments-table thead th,
.appointments-page .appointments-table--legacy thead th {
    white-space: nowrap;
}

.appointments-page .appointments-table tbody td,
.appointments-page .appointments-table--legacy tbody td {
    white-space: normal;
}

.appointments-page .table-modern tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.appointments-page .table-modern tbody tr:nth-child(even) {
    background: rgba(247, 250, 252, 0.42);
}

.appointments-page .table-modern tbody tr:hover {
    background: rgba(16, 33, 58, 0.04);
}

.appointment-text,
.appointment-code,
.appointment-pill,
.appointment-doc-link {
    display: inline;
    max-width: 100%;
    white-space: normal;
    line-height: 1.5;
}

.appointment-text {
    padding: 0;
    background: none;
    color: #10213a;
    font-size: 14px;
    font-weight: 400;
}

.appointment-text--strong {
    background: none;
    color: #10213a;
    font-weight: 400;
}

.appointment-code {
    padding: 0;
    border: 0;
    background: none;
    color: #334861;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
}

.appointment-contact-link {
    color: #164b7e;
    font-weight: 400;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.appointment-contact-link:hover {
    color: #123765;
    text-decoration: underline;
}

.appointment-muted {
    color: #7b8ba0;
    font-weight: 400;
}

.appointment-pill {
    padding: 0;
    background: none;
    font-size: 14px;
    font-weight: 400;
}

.appointment-pill--muted {
    color: #5a6b80;
}

.appointment-pill--country {
    color: #1f5e58;
}

.appointment-pill--purpose {
    color: #7b5a19;
}

.appointment-doc-link {
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: #164b7e;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    box-shadow: none;
    transition: color 0.2s ease;
}

.appointment-doc-link:hover {
    transform: none;
    box-shadow: none;
    color: #123765;
    text-decoration: underline;
}

.appointment-doc-link--empty {
    gap: 8px;
    color: #7a899d;
    background: none;
    box-shadow: none;
}

.appointments-page .table-modern tbody td .appointments-inline-badge,
.appointments-page .table-modern tbody td .status-pill {
    display: inline;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.appointments-page .table-modern tbody td .appointments-inline-badge i {
    display: none;
}

.appointments-page .table-modern tbody td .appointments-inline-badge--muted {
    color: #5a6b80;
}

.appointments-page .table-modern tbody td .status-pill--primary {
    color: #1b5c93;
}

.appointments-page .table-modern tbody td .status-pill--success {
    color: #0f6241;
}

.appointments-page .table-modern tbody td .status-pill--warning {
    color: #714700;
}

.appointments-page .table-modern tbody td .status-pill--danger {
    color: #8f2836;
}

.appointment-person {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.appointment-person__name {
    color: #10213a;
    font-size: 14px;
    font-weight: 800;
}

.appointment-person__meta {
    color: #6b7c92;
    font-size: 12px;
    font-weight: 600;
}

.appointments-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.appointments-actions form {
    margin: 0;
}

.appointment-form-page .panel-card {
    width: 100%;
    max-width: none;
}

.appointment-form-page .appointment-entry-form--split {
    width: 100%;
    max-width: 100%;
}

.appointment-form-page .appointment-form-split {
    position: relative;
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.appointment-form-page .appointment-form-split::before,
.appointment-form-page .appointment-form-split::after {
    display: none;
}

.appointment-form-page .appointment-form-split > .form-grid {
    position: relative;
    z-index: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.appointment-form-page .appointment-entry-form--split .form-actions {
    justify-content: flex-end;
}

.appointment-form-page .panel-form--stacked {
    width: 100%;
    max-width: 100%;
}

.appointment-form-page .panel-form--stacked .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.appointment-form-page .panel-form--stacked .form-group--full {
    grid-column: 1 / -1;
}

.appointment-form-page .panel-form--stacked .form-group,
.appointment-form-page .panel-form--stacked .form-group--full {
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: none;
}

.appointment-form-page .form-control,
.appointment-form-page .custom-select,
.appointment-form-page .form-control-file {
    min-height: 46px;
    border-radius: 10px;
}

.appointment-form-page .panel-card__body > .panel-form--stacked {
    margin-inline: 0;
}

body.app-body:not(.app-body--mobile-sidebar) .app-topbar__toggle,
body.app-body:not(.app-body--mobile-sidebar) .app-sidebar__close {
    display: none !important;
}

@media (max-width: 767.98px) {
    body.app-body.app-body--mobile-sidebar.sidebar-open {
        overflow: hidden;
    }

    body.app-body.app-body--mobile-sidebar .app-shell {
        display: block;
    }

    body.app-body.app-body--mobile-sidebar .app-sidebar {
        position: fixed;
        top: 16px;
        left: 16px;
        bottom: 16px;
        width: min(290px, calc(100vw - 32px));
        min-height: auto;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 1040;
        transform: translateX(-120%);
        transition: transform 0.25s ease;
        border-radius: 28px;
    }

    body.app-body.app-body--mobile-sidebar .app-sidebar__close {
        display: inline-flex;
    }

    body.app-body.app-body--mobile-sidebar.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.app-body.app-body--mobile-sidebar.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(8, 22, 41, 0.35);
        z-index: 1030;
    }

    body.app-body.app-body--mobile-sidebar .app-topbar__toggle {
        display: inline-flex;
    }

    body.app-body.app-body--mobile-sidebar.sidebar-open .app-topbar__toggle {
        opacity: 0;
        pointer-events: none;
    }

    body.app-body.app-body--mobile-sidebar .app-topbar {
        padding-right: 18px;
    }

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

    .page-actions {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .app-topbar {
        flex-wrap: wrap;
    }

    .app-topbar > .dropdown {
        width: 100%;
    }

    .app-topbar__meta {
        order: 2;
        width: 100%;
        justify-content: flex-start;
    }

    .app-user-menu {
        width: 100%;
        max-width: none;
        justify-content: space-between;
    }

    .page-hero {
        padding: 24px 22px;
        border-radius: 28px;
        align-items: flex-start;
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 220px;
    }

    .appointments-card__meta {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-grid,
    .form-grid,
    .metric-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .appointments-filter-form .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .appointments-filter-form--legacy .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .table-modern {
        min-width: 600px;
    }

    .appointments-page .table-modern {
        min-width: 760px;
    }

    .appointment-form-page .panel-form--stacked {
        max-width: 100%;
    }

    .appointment-form-page .appointment-form-split {
        padding: 0;
        background: transparent;
    }

    .appointment-form-page .appointment-form-split::before,
    .appointment-form-page .appointment-form-split::after {
        display: none;
    }

    .appointment-form-page .appointment-form-split > .form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .appointment-form-page .panel-form--stacked .form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .app-content .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .app-content .row > [class^="col-"],
    .app-content .row > [class*=" col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-topbar {
        padding: 18px 18px 0;
    }

    .app-content {
        padding: 18px;
    }

    .panel-card,
    .table-shell,
    .metric-card {
        border-radius: 24px;
    }

    .panel-card__header,
    .panel-card__body {
        padding-left: 18px;
        padding-right: 18px;
    }

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

    .metric-card {
        padding: 18px;
    }

    .metric-card__value {
        font-size: 24px;
    }

    .page-title {
        font-size: clamp(26px, 7vw, 34px);
    }

    .page-subtitle {
        font-size: 14px;
    }

    .filter-grid,
    .form-grid,
    .metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-actions,
    .panel-toolbar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn,
    .panel-toolbar .btn {
        width: 100%;
        justify-content: center;
    }

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

    .upload-picker__button {
        margin-left: 0;
    }

    .table-modern {
        min-width: 520px;
    }

    .appointments-page .table-modern {
        min-width: 680px;
    }

    .appointments-actions {
        flex-wrap: wrap;
        min-width: 0;
        width: 100%;
    }

    .password-field {
        flex-direction: column;
    }

    .appointment-form-page .panel-form--stacked {
        max-width: 100%;
    }

    .appointment-form-page .panel-form--stacked .form-grid,
    .appointment-form-page .appointment-form-split > .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .appointments-badge,
    .appointments-inline-badge,
    .status-pill,
    .nav-link-panel__badge {
        white-space: nowrap;
    }

    .appointments-filter-form .form-group {
        padding: 16px;
    }

    .auth-shell {
        padding: 16px;
    }

    .auth-card {
        border-radius: 28px;
    }

    .auth-hero,
    .auth-panel {
        padding: 28px 22px;
    }

    .auth-field__control {
        min-height: 58px;
        padding: 0 14px;
    }
}

@media (max-width: 575.98px) {
    .app-content .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .app-content .row > [class^="col-"],
    .app-content .row > [class*=" col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }

    .app-topbar {
        padding: 16px 16px 0;
    }

    .app-content {
        padding: 16px;
    }

    .page-hero {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .page-actions .btn,
    .form-actions .btn {
        width: 100%;
    }

    .app-topbar__date {
        width: 100%;
        justify-content: center;
    }

    .app-user-menu {
        width: 100%;
        justify-content: center;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-menu,
    .dropdown-menu-right {
        width: 100%;
        max-width: 100%;
        right: 0;
        left: 0;
        transform: none;
    }

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

    .metric-card__icon {
        width: 48px;
        height: 48px;
    }

    .table-modern {
        min-width: 560px;
    }

    .appointments-page .table-modern {
        min-width: 720px;
    }

    .appointment-form-page .panel-form--stacked .form-grid,
    .appointment-form-page .appointment-form-split > .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel-form--stacked .form-group,
    .panel-form--stacked .form-group--full {
        padding: 18px 16px;
    }

    .appointment-form-page .panel-form--stacked .form-group,
    .appointment-form-page .panel-form--stacked .form-group--full {
        padding: 14px;
    }
}

@media (max-width: 575.98px) {
    .app-sidebar {
        top: 12px;
        left: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }
}

.auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(81, 183, 165, 0.22), transparent 24%),
        radial-gradient(circle at right center, rgba(89, 143, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #081a30 0%, #0d2948 46%, #0f3b5f 100%);
    font-family: "Manrope", sans-serif;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-card {
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px);
    border-radius: 36px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 34px 90px rgba(2, 10, 21, 0.38);
    backdrop-filter: blur(14px);
}

.auth-hero,
.auth-panel {
    position: relative;
}

.auth-hero {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.18), transparent 24%),
        radial-gradient(circle at left center, rgba(122, 226, 207, 0.16), transparent 26%),
        linear-gradient(160deg, rgba(10, 34, 61, 0.96) 0%, rgba(15, 56, 95, 0.94) 58%, rgba(23, 100, 119, 0.9) 100%);
}

.auth-hero__glow,
.auth-hero__grid {
    position: absolute;
    pointer-events: none;
}

.auth-hero__glow {
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.65;
}

.auth-hero__glow--one {
    top: 34px;
    right: 42px;
    width: 180px;
    height: 180px;
    background: rgba(246, 200, 106, 0.22);
}

.auth-hero__glow--two {
    left: -26px;
    bottom: 72px;
    width: 170px;
    height: 170px;
    background: rgba(122, 226, 207, 0.16);
}

.auth-hero__grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.44), transparent 90%);
}

.auth-brandstage,
.auth-hero__content {
    position: relative;
    z-index: 1;
}

.auth-brandstage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
    text-align: center;
}

.auth-brandstage__mark {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.auth-brandstage__svg {
    width: 66px;
    height: auto;
}

.auth-brandstage__wordmark {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-brandstage__title {
    font-family: "Sora", sans-serif;
    font-size: clamp(34px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.auth-brandstage__eyebrow {
    display: inline-flex;
    width: fit-content;
    min-height: auto;
    align-items: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 36px;
    background:
        radial-gradient(circle at top right, rgba(245, 201, 116, 0.12), transparent 20%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 252, 0.98) 100%);
}

.auth-panel__intro {
    margin-bottom: 24px;
}

.auth-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(22, 95, 179, 0.08);
    color: #18518c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-panel h1,
.auth-panel h2 {
    margin: 18px 0 0;
    color: #10213a;
    font-family: "Sora", sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-panel p {
    margin: 12px 0 0;
    color: #607087;
    line-height: 1.7;
}

.auth-alert {
    margin-bottom: 16px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(8, 22, 41, 0.06);
}

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

.auth-field label {
    display: block;
    margin-bottom: 8px;
    color: #5b6c82;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-field__control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 0 18px;
    border: 1px solid rgba(16, 33, 58, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-field__control:focus-within {
    border-color: rgba(15, 76, 129, 0.3);
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.1), 0 16px 34px rgba(8, 22, 41, 0.08);
    transform: translateY(-1px);
}

.auth-field__control.is-invalid {
    border-color: rgba(215, 75, 87, 0.5);
    box-shadow: 0 0 0 4px rgba(215, 75, 87, 0.12);
}

.auth-field__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(22, 95, 179, 0.08);
    color: #175ea9;
}

.auth-field .form-control {
    min-height: 60px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.auth-field .form-control:focus {
    box-shadow: none;
}

.auth-form__footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.auth-form__hint,
.auth-note,
.auth-panel__footer {
    display: flex;
    align-items: center;
}

.crm-stack {
    display: grid;
    gap: 16px;
}

.crm-text-block,
.crm-template__body,
.crm-message__body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
}

.crm-template {
    padding: 18px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.crm-template__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.crm-template__body {
    color: var(--app-text-muted);
    font-size: 14px;
}

.crm-timeline {
    display: grid;
    gap: 14px;
}

.crm-message {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--app-border);
    background: #ffffff;
}

.crm-message--incoming {
    border-color: rgba(19, 156, 98, 0.22);
    background: rgba(19, 156, 98, 0.06);
}

.crm-message--outgoing {
    border-color: rgba(15, 110, 253, 0.24);
    background: rgba(15, 110, 253, 0.05);
}

.crm-message--note {
    border-color: rgba(212, 138, 7, 0.24);
    background: rgba(212, 138, 7, 0.06);
}

.crm-message__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--app-text-muted);
    font-size: 13px;
    font-weight: 700;
}

.crm-message__error {
    margin-top: 12px;
    color: var(--app-danger);
    font-size: 13px;
    font-weight: 700;
    white-space: pre-wrap;
}

.info-strip--soft {
    background: #f7f9fe;
    color: var(--app-text);
}

.auth-form__hint {
    gap: 10px;
    color: #61748e;
    font-size: 13px;
    font-weight: 700;
}

.auth-submit {
    min-height: 56px;
    width: 100%;
    border-radius: 18px;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.auth-note {
    justify-content: center;
    margin-top: 18px;
    color: #74859a;
    font-size: 13px;
}

.auth-panel__footer {
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(16, 33, 58, 0.08);
    color: #7a8aa0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .auth-shell {
        padding: 20px;
    }

    .auth-hero {
        min-height: 280px;
    }
}

@media (max-width: 767.98px) {
    .auth-shell {
        min-height: auto;
        align-content: start;
        padding: 14px;
    }

    .auth-card {
        border-radius: 24px;
    }

    .auth-hero,
    .auth-panel {
        padding: 24px 18px;
    }

    .auth-hero {
        min-height: 180px;
    }

    .auth-brandstage__mark {
        width: 72px;
        height: 72px;
        border-radius: 20px;
    }

    .auth-brandstage__svg {
        width: 54px;
    }

    .auth-panel__intro {
        margin-bottom: 20px;
    }

    .auth-panel p {
        font-size: 14px;
        line-height: 1.6;
    }

    .auth-brandstage {
        align-items: center;
    }

    .auth-field__control {
        min-height: 56px;
        padding: 0 14px;
        border-radius: 18px;
    }

    .auth-field__icon {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .auth-field .form-control {
        min-height: 54px;
        font-size: 16px;
    }

    .auth-submit {
        min-height: 52px;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        padding: 12px;
    }

    .auth-card {
        border-radius: 22px;
    }

    .auth-hero,
    .auth-panel {
        padding: 20px 16px;
    }

    .auth-hero {
        min-height: 150px;
    }

    .auth-panel__intro {
        margin-bottom: 18px;
    }

    .auth-panel p {
        margin-top: 10px;
    }

    .auth-alert {
        border-radius: 16px;
    }

    .auth-field__control {
        padding: 0 12px;
    }
}

.appointments-page .appointments-table--legacy {
    width: max-content !important;
    min-width: 100% !important;
}

.appointment-entry-form {
    width: 100%;
    max-width: none !important;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.appointment-entry-form .appointment-form-split {
    width: 100%;
    max-width: none;
}

.appointment-entry-form .appointment-form-grid {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.appointment-entry-form .appointment-form-grid .form-group,
.appointment-entry-form .appointment-form-grid .form-group--full {
    margin-bottom: 0;
    padding: 20px 22px;
    border: 1px solid rgba(16, 33, 58, 0.08);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 252, 0.96) 100%);
    box-shadow: 0 16px 30px rgba(8, 22, 41, 0.05);
}

.appointment-entry-form .appointment-form-grid .form-group--full {
    grid-column: 1 / -1;
}

.appointment-entry-form .form-actions {
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .appointment-entry-form .appointment-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.customer-entry-form {
    width: 100%;
    max-width: none !important;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.customer-entry-form .customer-form-grid {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.customer-entry-form .customer-form-grid .form-group,
.customer-entry-form .customer-form-grid .form-group--full {
    margin-bottom: 0;
    padding: 20px 22px;
    border: 1px solid rgba(16, 33, 58, 0.08);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(246, 200, 106, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 252, 0.96) 100%);
    box-shadow: 0 16px 30px rgba(8, 22, 41, 0.05);
}

.customer-entry-form .customer-form-grid .form-group--full {
    grid-column: 1 / -1;
}

.customer-entry-form .form-actions {
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .customer-entry-form .customer-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .appointments-page .appointments-table-shell {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .appointments-page .appointments-table,
    .appointments-page .appointments-table--legacy,
    .appointments-page .table-modern {
        width: 100% !important;
        min-width: 0 !important;
    }

    .appointments-page .appointments-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .appointments-page .appointments-table tbody {
        display: grid;
        gap: 14px;
    }

    .appointments-page .appointments-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 16px;
        border: 1px solid rgba(16, 33, 58, 0.08);
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
        box-shadow: 0 16px 30px rgba(8, 22, 41, 0.06);
    }

    .appointments-page .appointments-table tbody td,
    .appointments-page .appointments-table--legacy tbody td {
        display: grid;
        grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 0;
        border: 0;
    }

    .appointments-page .appointments-table tbody td::before {
        content: attr(data-label);
        color: var(--app-text-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .appointments-page .appointments-table tbody td[data-label="Islemler"] {
        grid-template-columns: minmax(0, 1fr);
    }

    .appointments-page .appointments-table tbody td[data-label="Islemler"]::before {
        margin-bottom: 2px;
    }

    .appointments-page .appointments-actions .btn {
        flex: 1 1 calc(50% - 6px);
    }

    .appointments-page .appointments-actions form {
        flex: 1 1 calc(50% - 6px);
    }

    .appointments-page .appointments-actions form .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .appointments-page .appointments-table tbody td,
    .appointments-page .appointments-table--legacy tbody td {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
}
