/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    /* Brand */
    --color-primary: #4DA49C;
    --color-primary-dark: #2d736d;
    --color-primary-bg: #eeeee4;
    --color-qs-teal: #4DA49C;
    --color-qs-teal-light: #6BC7BC;
    --color-qs-coral: #D85A30;
    --color-qs-blue: #185FA5;
    --color-qs-teal-hover: #3C8982;
    --color-qs-picker-hover: rgba(63, 168, 160, 0.08);
    --color-qs-picker-focused: rgba(63, 168, 160, 0.22);

    /* Surfaces */
    --color-header-bg: #fffdf8;
    --color-sidebar-bg: #ffffff;
    --color-content-bg: #fcfcf9;
    --color-footer-bg: #fffdf8;
    --color-card-bg: #fffdf8;

    /* Borders & text */
    --color-border: #edebe9;
    --color-text: #201f1e;
    --color-text-muted: #605e5c;

    /* Accents */
    --color-accent-dev: #ea6a00;
    --color-danger: #a4262c;
    --color-danger-bg: #fde7e9;

    /* Layout dimensions */
    --sidebar-width: 200px;
    --sidebar-collapsed-width: 80px;
    --launcher-width: 10vw;
    --header-height: 60px;
    --footer-height: 56px;
    --main-padding: 30px;
    --main-border-radius: 15px;

    /* Typography */
    --font-main: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--color-content-bg);
    color: var(--color-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   APP SHELL — GRID LAYOUT
   ============================================================ */
.app-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "main"
        "footer";
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   HEADER — three separate pieces
   ============================================================ */
.app-header {
    grid-area: header;
    background: var(--color-content-bg);
    display: flex;
    align-items: stretch;
    height: var(--header-height);
    padding: 10px 30px 0px 30px;
    gap: 30px;
    z-index: 100;
    min-width: 0;
    height: 64px;
}

/* Shared "piece" card look */
.app-launcher,
.app-subheader-piece,
.app-actions {
    background: var(--color-header-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--main-border-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ── Piece 1 : launcher (logo + square toggle) ── */
.app-launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 25px 0 15px;
    flex-shrink: 0;
    width: var(--launcher-width);
    min-width: 150px;
    transition: border-radius 0.16s ease;
}

.app-launcher__logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-launcher__logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.app-launcher__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background 0.12s, color 0.12s;
}

.app-launcher__toggle:hover {
    background: var(--color-content-bg);
    color: var(--color-text);
}

/* 2×2 grid of dots; each dot rotates 45° on itself when the drawer is open */
.app-launcher__grid {
    display: grid;
    grid-template-columns: repeat(2, 10px);
    grid-template-rows: repeat(2, 10px);
    gap: 3px;
    place-items: center;
}

.app-launcher__dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    border: solid 2px var(--color-qs-teal);
    transition: transform 0.2s ease;
}

.app-launcher__dot:nth-child(1) {
    border-color: var(--color-qs-teal);
}

.app-launcher__dot:nth-child(2) {
    border-color: var(--color-qs-teal-light);
}

.app-launcher__dot:nth-child(3) {
    border-color: var(--color-qs-blue);
}

.app-launcher__dot:nth-child(4) {
    border-color: var(--color-qs-coral);
}

.app-launcher.open .app-launcher__dot {
    transform: rotate(45deg);
}

.app-launcher__env {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--color-accent-dev);
    color: white;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    flex-shrink: 0;
}

/* ── The sidebar drawer that drops out of piece 1 ── */
.app-drawer {
    position: absolute;
    top: 100%;
    left: -1px;
    width: var(--launcher-width);
    min-width: 150px;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 16px);
    background: var(--color-header-bg);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    padding: 8px;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    gap: 6px;
}

.app-launcher.open {
    border-radius: var(--main-border-radius) 15px 0 0;
}

.app-launcher.open .app-drawer {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── Public header (unauthenticated pages: scheduling respond, etc.) ── */
.app-header--public .app-launcher {
    width: auto;
}

.app-header--public__icon {
    object-fit: contain;
    cursor: default;
    pointer-events: none;
}

/* ============================================================
   SUBHEADER — piece 2
   ============================================================ */
.app-subheader-piece {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
}

/* Burger toggle — hidden on wide screens, shown when the subheader collapses */
.app-subheader__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-qs-teal);
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}

