/* ============================================================
   FlagPlayDesigner — "tactical clean" design system
   ============================================================ */

:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --text: #0f172a;
    --text-muted: #64748b;
    --text-faint: #94a3b8;

    --brand: #0f172a;
    --accent: #16a34a;
    --accent-hover: #15803d;
    --accent-soft: #dcfce7;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --hot: #e11d48;

    --radius-lg: 16px;
    --radius: 10px;
    --radius-sm: 8px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 28px -8px rgba(15, 23, 42, .25);

    --ring: 0 0 0 3px rgba(22, 163, 74, .25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */

.navbar {
    height: 64px;
    width: 100%;
    background-color: var(--brand);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.navbar h1::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .2);
}

#authForm {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
}

#authForm button {
    white-space: nowrap;
}

/* Navbar buttons override the neutral base button style */
#logInForm {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .35);
    box-shadow: none;
    padding: .45em 1em;
}

#logInForm:hover {
    background: rgba(255, 255, 255, .1);
}

#signUpForm {
    background: var(--accent);
    color: #fff;
    border: 1.5px solid var(--accent);
    box-shadow: none;
    padding: .45em 1em;
}

#signUpForm:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.signOut {
    display: none;
}

#signedInText {
    display: none;
    flex-direction: column;
    justify-content: center;
    color: #e2e8f0;
    font-size: .85rem;
}

#signOutForm {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .35);
    box-shadow: none;
    padding: .45em 1em;
}

#signOutForm:hover {
    background: rgba(255, 255, 255, .1);
}

/* ---------- Layout ---------- */

.allcontent {
    min-height: calc(100vh - 64px);
    padding: 24px;
}

.maincontent {
    display: flex;
    justify-content: center;
}

.canvascontainer {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 1400px;
}

.leftside,
.rightside {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    width: 286px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.canvasdisplay {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
}

/* ---------- Section headings ---------- */

h2 {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}

h3 {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-faint);
    width: 100%;
    margin-bottom: 2px;
}

.headlinecontainer {
    width: 100%;
    margin-top: 10px;
    padding-bottom: 5px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.headlinecontainermiddle {
    display: flex;
    align-items: center;
    margin: 4px 0 10px;
}

.canvasdisplay .headlinecontainermiddle h2 {
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text);
}

.leftside > .headlinecontainermiddle:first-child,
.rightside > .headlinecontainermiddle:first-child {
    margin-top: 0;
}

.leftside .headlinecontainermiddle,
.rightside .headlinecontainermiddle {
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

/* ---------- Button base + variants ---------- */

button {
    appearance: none;
    font-weight: 600;
    font-size: .82rem;
    color: var(--text);
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    padding: .5em .6em;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.2;
    transition: background-color .12s ease, border-color .12s ease, transform .04s ease, box-shadow .12s ease;
}

button:hover {
    background-color: var(--surface-2);
    border-color: var(--text-faint);
}

button:active {
    transform: translateY(1px);
    box-shadow: none;
}

button:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

button:disabled {
    background-color: var(--surface-2);
    border-color: var(--border);
    color: var(--text-faint);
    cursor: not-allowed;
    box-shadow: none;
}

.formations {
    font-size: .8rem;
}

/* Primary action */
#savePlay {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

#savePlay:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

#savePlay:disabled {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text-faint);
}

#customRouteFinished {
    background: var(--accent-soft);
    border-color: #bbf7d0;
    color: var(--accent-hover);
}

#hotroute {
    background: #fff1f2;
    border-color: #fecdd3;
    color: var(--hot);
}

#hotroute:hover {
    background: #ffe4e6;
}

#clearRoutes,
#clearCurrentRoute {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: var(--danger);
}

#clearRoutes:hover,
#clearCurrentRoute:hover {
    background: #fee2e2;
}

#loadPlay,
#saveToPicture {
    background: var(--surface);
}

/* ---------- Button groups ---------- */

.routebuttoncontainer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.buttoncontainer {
    flex: 1 1 108px;
    min-width: 108px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.buttoncontainer > * {
    width: 100%;
}

.savebuttoncontainer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.savecontainer {
    display: flex;
    justify-content: center;
}

/* ---------- Inputs ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    font-size: .85rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: .55em .7em;
    transition: border-color .12s ease, box-shadow .12s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--ring);
}

textarea {
    resize: vertical;
    min-height: 3em;
}

#formationSave {
    height: auto;
    cursor: pointer;
}

/* ---------- iOS-style toggle ---------- */

.switch {
    display: flex;
    align-items: center;
    gap: .6em;
    cursor: pointer;
    user-select: none;
    font-size: .82rem;
    font-weight: 600;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--border-strong);
    border-radius: 999px;
    flex-shrink: 0;
    transition: background-color .15s ease;
}

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease;
}

