/*
 * Dr.D Design System
 * Version: 2026-04-05
 * Source alignment: TidyCal Client Portal runtime theme
 *
 * Usage:
 * 1. Import this file after any reset or normalize.
 * 2. Wrap the page or application root with `.drd-theme`.
 * 3. Use the `.drd-*` classes to avoid collisions with host styles.
 * 4. Override only the CSS custom properties if you need to rebrand.
 */

:root,
.drd-theme {
    --drd-bg: #fcfcfc;
    --drd-surface: #ffffff;
    --drd-surface-alt: #f7f7f8;
    --drd-surface-soft: #fbfbfc;
    --drd-text: #272727;
    --drd-text-soft: #4f5660;
    --drd-text-muted: #6f7680;
    --drd-border: #e8e8ea;
    --drd-border-strong: #d9dadd;
    --drd-primary: #05a6f0;
    --drd-primary-hover: #0295da;
    --drd-primary-soft: #eaf8fe;
    --drd-success: #81bc06;
    --drd-success-soft: #f3f9e8;
    --drd-warning: #ffba08;
    --drd-warning-soft: #fff8e1;
    --drd-destructive: #f35325;
    --drd-destructive-soft: #fff1ec;
    --drd-focus-ring: rgba(5, 166, 240, 0.34);
    --drd-overlay-light: rgba(39, 39, 39, 0.08);
    --drd-overlay-modal: rgba(39, 39, 39, 0.32);
    --drd-radius-xs: 8px;
    --drd-radius-sm: 10px;
    --drd-radius-md: 12px;
    --drd-radius-lg: 16px;
    --drd-radius-xl: 20px;
    --drd-radius-pill: 999px;
    --drd-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --drd-shadow-sm: 0 4px 12px rgba(16, 24, 40, 0.05);
    --drd-shadow-md: 0 8px 24px rgba(16, 24, 40, 0.06);
    --drd-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.08);
    --drd-sidebar-width: 272px;
    --drd-sidebar-collapsed-width: 84px;
    --drd-header-height: 72px;
    --drd-content-max-width: 1440px;
    --drd-font-sans: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
    --drd-font-display: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
    --drd-space-1: 4px;
    --drd-space-2: 8px;
    --drd-space-3: 12px;
    --drd-space-4: 16px;
    --drd-space-5: 20px;
    --drd-space-6: 24px;
    --drd-space-8: 32px;
    --drd-space-10: 40px;
    --drd-space-12: 48px;
    --drd-space-16: 64px;
}

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

.drd-theme {
    margin: 0;
    min-height: 100vh;
    font-family: var(--drd-font-sans);
    font-size: 15px;
    line-height: 24px;
    color: var(--drd-text);
    background:
        radial-gradient(circle at top left, rgba(5, 166, 240, 0.05), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, var(--drd-bg) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.drd-theme a {
    color: inherit;
    text-decoration: none;
}

.drd-theme img {
    display: block;
    max-width: 100%;
}

.drd-theme button,
.drd-theme input,
.drd-theme select,
.drd-theme textarea {
    font: inherit;
}

.drd-theme h1,
.drd-theme h2,
.drd-theme h3,
.drd-theme h4,
.drd-theme h5,
.drd-theme h6,
.drd-theme p {
    margin: 0;
}

.drd-theme h1 {
    font-family: var(--drd-font-display);
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.drd-theme h2 {
    font-family: var(--drd-font-display);
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.drd-theme h3 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}

.drd-theme h4 {
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
}

.drd-theme small {
    font-size: 13px;
    line-height: 20px;
}

.drd-theme [hidden],
.drd-hidden {
    display: none !important;
}

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

.drd-skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: var(--drd-radius-md);
    background: var(--drd-text);
    color: #ffffff;
    box-shadow: var(--drd-shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 24px));
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.drd-skip-link:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.drd-focusable:focus-visible,
.drd-theme button:focus-visible,
.drd-theme a:focus-visible,
.drd-theme input:focus-visible,
.drd-theme select:focus-visible,
.drd-theme textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--drd-focus-ring);
}