.app-subheader__burger:hover {
    color: var(--color-qs-teal-hover);
}

.app-subheader__burger .ti {
    font-size: 20px;
}

/* Rectangle placeholder for the current module's icon */
.app-subheader__module-icon {
    width: 35px;
    height: 35px;
}

.app-subheader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 0;
    flex: 1;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding-right: calc(max(var(--launcher-width), 150px) - 56px);
}

.app-subheader::-webkit-scrollbar {
    display: none;
}

.subheader-tab {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-muted);
    transition: color 0.12s, background 0.12s;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.subheader-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-text-muted);
    transform: translateX(-50%);
    transition: width 0.2s ease, background 0.12s;
}

.subheader-tab:hover {
    color: var(--color-text);
    background-color: var(--color-content-bg);
}

.subheader-tab:hover::after {
    width: 80%;
    background: var(--color-text-muted);
}

.subheader-tab.active {
    color: var(--color-qs-teal);
    font-weight: 600;
}

.subheader-tab.active::after {
    width: 100%;
    background: var(--color-qs-teal);
}

/* ── Collapsed subheader: tabs become a burger dropdown ──
   The ".collapsed" class is toggled by JS (updateSubheaderMode in app.js)
   when the inline tabs no longer fit the available width — or below 768px,
   whichever is reached first. The same #app-subheader element is restyled
   into the dropdown menu, so the tabs are never duplicated. */
.app-subheader-piece.collapsed .app-subheader__burger {
    display: inline-flex;
}

/* Burger icon morphs into a cross while the dropdown is open */
.app-subheader__burger-icon--close {
    display: none;
}

.app-subheader-piece.open .app-subheader__burger-icon--menu {
    display: none;
}

.app-subheader-piece.open .app-subheader__burger-icon--close {
    display: inline-block;
}

.app-subheader-piece.collapsed.open {
    border-radius: var(--main-border-radius) 15px 0 0;
}

/* Turn the tab row into a dropdown that drops out of the piece */
.app-subheader-piece.collapsed .app-subheader {
    position: absolute;
    top: 100%;
    left: -1px;
    right: -1px;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    height: auto;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 16px);
    padding: 8px;
    background: var(--color-header-bg);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.app-subheader-piece.collapsed.open .app-subheader {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.app-subheader-piece.collapsed .subheader-tab {
    height: 40px;
    width: 100%;
    justify-content: flex-start;
}

/* ============================================================
   ACTIONS — piece 3 (profile + notifications)
   ============================================================ */
.app-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    flex-shrink: 0;
}

.qs-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-content-bg);
    color: var(--color-qs-teal);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.qs-icon-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-content-bg);
    color: var(--color-danger);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.qs-icon-btn:hover {
    background: var(--color-border);
    color: var(--color-qs-teal-hover);
}

.qs-icon-btn:disabled,
.qs-icon-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    background: var(--color-content-bg);
    color: var(--color-text-muted);
}

.qs-icon-btn .ti {
    font-size: 18px;
}

.qs-icon-btn--danger:hover {
    color: var(--color-danger);
    background: var(--color-danger-bg);
    border-color: var(--color-danger);
}

/* ============================================================
   DRAWER NAV ITEMS
   ============================================================ */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    transition: background 0.1s, color 0.1s;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--color-border);
    color: var(--color-primary);
}

.nav-item.active {
    background: var(--color-primary-bg);
    color: var(--color-text);
    font-weight: 700;
}

/* Rectangle placeholder icon (custom per-module icons added later) */
.nav-item__icon-ph {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: var(--color-primary-bg);
    border: 1px solid var(--color-primary);
    flex-shrink: 0;
}

.nav-item.active .nav-item__icon-ph {
    background: var(--color-primary);
}

.nav-item__icon {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: contain;
}