.switch input:checked + .switch-track {
    background: var(--accent);
}

.switch input:checked + .switch-track .switch-thumb {
    transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
    box-shadow: var(--ring);
}

/* ---------- Canvas ---------- */

#canvas {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-md);
    object-fit: none;
    min-width: 0;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

/* ---------- Mobile route/formation dropdowns ---------- */

.route-dropdown {
    display: none;
    width: 100%;
    height: auto;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- Modals (playbook + auth forms) ---------- */

.popup,
.formPopup,
.signUpformPopup {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(15, 23, 42, .5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease;
    z-index: 100;
}

.open-popup {
    opacity: 1;
    visibility: visible;
}

.popupheader {
    width: min(900px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popupheader h2 {
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text);
}

.gridcontainer {
    width: min(900px, 100%);
    max-height: 70vh;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: auto;
    padding: 16px;
}

.formgridcontainer {
    width: min(380px, 100%);
    max-height: 85vh;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: auto;
    padding: 8px 28px 28px;
}

.form-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.form-container h1 {
    font-size: 1.3rem;
    text-align: center;
    margin: 16px 0 8px;
}

.formItems {
    margin-top: 12px;
}

.form-container label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: -6px;
}

.form-container button[type="button"],
.form-container button[type="submit"],
#logIn,
#signUp {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    padding: .6em;
}

#logIn:hover,
#signUp:hover {
    background: var(--accent-hover);
}

#formClose,
#signUpFormClose,
#editClose,
#overwriteCancel,
#signupSuccessClose {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

#formClose:hover,
#signUpFormClose:hover,
#editClose:hover,
#overwriteCancel:hover,
#signupSuccessClose:hover {
    background: var(--surface-2);
}

.signup-success-text {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.5;
    text-align: center;
}

.signup-success-hint {
    color: var(--text-faint);
    font-size: .8rem;
    text-align: center;
}

/* ---------- Wristcoach export modal ---------- */

.exportcontainer {
    width: min(920px, 100%);
}

.exportcontrols {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.exportfield {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 130px;
    min-width: 110px;
}

.exportfield label {
    font-size: .8rem;
    color: var(--text-muted);
    margin: 0;
}

.segmented {
    display: flex;
    gap: 0;
}

.segbtn,
.form-container button.segbtn {
    flex: 1;
    border-radius: 0;
    box-shadow: none;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: .5em .6em;
}

.segbtn:first-child,
.form-container button.segbtn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.segbtn:last-child,
.form-container button.segbtn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
}

.segbtn.active,
.form-container button.segbtn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.wcslots {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    width: 100%;
    /* aspect-ratio is set from JS to mirror the configured page shape */
}

.wcslot {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--surface-2);
    min-height: 0;
}

.wcthumbwrap {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.wcslotnum {
    position: absolute;
    left: 4px;
    bottom: 4px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    border-radius: 6px;
    width: 1.8em;
    height: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcslotthumb {
    /* Absolute so the image's intrinsic size never inflates the page-shaped grid. */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.wcslot select {
    font-size: .8rem;
}

.exportactions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.exportactions > button {
    flex: 1;
}

#wcExportPdf,
#wcExportPng {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

#wcExportPdf:hover,
#wcExportPng:hover {
    background: var(--accent-hover);
}

#wcClose {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

#overwriteConfirm {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

#overwriteConfirm:hover {
    background: #b91c1c;
}

.overwrite-divider {
    color: var(--text-faint);
    font-size: .78rem;
    text-align: center;
    margin: 14px 0 2px;
}

.overwrite-error {
    color: var(--danger);
    font-size: .8rem;
}

.overwrite-error:empty {
    display: none;
}

#showPWcontainer {
    display: flex;
    align-items: center;
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 8px;
    gap: .4em;
}

#showPW,
#showPWsu {
    margin: 0;
    accent-color: var(--accent);
}

/* Text-link styled button (e.g. "Forgot password?") */
.linklike,
.form-container button.linklike {
    background: none;
    border: none;
    box-shadow: none;
    color: var(--accent-hover);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
    margin-top: 10px;
    align-self: flex-start;
}

.linklike:hover,
.form-container button.linklike:hover {
    background: none;
    border: none;
    color: var(--accent);
}

#close {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    width: 2em;
    height: 2em;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#close:hover {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: var(--danger);
}

/* ---------- Playbook tiles ---------- */

#playContainer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.playList {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .12s ease, transform .06s ease, border-color .12s ease;
}

.playList:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.playList img {
    display: block;
}

.playTitle {
    text-align: center;
    font-weight: 600;
    font-size: .9rem;
    padding: 8px;
    border-top: 1px solid var(--border);
}