.drd-kicker,
.drd-eyebrow {
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
    color: var(--drd-primary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.drd-lead {
    color: var(--drd-text-soft);
    font-size: 18px;
    line-height: 30px;
}

.drd-muted,
.drd-helper {
    color: var(--drd-text-soft);
}

.drd-caption {
    color: var(--drd-text-muted);
    font-size: 13px;
    line-height: 20px;
}

.drd-stack {
    display: grid;
    gap: var(--drd-space-6);
}

.drd-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--drd-space-3);
}

.drd-grid-2,
.drd-grid-3,
.drd-grid-4 {
    display: grid;
    gap: var(--drd-space-6);
}

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

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

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

.drd-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--drd-sidebar-width) minmax(0, 1fr);
}

.drd-shell.is-collapsed {
    grid-template-columns: var(--drd-sidebar-collapsed-width) minmax(0, 1fr);
}

.drd-shell-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.drd-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--drd-space-6);
    padding: var(--drd-space-6) var(--drd-space-5);
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid var(--drd-border);
    backdrop-filter: blur(14px);
    overflow: visible;
    z-index: 30;
}

.drd-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--drd-space-4);
}

.drd-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--drd-space-4);
    min-width: 0;
}

.drd-sidebar-logo {
    width: 48px;
    height: 48px;
    padding: 8px;
    border-radius: var(--drd-radius-lg);
    border: 1px solid var(--drd-border);
    background: var(--drd-surface);
    box-shadow: var(--drd-shadow-xs);
    flex: none;
}

.drd-sidebar-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.drd-sidebar-copy strong {
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}

.drd-sidebar-copy small {
    color: var(--drd-text-soft);
}

.drd-sidebar-collapse {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--drd-radius-pill);
    background: transparent;
    color: var(--drd-text-muted);
    cursor: pointer;
    flex: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.drd-sidebar-collapse svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.6;
}

.drd-sidebar-collapse:hover,
.drd-sidebar-collapse:focus-visible {
    color: var(--drd-text);
    background: rgba(5, 166, 240, 0.08);
}

.drd-sidebar-nav {
    display: grid;
    align-content: start;
    gap: var(--drd-space-6);
}

.drd-sidebar-section {
    display: grid;
    gap: var(--drd-space-2);
}

.drd-sidebar-section + .drd-sidebar-section {
    padding-top: var(--drd-space-6);
    border-top: 1px solid var(--drd-border);
}

.drd-sidebar-heading {
    padding-left: var(--drd-space-3);
    color: var(--drd-text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.drd-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--drd-space-3);
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--drd-radius-lg);
    color: var(--drd-text-soft);
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.drd-nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: var(--drd-radius-pill);
    background: transparent;
    transition: background-color 0.18s ease;
}

.drd-nav-link:hover,
.drd-nav-link:focus-visible {
    color: var(--drd-text);
    background: rgba(5, 166, 240, 0.06);
}

.drd-nav-link.is-active,
.drd-nav-link[aria-current="page"] {
    color: var(--drd-text);
    background: rgba(5, 166, 240, 0.14);
}

.drd-nav-link.is-active::before,
.drd-nav-link[aria-current="page"]::before {
    background: var(--drd-primary);
}

.drd-sidebar-footer {
    display: grid;
    gap: var(--drd-space-4);
}

.drd-sidebar-note {
    color: var(--drd-text-soft);
}

.drd-sync-card,
.drd-card,
.drd-metric,
.drd-callout,
.drd-state-panel,
.drd-table-shell {
    background: linear-gradient(180deg, var(--drd-surface) 0%, var(--drd-surface-soft) 100%);
    border: 1px solid var(--drd-border);
    border-radius: var(--drd-radius-xl);
    box-shadow: var(--drd-shadow-sm);
}

.drd-sync-card,
.drd-card,
.drd-metric,
.drd-callout {
    padding: var(--drd-space-5);
}

.drd-card {
    display: grid;
    gap: var(--drd-space-4);
}

.drd-card-title {
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
}

.drd-card-subtitle,
.drd-metric-label {
    color: var(--drd-text-soft);
}