.app-subheader__module-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.nav-item[data-label="Admin"] .nav-item__icon-ph {
    border-color: var(--color-danger, #e5484d);
    background: var(--color-danger-bg);
}

.nav-spacer {
    flex: 1;
    min-height: 8px;
}

.nav-spacer+.nav-item--bottom {
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
    padding-top: 8px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.app-main {
    grid-area: main;
    padding: var(--main-padding);
    overflow-y: auto;
    min-width: 0;
    min-height: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
    grid-area: footer;
    background: var(--color-header-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--main-border-radius);
    margin: 4px 30px 8px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    min-height: var(--footer-height);
    flex-shrink: 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ============================================================
   PAGE & CARD LAYOUT
   ============================================================ */
.page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.page__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.page__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

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

.page__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ============================================================
   QS-RADIO-BUTTON & QS-CHECKBOX — visual-only span elements
   Toggle .checked to activate. Use position:relative on parent
   if you need absolute children not to escape.
   ============================================================ */

.qs-radio-button {
    display: inline-block;
    position: relative;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-header-bg);
    vertical-align: middle;
    flex-shrink: 0;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.qs-radio-button:hover {
    border-color: var(--color-qs-teal);
}

.qs-radio-button.checked {
    border-color: var(--color-qs-teal);
}

.qs-radio-button.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-qs-teal);
}

.qs-checkbox {
    display: inline-block;
    position: relative;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 3px;
    background: var(--color-header-bg);
    vertical-align: middle;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}

.qs-checkbox:hover {
    border-color: var(--color-qs-teal);
}

.qs-checkbox.checked {
    background: var(--color-qs-teal);
    border-color: var(--color-qs-teal);
}

.qs-checkbox.checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 5px;
    height: 9px;
    border: 2px solid #ffffff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.htmx-indicator {
    opacity: 0;
    transition: opacity 0.2s;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

/* ============================================================
   NOTIFICATION BELL — global (header piece 3)
   ============================================================ */
.cdnc-notif-bell {
    position: relative;
    display: inline-flex;
}

/* .cdnc-notif-bell__btn uses .qs-icon-btn */

.cdnc-notif-bell__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-header-bg, #fff);
    box-sizing: border-box;
}

.cdnc-notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: var(--color-header-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    z-index: 320;
    overflow: hidden;
    animation: cdnc-slide-down 0.18s ease;
}

@keyframes cdnc-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cdnc-notif-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-content-bg);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

.cdnc-notif-panel__body {
    max-height: min(440px, calc(100vh - 140px));
    overflow-y: auto;
}

.cdnc-notif-panel__empty {
    padding: 28px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 12px;
}

.cdnc-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.1s;
}

.cdnc-notif-item:last-child {
    border-bottom: none;
}

.cdnc-notif-item:hover {
    background: var(--color-content-bg);
}

.cdnc-notif-item--unread {
    background: rgba(59, 130, 246, 0.06);
}

.cdnc-notif-item__icon {
    flex: none;
    font-size: 16px;
    color: var(--color-text-muted);
    margin-top: 1px;
}

.cdnc-notif-item--unread .cdnc-notif-item__icon {
    color: var(--color-qs-teal, #0ea5a4);
}

.cdnc-notif-item__main {
    flex: 1;
    min-width: 0;
}

.cdnc-notif-item__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}