/* ---------- Top nav tabs ---------- */

.navtabs {
    display: flex;
    gap: 4px;
    margin-right: auto;
    margin-left: 28px;
}

.navtab {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    padding: .45em .9em;
    border-radius: 8px;
    transition: background-color .12s ease, color .12s ease;
}

.navtab:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.navtab.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* Anchor styled as a button (e.g. "Open playbook") */
.linkbutton {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: .82rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: .5em .6em;
    transition: background-color .12s ease, border-color .12s ease;
}

.linkbutton:hover {
    background: var(--surface-2);
    border-color: var(--text-faint);
}

/* ---------- Playbook page ---------- */

.playbookpage {
    max-width: 1200px;
    margin: 0 auto;
}

.playbooktoolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.playbooktitle {
    font-size: 1.4rem;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text);
}

.toolbarcontrols {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbarcontrols input,
.toolbarcontrols select {
    width: auto;
    min-width: 150px;
}

.playbookmessage {
    color: var(--text-muted);
    font-size: .95rem;
    padding: 32px 0;
    text-align: center;
}

.playbookmessage:empty {
    display: none;
}

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

.playcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .12s ease, transform .06s ease;
}

.playcard:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.playcard-thumb {
    display: block;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.playcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.playcard-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.playcard-title {
    font-size: .98rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
    width: auto;
    margin: 0;
}

.playcard-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: .7rem;
    font-weight: 700;
    padding: .2em .6em;
    border-radius: 999px;
}

.playcard-date {
    color: var(--text-faint);
    font-size: .75rem;
}

.playcard-desc {
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playcard-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.playcard-actions > * {
    flex: 1;
}

.btn-primary-sm {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: .8rem;
    padding: .5em;
    border-radius: var(--radius-sm);
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    transition: background-color .12s ease;
}

.btn-primary-sm:hover {
    background: var(--accent-hover);
}

.btn-danger-sm {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: var(--danger);
}

.btn-danger-sm:hover {
    background: #fee2e2;
}

/* ============================================================
   Responsive: stack panels + swap buttons for dropdowns
   ============================================================ */

@media (max-width: 1100px) {
    .allcontent {
        padding: 14px;
    }

    .canvascontainer {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .canvasdisplay {
        order: -1;
        width: 100%;
        align-items: center;
    }

    .leftside,
    .rightside {
        width: 100%;
        max-width: 640px;
    }

    .dropdownable > button,
    .dropdownable > h3 {
        display: none;
    }

    .dropdownable > .route-dropdown {
        display: block;
    }

    .dropdownable {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 520px) {
    /* Compact single-row header: logo mark only, so the app gets the screen. */
    .navbar {
        height: 52px;
        flex-direction: row;
        padding: 0 10px;
        gap: 8px;
    }

    /* Hide the wordmark but keep the ::before logo square. */
    .navbar h1 {
        font-size: 0;
        gap: 0;
        flex-shrink: 0;
    }

    .navbar h1::before {
        width: 20px;
        height: 20px;
        box-shadow: 0 0 0 3px rgba(22, 163, 74, .2);
    }

    .navtabs {
        margin: 0 auto 0 4px;
        gap: 2px;
    }

    .navtab {
        font-size: .78rem;
        padding: .4em .5em;
        white-space: nowrap;
    }

    #authForm {
        gap: 6px;
    }

    #authForm button {
        font-size: .75rem;
        padding: .4em .6em;
    }

    /* The email is redundant on a small screen — the Log out button suffices. */
    #signedInText {
        display: none !important;
    }

    .allcontent {
        padding: 10px;
    }

    .playbooktoolbar {
        justify-content: center;
    }

    .toolbarcontrols {
        width: 100%;
    }

    .toolbarcontrols input,
    .toolbarcontrols select {
        flex: 1;
    }
}

/* ============================================================
   Toasts + confirm dialog (replace native alert/confirm)
   ============================================================ */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    max-width: min(360px, calc(100vw - 32px));
}

.toast {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-faint);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
    opacity: 1;
    transform: none;
}

.toast-success {
    border-left-color: var(--accent);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-info {
    border-left-color: #2563eb;
}

.dialog-card {
    width: min(380px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    text-align: center;
}

.dialog-title {
    font-size: 1.2rem;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 8px;
}

.dialog-message {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.dialog-actions {
    display: flex;
    gap: 8px;
}

.dialog-actions > button {
    flex: 1;
}

.dialog-confirm {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.dialog-confirm:hover {
    background: var(--accent-hover);
}

.dialog-confirm.danger {
    background: var(--danger);
    border-color: var(--danger);
}

.dialog-confirm.danger:hover {
    background: #b91c1c;
}