.drd-metric {
    display: grid;
    gap: var(--drd-space-2);
}

.drd-metric-value {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.drd-callout {
    display: grid;
    gap: var(--drd-space-3);
}

.drd-callout-info {
    border-color: rgba(5, 166, 240, 0.22);
    background: linear-gradient(180deg, #fafdff 0%, var(--drd-primary-soft) 100%);
}

.drd-callout-success {
    border-color: rgba(129, 188, 6, 0.24);
    background: linear-gradient(180deg, #fcfef8 0%, var(--drd-success-soft) 100%);
}

.drd-callout-warning {
    border-color: rgba(255, 186, 8, 0.28);
    background: linear-gradient(180deg, #fffdf7 0%, var(--drd-warning-soft) 100%);
}

.drd-callout-destructive {
    border-color: rgba(243, 83, 37, 0.26);
    background: linear-gradient(180deg, #fffaf8 0%, var(--drd-destructive-soft) 100%);
}

.drd-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: var(--drd-header-height);
    padding: 0 var(--drd-space-6);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--drd-border);
    backdrop-filter: blur(16px);
}

.drd-topbar-inner {
    min-height: var(--drd-header-height);
    max-width: var(--drd-content-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--drd-space-4);
}

.drd-topbar-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.drd-user-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--drd-space-3);
    min-height: 44px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--drd-radius-pill);
    background: var(--drd-surface);
    box-shadow: var(--drd-shadow-xs);
}

.drd-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--drd-surface-alt);
    border: 1px solid var(--drd-border);
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.drd-page-shell {
    width: min(100%, var(--drd-content-max-width));
    margin: 0 auto;
    padding: 32px;
    display: grid;
    gap: 24px;
}

.drd-page-header-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--drd-space-6);
    flex-wrap: wrap;
}

.drd-page-header-copy {
    display: grid;
    gap: var(--drd-space-3);
}

.drd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--drd-radius-pill);
    background: var(--drd-surface-alt);
    color: var(--drd-text);
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.drd-button:hover,
.drd-button:focus-visible {
    transform: translateY(-1px);
}

.drd-button-primary {
    background: var(--drd-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(5, 166, 240, 0.18);
}

.drd-button-primary:hover,
.drd-button-primary:focus-visible {
    background: var(--drd-primary-hover);
}

.drd-button-secondary {
    background: var(--drd-surface-alt);
    color: var(--drd-text);
    border-color: rgba(232, 232, 234, 0.9);
}

.drd-button-secondary:hover,
.drd-button-secondary:focus-visible {
    background: #eff1f4;
}

.drd-button-outline {
    background: transparent;
    border-color: var(--drd-border-strong);
}

.drd-button-outline:hover,
.drd-button-outline:focus-visible {
    border-color: rgba(5, 166, 240, 0.34);
    background: rgba(5, 166, 240, 0.04);
}

.drd-button-ghost {
    background: transparent;
    color: var(--drd-text-soft);
}

.drd-button-ghost:hover,
.drd-button-ghost:focus-visible {
    background: rgba(5, 166, 240, 0.06);
    color: var(--drd-text);
}

.drd-button-destructive {
    background: var(--drd-destructive);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(243, 83, 37, 0.16);
}

.drd-button-destructive:hover,
.drd-button-destructive:focus-visible {
    background: #e24b20;
}

.drd-button-small {
    min-height: 36px;
    padding-inline: 14px;
    font-size: 14px;
}

.drd-button-block {
    width: 100%;
}

.drd-button[disabled],
.drd-button.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.drd-button.is-pending {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.drd-button.is-pending::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: currentColor;
    color: #ffffff;
    animation: drd-spin 0.8s linear infinite;
}

.drd-button-secondary.is-pending::after,
.drd-button-outline.is-pending::after,
.drd-button-ghost.is-pending::after {
    border-color: rgba(39, 39, 39, 0.18);
    border-top-color: var(--drd-text);
    color: var(--drd-text);
}

.drd-field {
    display: grid;
    gap: var(--drd-space-2);
}

.drd-field-label {
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
}

.drd-field-caption {
    color: var(--drd-text-soft);
    font-size: 13px;
    line-height: 20px;
}

.drd-input,
.drd-select,
.drd-textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--drd-border);
    border-radius: var(--drd-radius-lg);
    background: var(--drd-surface);
    color: var(--drd-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.drd-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--drd-text-soft) 50%), linear-gradient(135deg, var(--drd-text-soft) 50%, transparent 50%);
    background-position: calc(100% - 22px) calc(50% - 2px), calc(100% - 16px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

.drd-textarea {
    min-height: 124px;
    padding-block: 12px;
    resize: vertical;
}

.drd-input::placeholder,
.drd-textarea::placeholder {
    color: #9aa1aa;
}

.drd-input:hover,
.drd-select:hover,
.drd-textarea:hover {
    border-color: var(--drd-border-strong);
}

.drd-input:focus,
.drd-select:focus,
.drd-textarea:focus {
    border-color: rgba(5, 166, 240, 0.62);
    outline: none;
    box-shadow: 0 0 0 4px var(--drd-focus-ring);
}

.drd-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--drd-text-soft);
    cursor: pointer;
}