.cdnc-notif-item__msg {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cdnc-notif-item__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.cdnc-notif-item__del {
    flex: none;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.1s, background 0.1s, color 0.1s;
}

.cdnc-notif-item:hover .cdnc-notif-item__del {
    opacity: 1;
}

.cdnc-notif-item__del:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* Grouped notifications (multiple from the same person → one expandable row). */
.cdnc-notif-group {
    border-bottom: 1px solid var(--color-border);
}

.cdnc-notif-group:last-child {
    border-bottom: none;
}

.cdnc-notif-group__head {
    border-bottom: none;
}

.cdnc-notif-group__chevron {
    flex: none;
    font-size: 16px;
    color: var(--color-text-muted);
    margin-top: 1px;
    transition: transform 0.15s;
}

.cdnc-notif-group--open .cdnc-notif-group__chevron {
    transform: rotate(90deg);
}

.cdnc-notif-count {
    flex: none;
    align-self: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-qs-teal, #0ea5a4);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.cdnc-notif-group__body {
    display: none;
}

.cdnc-notif-group--open .cdnc-notif-group__body {
    display: block;
}

.cdnc-notif-group__body .cdnc-notif-item {
    padding-left: 38px;
    background: rgba(0, 0, 0, 0.02);
}

.cdnc-notif-group__body .cdnc-notif-item:last-child {
    border-bottom: none;
}

/* ── shared corner animation (qs-button + qs-button-ghost) ── */
.qs-button,
.qs-button-ghost {
    border: none;
    position: relative;
}

.qs-button::before,
.qs-button::after,
.qs-button-ghost::before,
.qs-button-ghost::after {
    content: '';
    position: absolute;
    width: 25%;
    height: 25%;
    border-style: solid;
    border-color: var(--corner-color);
    pointer-events: none;
    transition: width 0.22s ease, height 0.22s ease, border-color 0.15s, border-radius 0.22s ease;
}

.qs-button::before,
.qs-button-ghost::before {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
    border-radius: 0 12px 0 0;
}

.qs-button::after,
.qs-button-ghost::after {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
    border-radius: 0 0 0 12px;
}

.qs-button:hover::before,
.qs-button:hover::after,
.qs-button-ghost:hover::before,
.qs-button-ghost:hover::after {
    width: 50%;
    height: 50%;
    border-color: var(--corner-hover-color);
}

.qs-button:active::before,
.qs-button-ghost:active::before {
    width: 100%;
    height: 100%;
    border-color: var(--corner-active-color);
    border-radius: 12px 12px 12px 0;
}

.qs-button:active::after,
.qs-button-ghost:active::after {
    width: 100%;
    height: 100%;
    border-color: var(--corner-active-color);
    border-radius: 12px 0 12px 12px;
}

.qs-button:disabled::before,
.qs-button-ghost:disabled::before {
    top: 0;
    left: 0;
    right: auto;
    width: 25%;
    height: 25%;
    border-width: 2px 0 0 2px;
    border-radius: 12px 0 0 0;
    border-color: var(--corner-disabled-color);
}

.qs-button:disabled::after,
.qs-button-ghost:disabled::after {
    bottom: 0;
    right: 0;
    left: auto;
    width: 25%;
    height: 25%;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 12px 0;
    border-color: var(--corner-disabled-color);
}

/* ── qs-button (solid) ── */
.qs-button {
    --corner-color: #2d8880;
    --corner-hover-color: #165650;
    --corner-active-color: #165650;
    --corner-disabled-color: #c0d0d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
    white-space: nowrap;
    background: #4bbcb2;
    color: #fff;
}

.qs-button:hover {
    background: #3ea39b;
}

.qs-button:active {
    /* background: #1f6b65; */
    background: #339790;
    transform: translateY(2px);
}

.qs-button:disabled {
    background: #d0dede;
    color: #9bb0b0;
    cursor: not-allowed;
    transform: none;
}

/* ── qs-button-ghost ── */
.qs-button-ghost {
    --corner-color: #3fa8a0;
    --corner-hover-color: #2d8880;
    --corner-active-color: #1f6b65;
    --corner-disabled-color: #c0d0d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.1s;
    user-select: none;
    white-space: nowrap;
    background: rgba(63, 168, 160, 0.07);
    color: #3fa8a0;
}

.qs-button-ghost:hover {
    color: #2d8880;
    background: rgba(63, 168, 160, 0.1);
}

.qs-button-ghost:active {
    color: #1f6b65;
    background: rgba(63, 168, 160, 0.14);
    transform: translateY(1px);
}

.qs-button-ghost:disabled {
    color: #aaa;
    background: transparent;
    cursor: not-allowed;
    transform: none;
}

/* ── qs-button--danger modifier (works on both solid + ghost) ── */
.qs-button--danger,
.qs-button-ghost--danger {
    --corner-color: #ff000b;
    --corner-hover-color: #c5555a;
    --corner-active-color: #c5555a;
    --corner-disabled-color: #f0a0a5;
    background: #fde7e9ab;
}

.qs-button.qs-button--danger {
    background: var(--color-danger);
}

.qs-button.qs-button--danger:hover {
    background: #8a1a1f;
}

.qs-button.qs-button--danger:active {
    background: #6b1418;
}

.qs-button-ghost.qs-button-ghost--danger {
    color: var(--color-danger);
}

.qs-button-ghost.qs-button-ghost--danger:hover {
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

.qs-button-ghost.qs-button-ghost--danger:active {
    color: #8a1a1f;
    background: var(--color-danger-bg);
}