.drd-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--drd-primary);
}

.drd-field-error {
    color: #c2481e;
    font-size: 13px;
    line-height: 20px;
}

.drd-validation-summary {
    display: grid;
    gap: var(--drd-space-2);
    padding: var(--drd-space-4);
    border-radius: var(--drd-radius-lg);
    border: 1px solid rgba(243, 83, 37, 0.22);
    background: linear-gradient(180deg, #fffaf8 0%, var(--drd-destructive-soft) 100%);
}

.drd-table-shell {
    overflow: hidden;
}

.drd-table-shell-scroll {
    overflow-x: auto;
}

.drd-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

.drd-table th,
.drd-table td {
    padding: 18px 20px;
    text-align: left;
    vertical-align: top;
}

.drd-table thead th {
    color: var(--drd-text-soft);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--drd-border);
}

.drd-table tbody td {
    border-top: 1px solid var(--drd-border);
}

.drd-table tbody tr:first-child td {
    border-top: none;
}

.drd-table tbody tr:hover {
    background: rgba(5, 166, 240, 0.035);
}

.drd-table-primary {
    display: grid;
    gap: 4px;
}

.drd-table-primary strong {
    font-weight: 600;
}

.drd-table-meta {
    color: var(--drd-text-soft);
    font-size: 14px;
    line-height: 22px;
}

.drd-table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.drd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: var(--drd-radius-pill);
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
}

.drd-badge-info {
    color: var(--drd-primary);
    background: var(--drd-primary-soft);
}

.drd-badge-success {
    color: #517704;
    background: var(--drd-success-soft);
}

.drd-badge-warning {
    color: #9e6d00;
    background: var(--drd-warning-soft);
}

.drd-badge-destructive {
    color: #b2451e;
    background: var(--drd-destructive-soft);
}

.drd-badge-neutral {
    color: var(--drd-text-soft);
    background: #eff1f4;
}

.drd-alert {
    position: relative;
    display: grid;
    gap: 6px;
    padding: var(--drd-space-4) var(--drd-space-5) var(--drd-space-4) 20px;
    border-radius: var(--drd-radius-lg);
    border: 1px solid transparent;
}

.drd-alert::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 10px;
    width: 4px;
    border-radius: var(--drd-radius-pill);
    background: currentColor;
}

.drd-alert strong {
    font-size: 15px;
    line-height: 22px;
}

.drd-alert span {
    color: var(--drd-text-soft);
}

.drd-alert-info {
    color: var(--drd-primary);
    border-color: rgba(5, 166, 240, 0.18);
    background: linear-gradient(180deg, #fbfeff 0%, var(--drd-primary-soft) 100%);
}

.drd-alert-success {
    color: #517704;
    border-color: rgba(129, 188, 6, 0.18);
    background: linear-gradient(180deg, #fcfef8 0%, var(--drd-success-soft) 100%);
}

.drd-alert-warning {
    color: #946700;
    border-color: rgba(255, 186, 8, 0.22);
    background: linear-gradient(180deg, #fffef9 0%, var(--drd-warning-soft) 100%);
}

.drd-alert-destructive {
    color: #b2451e;
    border-color: rgba(243, 83, 37, 0.2);
    background: linear-gradient(180deg, #fffaf8 0%, var(--drd-destructive-soft) 100%);
}

.drd-state-panel {
    padding: var(--drd-space-6);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--drd-space-4);
    align-items: start;
}

.drd-state-panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(5, 166, 240, 0.08);
    border: 1px solid rgba(5, 166, 240, 0.12);
    color: var(--drd-primary);
    flex: none;
}

.drd-state-panel-copy {
    display: grid;
    gap: 6px;
}

.drd-state-panel-copy p {
    color: var(--drd-text-soft);
}

.drd-state-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.drd-state-panel-error .drd-state-panel-icon {
    background: rgba(243, 83, 37, 0.08);
    border-color: rgba(243, 83, 37, 0.12);
    color: var(--drd-destructive);
}

.drd-state-panel-success .drd-state-panel-icon {
    background: rgba(129, 188, 6, 0.08);
    border-color: rgba(129, 188, 6, 0.14);
    color: var(--drd-success);
}

.drd-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(5, 166, 240, 0.18);
    border-top-color: var(--drd-primary);
    animation: drd-spin 0.8s linear infinite;
}

.drd-modal {
    width: min(560px, calc(100vw - 32px));
    margin: auto;
    border: none;
    padding: 0;
    border-radius: 28px;
    background: transparent;
}

.drd-modal::backdrop {
    background: var(--drd-overlay-modal);
    backdrop-filter: blur(6px);
}

.drd-modal-panel {
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, var(--drd-surface) 0%, var(--drd-surface-soft) 100%);
    box-shadow: var(--drd-shadow-lg);
    border: 1px solid var(--drd-border);
    display: grid;
    gap: 20px;
}

.drd-modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.drd-calendar-shell {
    display: grid;
    gap: var(--drd-space-5);
}

.drd-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--drd-space-4);
    flex-wrap: wrap;
}

.drd-calendar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.drd-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.drd-calendar-weekday {
    padding: 0 12px;
    color: var(--drd-text-muted);
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
    text-align: center;
}

.drd-calendar-day {
    min-height: 104px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: var(--drd-radius-lg);
    border: 1px solid var(--drd-border);
    background: linear-gradient(180deg, var(--drd-surface) 0%, #fbfcfd 100%);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.drd-calendar-day:hover,
.drd-calendar-day:focus-visible {
    border-color: rgba(5, 166, 240, 0.34);
    box-shadow: var(--drd-shadow-xs);
    transform: translateY(-1px);
}

.drd-calendar-day--today {
    border-color: rgba(5, 166, 240, 0.46);
}

.drd-calendar-day--upcoming {
    background: linear-gradient(180deg, #fbfeff 0%, var(--drd-primary-soft) 100%);
}

.drd-calendar-day--confirmed {
    background: linear-gradient(180deg, #fdfff8 0%, var(--drd-success-soft) 100%);
}

.drd-calendar-day--completed {
    background: linear-gradient(180deg, #ffffff 0%, #eff1f4 100%);
}

.drd-calendar-day--cancelled {
    background: linear-gradient(180deg, #fffdfc 0%, var(--drd-destructive-soft) 100%);
}

.drd-calendar-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.drd-calendar-day-count {
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(39, 39, 39, 0.06);
    color: var(--drd-text-soft);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.drd-calendar-day-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 10px;
}

.drd-calendar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--drd-primary);
}

.drd-calendar-dot-confirmed {
    background: var(--drd-success);
}

.drd-calendar-dot-completed {
    background: #8a9098;
}

.drd-calendar-dot-cancelled {
    background: var(--drd-destructive);
}

.drd-popover {
    width: min(320px, calc(100vw - 32px));
    padding: 18px;
    border-radius: 20px;
    background: #061d31;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(2, 22, 36, 0.32);
    display: grid;
    gap: 14px;
}

.drd-popover-title strong {
    font-size: 18px;
    line-height: 24px;
}

.drd-popover-title span {
    color: rgba(255, 255, 255, 0.76);
}

.drd-auth-field {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 2px solid #2b3040;
    border-radius: 16px;
    background: rgba(34, 38, 48, 0.92);
    color: #ffffff;
    transition: border-color 0.1s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.drd-auth-field::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.drd-auth-field:hover {
    border-color: #414b63;
}

.drd-auth-field:focus {
    outline: none;
    border-color: #596a95;
    box-shadow: 0 0 0 4px rgba(89, 106, 149, 0.22);
}

.drd-auth-field:-webkit-autofill,
.drd-auth-field:-webkit-autofill:hover,
.drd-auth-field:-webkit-autofill:focus,
.drd-auth-field:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 1000px #222630 inset;
    caret-color: #ffffff;
    border: 2px solid #2b3040;
}

.drd-button-login {
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: 0.875em;
    background: #000000;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.drd-button-login::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: -20%;
    right: -20%;
    background: #ffffff;
    transform: skewX(-45deg) scale(0, 1);
    transition: transform 0.5s ease;
}

.drd-button-login:hover,
.drd-button-login:focus-visible {
    color: #000000;
}

.drd-button-login:hover::after,
.drd-button-login:focus-visible::after {
    transform: skewX(-45deg) scale(1, 1);
}

.drd-button-login:focus-visible {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.drd-button-logout {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-color: rgb(255, 65, 65);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.16);
    transition: width 0.3s ease, border-radius 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.drd-button-logout-sign {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: width 0.3s ease, padding-left 0.3s ease;
}

.drd-button-logout-sign svg {
    width: 15px;
    height: 15px;
}

.drd-button-logout-sign svg path {
    fill: #ffffff;
}

.drd-button-logout-text {
    position: absolute;
    right: 0;
    width: 0;
    opacity: 0;
    color: #ffffff;
    font-size: 0.98rem;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.3s ease, width 0.3s ease, padding-right 0.3s ease;
}

.drd-button-logout:hover,
.drd-button-logout:focus-visible {
    width: 142px;
    border-radius: 40px;
    box-shadow: 0 8px 18px rgba(243, 83, 37, 0.24);
}

.drd-button-logout:hover .drd-button-logout-sign,
.drd-button-logout:focus-visible .drd-button-logout-sign {
    width: 28%;
    padding-left: 16px;
}

.drd-button-logout:hover .drd-button-logout-text,
.drd-button-logout:focus-visible .drd-button-logout-text {
    width: 72%;
    opacity: 1;
    padding-right: 16px;
}

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

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

@media (max-width: 1024px) {
    .drd-shell,
    .drd-shell.is-collapsed {
        grid-template-columns: 1fr;
    }

    .drd-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--drd-border);
    }

    .drd-page-shell {
        padding-inline: 24px;
    }

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

@media (max-width: 768px) {
    .drd-page-shell {
        padding: 20px 16px 40px;
    }

    .drd-page-header-inline,
    .drd-calendar-toolbar,
    .drd-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .drd-grid-2,
    .drd-grid-3,
    .drd-grid-4 {
        grid-template-columns: 1fr;
    }

    .drd-table--stacked {
        min-width: 100%;
    }

    .drd-table--stacked thead {
        display: none;
    }

    .drd-table--stacked tbody,
    .drd-table--stacked tr,
    .drd-table--stacked td {
        display: block;
        width: 100%;
    }

    .drd-table--stacked tbody tr {
        padding: 18px 18px 8px;
        border-top: 1px solid var(--drd-border);
    }

    .drd-table--stacked tbody tr:first-child {
        border-top: none;
    }

    .drd-table--stacked td {
        padding: 0 0 12px;
        border: none;
    }

    .drd-table--stacked td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--drd-text-muted);
        font-size: 12px;
        line-height: 18px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .drd-table-actions {
        justify-content: flex-start;
    }

    .drd-calendar-grid {
        min-width: 780px;
    }

    .drd-calendar-shell {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .drd-state-panel {
        grid-template-columns: 1fr;
    }
}
