:root {
    color-scheme: dark;
    --bg: #090c15;
    --panel: #111625;
    --panel-hover: #171f32;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --line: rgba(244, 63, 94, 0.12);
    --line-active: rgba(244, 63, 94, 0.35);
    --brand: #f43f5e;
    --brand-dark: #be123c;
    --brand-glow: rgba(244, 63, 94, 0.25);
    --accent: #14b8a6;
    --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.eyebrow {
    font-family: "Outfit", sans-serif;
    letter-spacing: -0.02em;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #fb7185;
}

.app-frame {
    min-height: 100vh;
    padding-left: 280px;
    transition: padding-left 0.2s ease;
}

body.sidebar-collapsed .app-frame {
    padding-left: 86px;
}

.topbar {
    align-items: stretch;
    background: rgba(17, 22, 37, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--line);
    bottom: 0;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    left: 0;
    padding: 1.35rem 1rem;
    position: fixed;
    top: 0;
    width: 280px;
    z-index: 100;
    transition: width 0.2s ease, padding 0.2s ease;
}

body.sidebar-collapsed .topbar {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    width: 86px;
}

.mobile-topbar {
    display: none;
}

.brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1;
    max-height: 52px;
    min-width: 0;
    overflow: hidden;
}

.brand:hover {
    opacity: 0.9;
}

.brand-logo {
    display: block;
    height: auto;
    max-height: 44px !important;
    max-width: 100% !important;
    object-fit: contain;
    width: auto;
}

.brand-logo-full {
    max-height: 44px;
    max-width: 260px;
}

.brand-logo-icon {
    max-height: 44px;
    max-width: 44px;
}

.mobile-brand-logo {
    max-height: 38px;
    max-width: 220px;
}

.sidebar-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
}

.sidebar-header .brand {
    flex: 1 1 auto;
}

.brand-logo-icon {
    display: none !important;
}

.topnav {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.2rem;
    justify-content: flex-start;
    min-height: 0;
    overflow-y: auto;
    padding: 0.35rem 0.15rem;
}

.topnav a {
    align-items: center;
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    font-size: 0.94rem;
    font-weight: 750;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    transition: var(--transition);
}

.topnav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.topnav a.active {
    background: rgba(244, 63, 94, 0.15);
    color: var(--brand);
}

.nav-icon,
.account-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    color: var(--text);
    display: inline-flex;
    flex: 0 0 1.5rem;
    height: 1.5rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.5rem;
    width: 1.5rem;
}

.nav-icon svg,
.account-icon svg {
    display: block;
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.topnav a.active .nav-icon {
    background: rgba(244, 63, 94, 0.16);
    color: var(--brand);
}

.account-profile-link .account-icon {
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc;
}

.account-logout-link .account-icon {
    background: rgba(244, 63, 94, 0.16);
    color: var(--brand);
}

.nav-label,
.account-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 1.2rem;
    font-weight: 850;
    justify-content: center;
    margin-left: auto;
    min-height: 36px;
    padding: 0;
    transition: var(--transition);
    width: 36px;
}

.sidebar-toggle:hover {
    background: rgba(244, 63, 94, 0.15);
    color: var(--brand);
}

.sidebar-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

body.sidebar-collapsed .sidebar-header .brand-logo {
    max-width: 54px !important;
    object-position: left center;
}

body.sidebar-collapsed .sidebar-header {
    gap: 0.4rem;
}

body.sidebar-collapsed .brand-logo-full {
    display: none !important;
}

body.sidebar-collapsed .brand-logo-icon {
    display: block !important;
    max-height: 34px !important;
    max-width: 34px !important;
}

body.sidebar-collapsed .topnav a,
body.sidebar-collapsed .topbar-account a {
    justify-content: center;
    overflow: hidden;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
}

body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .account-label {
    display: none;
}

body.sidebar-collapsed .sidebar-toggle {
    margin-left: 0;
    min-height: 30px;
    width: 30px;
}

body.sidebar-collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.topbar-account {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.35rem;
    padding-top: 1rem;
}

.topbar-account a {
    align-items: center;
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    font-size: 0.86rem;
    font-weight: 750;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
}

.topbar-account a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.topbar-account .account-profile-link {
    color: #38bdf8;
}

.topbar-account .account-profile-link:hover {
    background: rgba(14, 165, 233, 0.12);
    color: #7dd3fc;
}

.topbar-account .account-logout-link {
    background: rgba(244, 63, 94, 0.15);
    border-radius: 999px;
    color: var(--brand);
    font-weight: 850;
    text-align: center;
}

.topbar-account .account-logout-link:hover {
    background: var(--brand);
    color: #ffffff;
}

.mobile-nav {
    display: none;
    position: relative;
}

.mobile-nav summary {
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 0.22rem;
    height: 40px;
    justify-content: center;
    list-style: none;
    padding: 0;
    width: 44px;
    transition: var(--transition);
}

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

.mobile-nav summary span {
    background: var(--text);
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 20px;
}

.mobile-nav nav {
    background: var(--panel);
    border: 1px solid var(--line-active);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.15rem;
    min-width: 220px;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mobile-nav nav a {
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
    padding: 0.65rem 0.75rem;
    transition: var(--transition);
}

.mobile-nav nav a:hover {
    background: rgba(244, 63, 94, 0.15);
    color: var(--brand);
}

.mobile-nav nav a.active {
    background: rgba(244, 63, 94, 0.15);
    color: var(--brand);
}

.shell {
    width: min(1240px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.5rem;
}

.page-heading h1 {
    margin: 0;
    color: var(--text);
    font-size: 2.5rem;
    font-weight: 850;
    line-height: 1.1;
}

.eyebrow {
    margin: 0 0 0.5rem;
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.user-meta {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.notice {
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--border-radius);
    background: rgba(245, 158, 11, 0.05);
    color: #fde047;
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
}

.notice code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.dashboard-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.dashboard-grid.dashboard-grid-single {
    grid-template-columns: 1fr;
}

.dashboard-action-sections {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    align-items: start;
    margin-bottom: 1.5rem;
}

.dashboard-action-section {
    background: rgba(17, 22, 37, 0.58);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.dashboard-action-section-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.dashboard-action-section-head h2 {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.2;
    margin: 0;
}

.dashboard-action-section-head span {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-weight: 850;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
}

.dashboard-priority-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fill, minmax(150px, 190px));
    justify-content: start;
    margin-bottom: 1.5rem;
}

.dashboard-action-section .dashboard-priority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.dashboard-priority-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: var(--text);
    display: grid;
    gap: 0.35rem;
    min-height: 108px;
    padding: 1rem;
}

.dashboard-priority-card:hover {
    border-color: var(--line-active);
    color: var(--text);
    transform: translateY(-2px);
}

.dashboard-priority-card span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-priority-card strong {
    color: var(--text);
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1;
}

.dashboard-priority-card small {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.35;
}

.dashboard-priority-warning {
    border-left: 4px solid #f59e0b;
}

.dashboard-priority-info {
    border-left: 4px solid #0ea5e9;
}

.dashboard-severity-low {
    border-left: 4px solid #0ea5e9;
}

.dashboard-severity-medium {
    border-left: 4px solid #f59e0b;
}

.dashboard-severity-high {
    border-left: 4px solid #ef4444;
}

.dashboard-severity-low:hover {
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.12);
}

.dashboard-severity-medium:hover {
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.12);
}

.dashboard-severity-high:hover {
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.16);
}

.dashboard-empty-state {
    margin-top: 1.5rem;
}

.dashboard-snapshot {
    margin-bottom: 1.5rem;
}

.dashboard-snapshot-head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dashboard-snapshot-head h2 {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.2;
    margin: 0;
}

.dashboard-snapshot-head span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-snapshot-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dashboard-snapshot-card {
    background: rgba(17, 22, 37, 0.58);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    color: var(--text);
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
}

.dashboard-snapshot-card:hover {
    border-color: var(--line-active);
    color: var(--text);
}

.dashboard-snapshot-card span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-snapshot-card strong {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.dashboard-snapshot-card small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.tool-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-active);
    box-shadow: 0 20px 40px rgba(244, 63, 94, 0.08);
}

.tool-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tool-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1.3;
}

.tool-card span {
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #2dd4bf;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.75rem 0 1.25rem;
}

.tool-card a {
    align-self: flex-start;
    margin-top: auto;
    border: 1px solid var(--brand);
    border-radius: 8px;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0.6rem 1rem;
    transition: var(--transition);
}

.tool-card a:hover {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 0 16px var(--brand-glow);
}

.dashboard-alert-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1.5rem;
}

.dashboard-alert-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: var(--text);
    display: grid;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}

.dashboard-alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(244, 63, 94, 0.12);
}

.dashboard-alert-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-alert-card strong {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
}

.dashboard-alert-warning {
    border-left-color: #f59e0b;
}

.dashboard-alert-info {
    border-left-color: #0ea5e9;
}

.dashboard-events-panel {
    margin-bottom: 1.5rem;
}

.dashboard-work-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    margin-bottom: 1.5rem;
}

.dashboard-work-panel {
    display: grid;
    gap: 1rem;
}

.dashboard-event-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-event-row {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-top: 0.75rem;
    transition: var(--transition);
}

a.dashboard-event-row:hover strong {
    color: var(--brand);
}

.dashboard-event-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.dashboard-event-row>div:first-child {
    display: grid;
    gap: 0.2rem;
}

.dashboard-event-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.login-page {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: radial-gradient(circle at 10% 10%, rgba(244, 63, 94, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
        #06080f;
    background-size: 200% 200%;
    animation: ambientShift 12s ease-in-out infinite alternate;
}

@keyframes ambientShift {
    0% {
        background-position: 0% 0%;
    }

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

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 16px rgba(244, 63, 94, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    50% {
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 28px rgba(244, 63, 94, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.login-card {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    border-radius: 16px;
    background: rgba(13, 17, 28, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.7rem 2.15rem 2.25rem;
    opacity: 0;
    animation:
        cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards,
        pulseGlow 8s ease-in-out infinite;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card:hover {
    border-color: rgba(244, 63, 94, 0.35);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), 0 0 32px rgba(244, 63, 94, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.login-logo {
    display: block;
    height: auto;
    margin: 0 auto 1.5rem;
    max-width: 130px;
    width: 40%;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    opacity: 0;
    animation: textFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.login-page h1 {
    margin: 0;
    text-align: center;
    opacity: 0;
    animation: textFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.login-intro {
    margin: 0.25rem 0 1.6rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    animation: textFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.login-tagline {
    color: #ffffff;
    font-family: "Outfit", sans-serif;
    font-size: clamp(1.15rem, 4vw, 1.45rem);
    font-weight: 850;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0.75rem auto 0.25rem;
    text-align: center;
    opacity: 0;
    animation: textFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.38s forwards;
}

.login-card form {
    opacity: 0;
    animation: textFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.62s forwards;
}

.alert {
    border-radius: 8px;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    animation: textFadeIn 0.3s ease-out forwards;
}

.alert.error {
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
}

.login-card input {
    background: rgba(8, 12, 22, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card input:focus {
    background: rgba(10, 15, 26, 0.85);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2), 0 0 16px rgba(244, 63, 94, 0.1);
    outline: none;
}

label {
    display: block;
    margin: 1rem 0 0.5rem;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

input,
select,
textarea,
.form-control {
    appearance: none;
    box-sizing: border-box;
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #181d2a;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 46px;
    padding: 0.7rem 1rem;
    transition: var(--transition);
}

select {
    background-image:
        linear-gradient(45deg, transparent 50%, #9ca3af 50%),
        linear-gradient(135deg, #9ca3af 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 2.35rem;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
    outline: none;
    background: #1e2536;
}

input[type="hidden"] {
    display: none;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand);
    appearance: auto;
    display: inline-block;
    flex: 0 0 auto;
    height: 1.1rem;
    min-height: 0 !important;
    padding: 0 !important;
    width: 1.1rem;
}

body input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]),
body select,
body textarea,
body .form-control {
    min-height: 46px !important;
    padding: 0.7rem 1rem !important;
    text-indent: 0 !important;
}

body select,
body select.form-control {
    padding-right: 2.35rem !important;
}

body textarea {
    min-height: 80px !important;
}

.login-card button {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    margin-top: 1.25rem;
    padding: 0.8rem;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
    transition: var(--transition);
}

.login-card button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.login-card button:hover {
    background: linear-gradient(135deg, #fb7185 0%, var(--brand) 100%);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
    transform: translateY(-2px);
}

.login-card button:hover::after {
    transform: translateX(120%);
}

@media (prefers-reduced-motion: reduce) {

    .login-page::before,
    .login-page::after,
    .login-motion-line,
    .login-card,
    .login-card::before {
        animation: none !important;
    }
}

.module-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: -0.5rem 0 1.5rem;
}

.module-meta {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 40px;
    padding: 0.6rem 1.25rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-dark {
    background: #1e2536;
    color: #ffffff;
    border: 1px solid var(--line);
}

.btn-dark:hover {
    background: #273046;
    border-color: var(--line-active);
}

.btn-light {
    background: var(--panel);
    border-color: var(--line);
    color: var(--text);
}

.btn-light:hover {
    background: var(--panel-hover);
    border-color: var(--line-active);
}



.btn-brand,
.btn-primary {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--brand-glow);
}

.btn-brand:hover,
.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.22);
}

.btn-success:hover {
    background: #14b8a6;
    border-color: #14b8a6;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #1e2536;
    border-color: var(--line);
    color: var(--text);
}

.btn-secondary:hover {
    background: #273046;
    color: #ffffff;
}

.btn-danger {
    background: #991b1b;
    border-color: #991b1b;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-success {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.btn-success:hover {
    background: #14b8a6;
    transform: translateY(-1px);
}

.role-actions-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
}

.role-actions-row form {
    margin: 0;
}

.bg-success {
    background: #0f766e;
}

.bg-danger {
    background: #991b1b;
}

.filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.filters>div {
    min-width: 170px;
}

.filters .filter-wide {
    flex: 1 1 300px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.section-title {
    margin: 0 0 0.75rem;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.3;
}

.section-header-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-header-row .section-title {
    margin-bottom: 0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.kpi-grid>a.card {
    color: inherit;
    display: block;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.kpi-grid>a.card:hover {
    border-color: var(--brand);
    box-shadow: 0 10px 28px rgba(244, 63, 94, 0.15);
    color: inherit;
    transform: translateY(-1px);
}

.kpi-title {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.kpi-value {
    margin: 0;
    color: var(--text);
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.1;
}

.kpi-sub {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.analytics-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.event-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.event-name {
    color: var(--text);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.bar-wrap {
    grid-column: 1 / -1;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b91c1c, #0f766e);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.32rem 0.6rem;
    text-transform: uppercase;
}

.status-new {
    background: rgba(244, 63, 94, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.status-contacted {
    background: rgba(245, 158, 11, 0.12);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-booked {
    background: rgba(16, 185, 129, 0.12);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-closed {
    background: rgba(156, 163, 175, 0.12);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

.status-converted {
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.inline-form {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.6rem;
}

.inline-form label {
    margin: 0.15rem 0 0;
}

.inline-form textarea {
    min-height: 64px;
    resize: vertical;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.btn-quick {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #1b2030;
    color: var(--text);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    padding: 0.3rem 0.6rem;
    transition: var(--transition);
}

.btn-quick:hover {
    background: #252e46;
    border-color: var(--line-active);
}

.lead-inbox-list {
    display: grid;
    gap: 0.85rem;
}

.lead-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    padding: 1rem;
}

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

.lead-card-header h3 {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.25;
    margin: 0.15rem 0 0;
}

.lead-id {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.lead-detail-grid>div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.lead-detail-grid a,
.lead-detail-grid span,
.lead-detail-grid strong {
    overflow-wrap: anywhere;
}

.lead-message {
    background: #181d2a;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    line-height: 1.45;
    margin-top: 0.9rem;
    padding: 0.75rem 0.85rem;
}

.lead-card-manage {
    background: #181d2a;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.85rem;
}

.lead-card-manage h3 {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 850;
    margin: 0 0 0.65rem;
}

.lead-card-manage form {
    display: grid;
    gap: 0.55rem;
}

.lead-card-manage textarea {
    min-height: 96px;
    resize: vertical;
}

.lead-quick-actions {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lead-quick-actions .btn-quick {
    min-height: 34px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.lead-save-button {
    width: 100%;
}

.lead-table td {
    min-width: 130px;
}

.lead-table td:nth-child(2),
.lead-table td:nth-child(3),
.lead-table td:nth-child(4),
.lead-table td:nth-child(5) {
    min-width: 190px;
}

.lead-update-modal {
    max-width: min(760px, calc(100vw - 2rem));
    width: 760px;
}

.lead-update-modal h3 {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 850;
    margin: 0 0 0.25rem;
}

.lead-update-form {
    margin-top: 1rem;
}

.lead-update-form textarea {
    min-height: 110px;
    resize: vertical;
}

.inline-form.lead-convert-form {
    display: inline-flex;
    margin: 0;
}

.notice.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.notice.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    color: #a7f3d0;
}

.notice.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
    color: #fde047;
}

.notice-dismissible {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.notice-close {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: currentColor;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    font-weight: 850;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.notice-close:hover {
    background: rgba(15, 23, 42, 0.08);
}

.event-save-message {
    display: none;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-tabs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.35rem;
    background: #181d2a;
    border-radius: 999px;
    border: 1px solid var(--line);
    margin: 1.5rem 0;
    list-style: none;
}

.admin-tabs .nav-item {
    margin: 0;
}

.admin-tabs .nav-link {
    border: none !important;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    min-height: 36px;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}

.admin-tabs .nav-link:hover {
    color: var(--text);
}

.admin-tabs .nav-link.active {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--brand-glow);
}

.platform-admin-tabs {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100% !important;
    border-radius: 12px !important;
    gap: 0.25rem !important;
    background: #181d2a !important;
    padding: 0.35rem !important;
    border: 1px solid var(--line) !important;
    scrollbar-width: none;
    /* Firefox */
}

.platform-admin-tabs::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.platform-admin-tabs .nav-item {
    flex: 1 0 auto !important;
    display: flex !important;
}

.platform-admin-tabs .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 38px !important;
    padding: 0.5rem 1rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    box-sizing: border-box !important;
    transition: var(--transition);
}

.platform-admin-tabs .nav-link.active {
    background: var(--brand) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px var(--brand-glow) !important;
}

.platform-widget-form {
    align-items: start;
    max-width: 920px;
}

.platform-scope-options label {
    align-items: center;
    display: flex !important;
    gap: 0.45rem;
    line-height: 1.35;
    margin-top: 0.55rem !important;
}

.platform-scope-options input[type="checkbox"] {
    flex: 0 0 auto;
}

.admin-panel {
    margin-top: 1rem;
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.85rem;
}

.form-grid>* {
    min-width: 0;
}

.form-span-3 {
    grid-column: span 3;
}

.form-span-4 {
    grid-column: span 4;
}

.form-span-5 {
    grid-column: span 5;
}

.form-span-6 {
    grid-column: span 6;
}

.form-span-7 {
    grid-column: span 7;
}

.form-span-8 {
    grid-column: span 8;
}

.form-span-9 {
    grid-column: span 9;
}

.form-span-12 {
    grid-column: 1 / -1;
}

.form-help {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.copy-code-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(620px, 100%);
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
}

.copy-code-button:hover,
.copy-code-button:focus-visible {
    border-color: var(--brand);
    outline: none;
}

.copy-code-button code {
    overflow-wrap: anywhere;
}

.copy-icon {
    position: relative;
    flex: 0 0 auto;
    width: 14px;
    height: 16px;
}

.copy-icon::before,
.copy-icon::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 12px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
}

.copy-icon::before {
    left: 0;
    top: 0;
    opacity: 0.55;
}

.copy-icon::after {
    right: 0;
    bottom: 0;
    background: var(--bg-card);
}

.copy-state {
    flex: 0 0 48px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: right;
}

.copy-code-button.is-copied {
    border-color: #16a34a;
}

.copy-code-button.is-copied .copy-state {
    color: #16a34a;
    font-weight: 700;
}

.settings-grid,
.profile-grid,
.permission-grid,
.check-grid {
    display: grid;
    gap: 0.85rem;
}

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

.profile-grid {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-access-panel {
    display: grid;
    gap: 1rem;
    grid-column: 1 / -1;
}

.profile-access-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.profile-access-heading .section-title,
.profile-access-heading .muted {
    margin-bottom: 0;
}

.profile-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.profile-role-chip {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 8px;
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0.7rem;
}

.profile-role-chip strong {
    color: #67e8f9;
}

.profile-role-chip span {
    color: var(--muted);
    font-size: 0.78rem;
}

.profile-permission-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-permission-group {
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem;
}

.profile-permission-group h3 {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0 0 0.55rem;
}

.profile-permission-group ul {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-permission-group li {
    color: var(--muted);
    display: flex;
    font-size: 0.82rem;
    gap: 0.4rem;
}

.profile-permission-group li>span {
    color: #14b8a6;
    font-weight: 900;
}

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

.user-card-grid {
    display: grid;
    gap: 1rem;
}

.user-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.widget-accordion {
    background: rgba(255, 255, 255, .018);
    border: 1px solid rgba(148, 163, 184, .14);
    border-left: 4px solid var(--bg-accent, #06b6d4);
    border-radius: 10px;
    grid-column: 1 / -1;
    overflow: hidden;
}

.widget-visual-controls-title {
    font-size: 20px;
    font-weight: 950;
    letter-spacing: .05em;
    line-height: 1.15;
    text-transform: uppercase;
}

.widget-accordion-stack {
    display: grid;
    gap: 14px;
}

.settings-section-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.15rem;
}

.settings-section-head>div {
    min-width: 0;
}

.settings-section-head .muted {
    margin-bottom: 0;
}

.settings-category-actions {
    padding: 0 16px 16px;
}

.widget-accordion-toggle {
    align-items: center;
    background: rgba(255, 255, 255, .025);
    border: 0;
    color: var(--text-color, var(--text));
    cursor: pointer;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 68px;
    padding: 14px 16px;
    text-align: left;
    width: 100%;
}

.widget-accordion-toggle:hover {
    background: rgba(255, 255, 255, .045);
}

.widget-accordion-title strong {
    display: block;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: .06em;
    line-height: 1.1;
    text-transform: uppercase;
}

.widget-accordion-title span {
    color: var(--text-color, var(--text));
    display: block;
    font-size: 12px;
    margin-top: 3px;
    opacity: .62;
}

.widget-accordion-icon {
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    color: var(--bg-accent, #06b6d4);
    display: inline-flex;
    font-size: 0;
    height: 32px;
    justify-content: center;
    line-height: 1;
    position: relative;
    transition: background .24s ease, border-color .24s ease;
    width: 32px;
}

.widget-accordion-icon::before,
.widget-accordion-icon::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: 2px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform .24s ease;
    width: 12px;
}

.widget-accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.widget-accordion.is-open .widget-accordion-icon {
    background: rgba(6, 182, 212, .12);
    border-color: rgba(6, 182, 212, .35);
}

.widget-accordion.is-open .widget-accordion-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.widget-accordion.is-open .widget-accordion-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.widget-accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: .35;
    transition: grid-template-rows .32s ease, opacity .24s ease;
}

.widget-accordion.is-open .widget-accordion-panel {
    grid-template-rows: 1fr;
    opacity: 1;
}

.widget-accordion-panel-inner {
    overflow: hidden;
}

.tenant-billing-panel-content {
    padding: 16px;
}

.widget-accordion-content-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    padding: 16px;
}

.user-accordion-meta {
    align-items: center;
    display: inline-flex;
    gap: 0.6rem;
}

.venue-list-panel {
    padding: 0;
}

.venue-list-panel>.muted {
    margin: 0;
    padding: 1rem;
}

.booking-dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.booking-dashboard-card {
    align-content: start;
    display: grid;
    gap: 0.7rem;
}

.booking-dashboard-wide {
    grid-column: 1 / -1;
}

.booking-dashboard-row {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 48px;
    padding-top: 0.7rem;
}

.booking-dashboard-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.booking-dashboard-row>div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.booking-dashboard-callout {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.45;
    margin: 0;
}

.booking-dashboard-callout strong {
    font-size: 1.4rem;
}

.venue-table td {
    min-width: 130px;
}

.venue-table td:nth-child(2),
.venue-table td:nth-child(3),
.venue-table td:nth-child(4) {
    min-width: 190px;
}

.venue-table td>span,
.venue-cell-muted,
.venue-name-link {
    display: block;
}

.venue-name-link {
    color: var(--text);
    font-weight: 850;
}

.venue-cell-muted {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
    margin-top: 0.18rem;
    overflow-wrap: anywhere;
}

.venue-row-actions {
    flex-wrap: nowrap;
}

.venue-note-preview {
    color: var(--text);
    line-height: 1.45;
    margin: 0;
}

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

.venue-detail-header h2 {
    color: var(--text);
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1.15;
    margin: 0.55rem 0 0.25rem;
}

.venue-back-link {
    color: var(--muted);
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.venue-detail-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.venue-detail-main,
.venue-detail-sidebar {
    display: grid;
    gap: 1rem;
}

.venue-action-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.venue-action-grid>form {
    margin-top: 0;
}

.venue-action-empty {
    background: #181d2a;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem;
}

.venue-action-empty h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0 0 0.35rem;
}

.venue-info-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.venue-info-list dt {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.venue-info-list dd {
    color: var(--text);
    margin: -0.35rem 0 0;
    overflow-wrap: anywhere;
}

.venue-edit-panel summary {
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
}

.venue-edit-full {
    margin-bottom: 1rem;
}

.venue-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.55rem;
}

.venue-subnav a {
    border-radius: 999px;
    color: var(--muted);
    font-weight: 850;
    padding: 0.45rem 0.75rem;
    text-decoration: none;
}

.venue-subnav a.active {
    background: var(--accent);
    color: #ffffff;
}

.venue-pipeline-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0;
    padding: 0.55rem;
}

.venue-pipeline-nav a {
    border-radius: 999px;
    color: var(--muted);
    font-weight: 850;
    padding: 0.45rem 0.75rem;
    text-decoration: none;
}

.venue-pipeline-nav a.active {
    background: var(--accent);
    color: #ffffff;
}

.venue-overview-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.venue-overview-grid>div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem;
}

.mini-label {
    color: var(--muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.venue-overview-grid strong {
    color: var(--text);
    display: block;
    font-size: 1.15rem;
    margin-top: 0.25rem;
}

.followup-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.95rem;
    padding: 0.18rem 0.55rem;
}

.followup-neutral {
    background: rgba(156, 163, 175, 0.12);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.followup-upcoming {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.followup-today {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.followup-overdue {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.reply-waiting-pill {
    align-items: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 999px;
    color: #f87171;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.24rem 0.58rem;
    text-decoration: none;
    width: fit-content;
}

.reply-waiting-link:hover,
.reply-waiting-link:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
    text-decoration: none;
}

.booking-attention-card {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: inset 4px 0 0 var(--brand);
}

.booking-reply-row {
    align-items: flex-start;
}

.venue-overview-actions {
    margin-top: 1rem;
}

.venue-overview-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.venue-overview-card {
    display: grid;
    gap: 0.55rem;
}

.venue-overview-card h3 {
    font-size: 1rem;
    margin: 0;
}

.venue-overview-card p {
    margin: 0;
}

.venue-linked-event {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.15rem;
    padding-top: 0.55rem;
}

.venue-linked-event:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.venue-event-list {
    display: grid;
    gap: 0.75rem;
}

.venue-event-list h3 {
    color: var(--text);
    font-size: 1rem;
    margin: 0.4rem 0 0;
}

.venue-event-card {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    padding: 0.85rem;
}

.venue-event-card>div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
}

.venue-event-card>div strong,
.venue-event-card>div .muted {
    flex: 1 1 100%;
}

.calendar-prep-panel {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.calendar-prep-status {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.settings-status-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.75rem 0 1rem;
}

.calendar-status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    padding: 0.22rem 0.6rem;
}

.calendar-status-muted {
    background: rgba(156, 163, 175, 0.12);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.calendar-status-synced {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.calendar-status-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.calendar-status-error {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.calendar-sync-placeholder {
    margin-top: 0.35rem;
    opacity: 0.75;
}

.calendar-sync-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 6px;
    color: #fca5a5;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 0.4rem;
    max-width: 280px;
    padding: 0.4rem 0.55rem;
}

.calendar-check-panel .table-wrap {
    margin-top: 0.75rem;
}

.calendar-check-subtable {
    margin-bottom: 1rem;
}

.subsection-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 1rem 0 0.35rem;
}

.calendar-raw-details {
    margin-top: 0.45rem;
}

.calendar-raw-details summary {
    color: var(--accent);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 800;
}

.calendar-raw-details dl {
    display: grid;
    gap: 0.25rem 0.75rem;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 0.5rem 0 0;
}

.calendar-raw-details dt {
    color: var(--muted);
    font-weight: 800;
}

.calendar-raw-details dd {
    margin: 0;
    min-width: 0;
}

.calendar-raw-details code,
.calendar-raw-details pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.calendar-raw-details pre {
    background: #181d2a;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.78rem;
    margin: 0;
    padding: 0.4rem;
}

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

.calendar-action-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.calendar-action-menu {
    margin-top: 0.45rem;
    position: relative;
}

.calendar-action-menu summary {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 800;
    list-style: none;
    min-height: 34px;
    padding: 0.42rem 0.78rem;
}

.calendar-action-menu summary::-webkit-details-marker {
    display: none;
}

.calendar-action-menu summary::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    content: "";
    margin-left: 0.45rem;
}

.calendar-action-menu[open] summary {
    background: var(--panel-hover);
}

.calendar-action-menu form {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.2rem;
    margin-top: 0.35rem;
    min-width: 180px;
    padding: 0.4rem;
    position: absolute;
    right: 0;
    z-index: 20;
}

.calendar-action-menu button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 750;
    padding: 0.52rem 0.65rem;
    text-align: left;
}

.calendar-action-menu button:hover {
    background: var(--panel-hover);
}

.calendar-action-menu .calendar-menu-sync {
    color: #38bdf8;
}

.calendar-action-menu .calendar-menu-sync:hover {
    background: rgba(56, 189, 248, 0.12);
}

.calendar-action-menu .calendar-menu-replace {
    color: #fbbf24;
}

.calendar-action-menu .calendar-menu-replace:hover {
    background: rgba(245, 158, 11, 0.12);
}

.calendar-action-menu .calendar-menu-danger {
    color: #f87171;
}

.calendar-action-menu .calendar-menu-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.event-detail-modal {
    background: #1f293d;
    border: 2px solid var(--brand);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 30px rgba(244, 63, 94, 0.25);
    max-width: min(94vw, 720px);
    padding: 1.5rem;
    width: 720px;
}

.event-detail-modal::backdrop {
    background: rgba(2, 4, 8, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.event-detail-close-form {
    display: flex;
    justify-content: flex-end;
}

.event-detail-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.event-detail-header h2 {
    color: var(--text);
    font-size: 1.35rem;
    margin: 0 0 0.2rem;
}

.event-detail-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.event-readiness-list {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 1rem;
}

.event-readiness-item {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 0.6rem;
    padding: 0.65rem;
}

.event-readiness-item strong {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.28rem 0.45rem;
    text-transform: uppercase;
}

.event-readiness-item.complete strong {
    background: #dcfce7;
    color: #166534;
}

.event-readiness-item.needed strong {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.event-readiness-item span {
    color: var(--text);
    display: grid;
    font-weight: 800;
    gap: 0.15rem;
}

.event-readiness-item small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.event-detail-grid>div {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 0.7rem;
}

.event-detail-grid dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    margin-bottom: 0.18rem;
    text-transform: uppercase;
}

.event-detail-grid dd {
    color: var(--text);
    font-size: 0.96rem;
    margin: 0;
    white-space: pre-wrap;
}

.event-detail-wide {
    grid-column: 1 / -1;
}

.event-rsvp-missing {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    color: #fbbf24;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1;
    margin-top: 0.25rem;
    padding: 0.28rem 0.55rem;
}

.audit-log-header {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.audit-log-table td {
    vertical-align: top;
}

.audit-action-pill {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #3730a3;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 850;
    padding: 0.28rem 0.55rem;
    white-space: nowrap;
}

.audit-details {
    max-width: 520px;
    white-space: pre-wrap;
}

.pagination-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.oauth-token-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    margin: 0.75rem 0;
}

.code-sample {
    background: #181d2a;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    margin: 0.75rem 0 1rem;
    overflow-x: auto;
    padding: 0.85rem 1rem;
}

.card-heading-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.card-heading-row .section-title {
    margin: 0;
}

.venue-edit-full summary {
    align-items: center;
    display: flex;
    min-height: 34px;
}

.venue-edit-form,
.venue-email-form {
    margin-top: 1rem;
}

.message-log-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 0.25rem;
    margin-bottom: 0.6rem;
    padding: 0.75rem;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.message-log-row strong,
.message-log-row span,
.message-log-row em {
    color: var(--muted);
    font-size: 0.9rem;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.message-log-row strong {
    color: var(--text);
    font-weight: 700;
}

.message-log-row p {
    color: var(--text);
    margin: 0.35rem 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.timeline-row-head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.timeline-meta .timeline-stat {
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 999px;
    color: #14b8a6;
    font-weight: 800;
    padding: 0.1rem 0.5rem;
}

.timeline-body-toggle {
    margin-top: 0.35rem;
}

.timeline-body-toggle summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 850;
}

.message-log-row .timeline-body-text {
    line-height: 1.5;
}

.venue-thread-list {
    display: grid;
    gap: 0.85rem;
}

.venue-thread-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.85rem;
}

.venue-thread-needs-reply {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: inset 4px 0 0 var(--brand);
}

.venue-thread-card>summary {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: space-between;
}

.venue-thread-card>summary strong,
.venue-thread-card>summary small {
    display: block;
}

.venue-thread-card>summary small,
.venue-thread-preview {
    margin-top: 0.25rem;
}

.venue-thread-toggle-label::before {
    content: "Open ";
}

.venue-thread-card[open] .venue-thread-toggle-label::before {
    content: "Hide ";
}

.venue-thread-messages {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.venue-thread-reply {
    border-top: 1px solid var(--line);
    margin-top: 0.85rem;
    padding-top: 0.85rem;
}

.venue-thread-actions,
.venue-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.venue-thread-actions {
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
}

.venue-message-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.55rem;
}

.venue-live-reply-row {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

.venue-live-reply-notice {
    color: #93c5fd;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.venue-message-form {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem;
}

.venue-update-modal {
    background: #1f293d;
    border: 2px solid var(--brand);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 30px rgba(244, 63, 94, 0.25);
    max-width: min(92vw, 480px);
    padding: 1.5rem;
    position: relative;
    width: 480px;
}

.confirm-modal {
    max-width: min(92vw, 460px);
}

.confirm-modal-content {
    margin: 0;
    padding-top: 0.25rem;
}

.confirm-copy-value {
    display: none;
    margin-top: 0.75rem;
    min-height: 90px;
    width: 100%;
}

.venue-update-modal .notice-close {
    position: absolute;
    right: 0.85rem;
    top: 0.85rem;
    color: var(--text);
}

.venue-update-modal .notice-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.venue-update-modal::backdrop {
    background: rgba(2, 4, 8, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.venue-modal-close-form {
    display: flex;
    justify-content: flex-end;
}

.venue-update-form {
    margin-top: 0.15rem;
}

.venue-message-form h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0 0 0.25rem;
}

.venue-message-form .muted {
    margin: 0;
}

.venue-unmatched-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.venue-attach-form {
    align-items: end;
    margin-top: 0.75rem;
}

.venue-email-form {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem;
}

.venue-email-form h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
}

.venue-check-row {
    margin-top: 0.75rem;
}

.venue-status-booked {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.venue-status-prospect {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.venue-status-contacted {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.venue-status-follow-up-needed {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.venue-status-in-discussion {
    background: rgba(20, 184, 166, 0.12);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.venue-status-dates-full {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.venue-status-not-a-fit {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.venue-status-do-not-contact {
    background: rgba(17, 24, 39, 0.8);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.permission-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.85rem;
}

.permission-group h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0 0 0.6rem;
}

.check-grid {
    gap: 0.35rem;
}

.check-row {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    margin: 0;
}

.check-row input[type="checkbox"] {
    flex: 0 0 auto;
    min-height: 0;
    width: auto;
}

.check-row span {
    color: var(--text);
    font-size: 0.95rem;
}

.role-toggle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.role-toggle {
    cursor: pointer;
    display: inline-flex;
    margin: 0;
}

.role-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-toggle span {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #1b2030;
    color: var(--muted);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 850;
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.role-toggle input:checked+span {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.role-toggle:hover span {
    border-color: var(--line-active);
    color: var(--text);
}

.role-toggle input:focus-visible+span {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.16);
}

.role-toggle input:disabled+span {
    cursor: not-allowed;
    opacity: 0.72;
}

.songmenu-admin .table-responsive {
    overflow-x: auto;
}

.songmenu-admin .table,
.songmenu-admin .small,
.songmenu-admin .text-muted {
    color: var(--text) !important;
    font-family: inherit;
    font-size: 0.95rem;
}

/* Explicit Table Text Overrides for Song Menu Admin */
.songmenu-admin .data-table {
    border-collapse: collapse !important;
    width: 100% !important;
}

.songmenu-admin .data-table th,
.songmenu-admin .data-table td {
    border-bottom: 1px solid var(--line) !important;
    color: var(--text) !important;
    padding: 0.75rem 0.65rem !important;
    background: transparent !important;
}

.songmenu-admin .data-table th {
    color: var(--muted) !important;
    font-size: 0.8rem !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.songmenu-admin .data-table td strong {
    color: var(--text) !important;
}

.song-edit-trigger {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: grid;
    font: inherit;
    margin: -0.25rem;
    max-width: 100%;
    padding: 0.25rem;
    position: relative;
    text-align: left;
}

.song-edit-trigger strong,
.song-edit-trigger em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-edit-trigger em {
    color: var(--muted);
}

.song-edit-hint {
    color: #22d3ee;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    background: #111827;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 5px;
    left: 0.2rem;
    letter-spacing: 0.04em;
    opacity: 0;
    padding: 0.15rem 0.3rem;
    pointer-events: none;
    position: absolute;
    text-transform: uppercase;
    top: calc(100% - 0.15rem);
    transform: translateY(-2px);
    transition: opacity 160ms ease, transform 160ms ease;
    white-space: nowrap;
    z-index: 5;
}

.song-edit-trigger:hover .song-edit-hint,
.song-edit-trigger:focus-visible .song-edit-hint {
    opacity: 1;
    transform: translateY(0);
}

.song-edit-trigger:hover strong,
.song-edit-trigger:focus-visible strong {
    color: #67e8f9 !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.song-edit-trigger:focus-visible {
    border-radius: 6px;
    outline: 2px solid rgba(34, 211, 238, 0.65);
    outline-offset: 2px;
}

.song-edit-modal {
    max-width: min(92vw, 620px);
    width: 620px;
}

.song-edit-modal-head {
    margin-bottom: 1rem;
}

.song-edit-modal-head .muted {
    margin: 0.25rem 0 0;
}

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

.song-list-heading .section-title {
    margin: 0;
}

.bulk-pricing-modal {
    max-width: min(92vw, 680px);
    width: 680px;
}

.bulk-pricing-preview {
    background: rgba(6, 182, 212, 0.07);
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 8px;
    display: grid;
    gap: 0.3rem;
    padding: 0.75rem;
}

.bulk-pricing-preview strong {
    color: #67e8f9;
}

.bulk-pricing-preview span,
.bulk-pricing-preview small {
    color: var(--muted);
}

.songmenu-admin .data-table td em,
.songmenu-admin .data-table td .muted,
.songmenu-admin .data-table td .text-muted {
    color: var(--muted) !important;
}

.songmenu-admin .btn-primary,
.songmenu-admin .btn-secondary,
.songmenu-admin .btn-danger {
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    min-height: 34px !important;
    padding: 0.5rem 0.75rem !important;
}

.songmenu-admin .btn-secondary {
    background: var(--panel) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

.songmenu-admin .btn-secondary:hover {
    background: var(--panel-hover) !important;
    border-color: var(--line-active) !important;
    color: #ffffff !important;
}

.songmenu-admin .btn-danger {
    background: #991b1b !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}

.songmenu-admin .btn-danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

.songmenu-admin .queue-table {
    border-collapse: separate;
    border-spacing: 0 0.9rem;
}

.songmenu-admin .queue-table th,
.songmenu-admin .queue-table td {
    border-bottom: 0;
}

.songmenu-admin .queue-card-row td {
    position: relative;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.songmenu-admin .queue-card-row td:first-child {
    border-left: 1px solid var(--line);
    border-radius: 8px 0 0 8px;
    padding-left: 1.3rem;
}

.songmenu-admin .queue-card-row td:first-child::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.35rem;
    background: #00A4BE;
    border-radius: 8px 0 0 8px;
}

.songmenu-admin .queue-card-row td:last-child {
    border-right: 1px solid var(--line);
    border-radius: 0 8px 8px 0;
    text-align: right;
    vertical-align: middle;
}

.songmenu-admin .queue-table tbody td {
    padding-bottom: 1.1rem;
    padding-top: 1.1rem;
}

.songmenu-admin .queue-title {
    color: var(--text);
    font-size: 1.65rem;
    font-weight: 850;
    line-height: 1.05;
}

.songmenu-admin .queue-artist {
    margin-top: 0.22rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.2;
}

.songmenu-admin .queue-buyer {
    margin-top: 0.5rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.15;
}

.songmenu-admin .queue-meta {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
}

.songmenu-controls {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-start;
    margin-bottom: 1rem;
    min-height: 0;
}

.control-item {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
}

.control-timer {
    align-items: flex-start;
    flex-direction: column;
}

.control-label {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.control-status {
    color: var(--muted);
    flex: 1 1 280px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.songmenu-controls .is-hidden,
.songmenu-controls [hidden] {
    display: none !important;
}

.flash-timer {
    color: var(--text);
    display: block;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.songmenu-admin .toggle {
    font-family: inherit;
    margin: 0;
}

.songmenu-controls .toggle {
    min-width: 128px;
}

.songmenu-bundle-admin {
    margin-bottom: 1rem;
    padding: 1rem;
}

.bundle-admin-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.songmenu-bundle-admin .section-title {
    margin-bottom: 0.15rem;
}

.bundle-status {
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.bundle-status.is-on {
    background: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
}

.bundle-status.is-off {
    background: rgba(100, 116, 139, 0.14);
    color: var(--muted);
}

.bundle-enabled-label {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    font-size: 0.98rem;
    font-weight: 850;
}

.bundle-enabled-label input {
    height: 1.15rem;
    width: 1.15rem;
}

.songmenu-admin .toggle .toggle-group label {
    align-items: center;
    display: flex;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0;
    overflow: visible;
    white-space: nowrap;
}

.songmenu-admin .toggle.btn,
.songmenu-admin .toggle.btn.btn-success,
.songmenu-admin .toggle.btn.btn-danger,
.songmenu-admin .toggle.btn.btn-warning,
.songmenu-admin .toggle.btn.btn-secondary {
    background: #0d111d !important;
    border: 1px solid var(--line-active);
    color: var(--text) !important;
    box-shadow: none;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.songmenu-controls .toggle {
    min-width: 170px !important;
}

.songmenu-admin .toggle-on,
.songmenu-admin .toggle-on.btn,
.songmenu-admin .toggle-on.btn.btn-success,
.songmenu-admin .toggle-on.btn.btn-warning {
    background: rgba(20, 184, 166, 0.12) !important;
    color: #14b8a6 !important;
    padding-left: 0.75rem !important;
    padding-right: 2.2rem !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.songmenu-admin .toggle-off,
.songmenu-admin .toggle-off.btn,
.songmenu-admin .toggle-off.btn.btn-danger,
.songmenu-admin .toggle-off.btn.btn-secondary {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    padding-left: 2.2rem !important;
    padding-right: 0.75rem !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

.songmenu-admin .toggle-handle,
.songmenu-admin .toggle-handle.btn,
.songmenu-admin .toggle-handle.btn.btn-light {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Brighter colored slider tabs (handles) based on status */

/* Client Access Toggle */
.songmenu-admin .toggle:has(#toggle-client-access):not(.off) .toggle-handle,
.songmenu-admin .toggle:has(#toggle-client-access):not(.off) .toggle-handle.btn,
.songmenu-admin .toggle:has(#toggle-client-access):not(.off) .toggle-handle.btn.btn-light {
    background: #14b8a6 !important;
    border-color: #14b8a6 !important;
}

.songmenu-admin .toggle:has(#toggle-client-access).off .toggle-handle,
.songmenu-admin .toggle:has(#toggle-client-access).off .toggle-handle.btn,
.songmenu-admin .toggle:has(#toggle-client-access).off .toggle-handle.btn.btn-light {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* Flash Sale Toggle */
.songmenu-admin .toggle:has(#toggle-flash-sale):not(.off) .toggle-handle,
.songmenu-admin .toggle:has(#toggle-flash-sale):not(.off) .toggle-handle.btn,
.songmenu-admin .toggle:has(#toggle-flash-sale):not(.off) .toggle-handle.btn.btn-light {
    background: #fbbf24 !important;
    border-color: #fbbf24 !important;
}

.songmenu-admin .toggle:has(#toggle-flash-sale).off .toggle-handle,
.songmenu-admin .toggle:has(#toggle-flash-sale).off .toggle-handle.btn,
.songmenu-admin .toggle:has(#toggle-flash-sale).off .toggle-handle.btn.btn-light {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

.songmenu-admin .toggle:has(#toggle-flash-sale).is-disabled,
.songmenu-admin .toggle:has(#toggle-flash-sale).disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Song Status (List) Toggles */
.songmenu-admin .toggle:has(.toggle-status):not(.off) .toggle-handle,
.songmenu-admin .toggle:has(.toggle-status):not(.off) .toggle-handle.btn,
.songmenu-admin .toggle:has(.toggle-status):not(.off) .toggle-handle.btn.btn-light {
    background: #14b8a6 !important;
    border-color: #14b8a6 !important;
}

.songmenu-admin .toggle:has(.toggle-status).off .toggle-handle,
.songmenu-admin .toggle:has(.toggle-status).off .toggle-handle.btn,
.songmenu-admin .toggle:has(.toggle-status).off .toggle-handle.btn.btn-light {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* Glow/Pulse Animations on the container element itself to allow glow beyond boundaries safely */
.songmenu-admin .toggle:has(#toggle-client-access):not(.off) {
    animation: toggle-container-glow-success 1.8s infinite !important;
}

.songmenu-admin .toggle:has(#toggle-flash-sale):not(.off) {
    animation: toggle-container-glow-warning 1.8s infinite !important;
}

@keyframes toggle-container-glow-success {
    0% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.6);
        border-color: #14b8a6 !important;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.4);
        border-color: #14b8a6 !important;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
        border-color: #14b8a6 !important;
    }
}

@keyframes toggle-container-glow-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6);
        border-color: #fbbf24 !important;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.4);
        border-color: #fbbf24 !important;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
        border-color: #fbbf24 !important;
    }
}

.upload-progress {
    display: none;
    width: 100%;
    height: 22px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e2e8f0;
}

.upload-progress .progress-bar {
    width: 0%;
    color: #ffffff;
    font-weight: 800;
}

@media (max-width: 900px) {
    .app-frame {
        padding-left: 0;
    }

    body.sidebar-collapsed .app-frame {
        padding-left: 0;
    }

    .topbar {
        display: none;
    }

    .mobile-topbar {
        align-items: center;
        background: rgba(17, 22, 37, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
        display: flex;
        justify-content: space-between;
        min-height: 68px;
        padding: 0.8rem 1rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .topnav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

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

    .dashboard-priority-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 190px));
    }

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

    .dashboard-grid.dashboard-grid-single {
        grid-template-columns: 1fr;
    }

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

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

    .analytics-sections {
        grid-template-columns: 1fr;
    }

    .venue-detail-grid,
    .venue-action-grid,
    .booking-dashboard-grid,
    .dashboard-work-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .shell {
        width: min(100% - 1rem, 1180px);
        padding-top: 1rem;
    }

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

    .dashboard-grid.dashboard-grid-single {
        grid-template-columns: 1fr;
    }

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

    .dashboard-priority-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    }

    .dashboard-action-section .dashboard-priority-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-event-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-event-badges {
        justify-content: flex-start;
    }

    .event-readiness-list {
        grid-template-columns: 1fr;
    }

    .tool-card {
        min-height: 0;
        padding: 0.8rem;
    }

    .tool-card-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .tool-card h2 {
        font-size: 0.98rem;
    }

    .tool-card p {
        font-size: 0.86rem;
    }

    .tool-card a {
        align-self: stretch;
        justify-content: center;
        text-align: center;
    }

    .module-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .lead-detail-grid,
    .lead-quick-actions {
        grid-template-columns: 1fr;
    }

    .lead-card {
        padding: 0.8rem;
    }

    .lead-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid,
    .profile-grid,
    .permission-grid {
        grid-template-columns: 1fr;
    }

    .form-span-3,
    .form-span-4,
    .form-span-5,
    .form-span-6,
    .form-span-7,
    .form-span-8,
    .form-span-9,
    .form-span-12 {
        grid-column: 1 / -1;
    }

    .songmenu-admin .admin-tabs {
        gap: 0.45rem;
    }

    .songmenu-admin .admin-tabs .nav-link {
        min-height: 34px;
        padding: 0.45rem 0.65rem;
    }

    .songmenu-admin .data-table th,
    .songmenu-admin .data-table td {
        padding: 0.55rem 0.45rem;
    }

    .songmenu-controls {
        gap: 0.65rem;
    }

    .venue-detail-header {
        flex-direction: column;
    }

    .venue-event-card {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-prep-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .venue-row-actions {
        flex-direction: column;
    }

}

/* Song Menu Admin Input and Tab overrides to prevent Bootstrap 5 bleed-through */
.songmenu-admin input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]),
.songmenu-admin select,
.songmenu-admin textarea,
.songmenu-admin .form-control {
    background: #181d2a !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
}

.songmenu-admin input:focus,
.songmenu-admin select:focus,
.songmenu-admin textarea:focus,
.songmenu-admin .form-control:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px var(--brand-glow) !important;
    background: #1e2536 !important;
    outline: none !important;
}

.songmenu-admin .admin-tabs .nav-link.active,
.songmenu-admin .admin-tabs .nav-item .nav-link.active {
    background: var(--brand) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px var(--brand-glow) !important;
}

.songmenu-admin .admin-tabs .nav-link:hover,
.songmenu-admin .admin-tabs .nav-item .nav-link:hover {
    color: var(--text) !important;
    background: transparent !important;
}

/* System-wide action colors: green/teal for non-destructive actions, red for destructive actions, rose for primary. */
.btn.btn-primary {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px var(--brand-glow) !important;
}

.btn.btn-primary:hover {
    background: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.4) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn.btn-success {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.22) !important;
}

.btn.btn-success:hover {
    background: #14b8a6 !important;
    border-color: #14b8a6 !important;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.3) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn.btn-danger {
    background: #991b1b !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}

.btn.btn-danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.role-actions-row {
    align-items: center !important;
    box-sizing: border-box !important;
    display: flex !important;
    gap: 0.75rem !important;
    justify-content: space-between !important;
    margin-top: 0 !important;
    padding: 0 1rem 1rem !important;
    width: 100% !important;
}

.role-actions-row form {
    margin: 0 0 0 auto !important;
}

/* --- Custom Switch Toggle Component --- */
.custom-switch {
    position: relative;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
}

.custom-switch * {
    box-sizing: border-box;
}

.custom-switch input[type="checkbox"] {
    display: none;
}

.custom-switch .switch-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ef4444;
    border-radius: 20px;
    margin: 0;
    position: relative;
    background: #ef4444;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.custom-switch .switch-inner {
    display: block;
    width: 200%;
    margin-left: -100%;
    transition: margin 0.2s ease-in-out;
}

.custom-switch .switch-inner::before,
.custom-switch .switch-inner::after {
    display: block;
    float: left;
    width: 50%;
    height: 32px;
    padding: 0;
    line-height: 32px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.custom-switch .switch-inner::before {
    content: attr(data-on);
    padding-left: 12px;
    padding-right: 30px;
    background-color: #0f766e;
    color: #ffffff;
}

.custom-switch .switch-inner::after {
    content: attr(data-off);
    padding-right: 12px;
    padding-left: 30px;
    background-color: #ef4444;
    color: #ffffff;
    text-align: right;
}

/* Custom styles for Flash Sale warning-colored on state */
.custom-switch:has(#toggle-flash-sale) .switch-inner::before {
    background-color: #fbbf24;
    color: #111827;
}

.promotion-settings-stack {
    display: grid;
    gap: 1rem;
}

.promotion-settings-card {
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 4px solid #06b6d4;
    border-radius: 10px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.promotion-settings-card:first-of-type {
    border-left-color: #14b8a6;
}

.promotion-settings-card:nth-of-type(2) {
    border-left-color: #fbbf24;
}

.promotion-settings-head {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.promotion-settings-head h4 {
    color: var(--text);
    font-size: 1.05rem;
    margin: 0;
}

.promotion-settings-head p {
    margin: 0.2rem 0 0;
}

.promotion-value-control {
    align-items: center;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.promotion-value-control .type-toggle-container {
    margin-left: 0;
}

.stripe-connect-test-notice {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fde68a;
    margin-bottom: 1rem;
}

.stripe-connect-card {
    border-left-color: #635bff;
}

.stripe-connect-facts {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stripe-connect-facts > div {
    background: rgba(2, 9, 20, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 8px;
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
}

.stripe-connect-facts span {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.stripe-connect-facts strong {
    overflow-wrap: anywhere;
}

.stripe-connect-actions,
.stripe-connect-actions form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
}

.stripe-connect-liability-note {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    margin: 0;
    padding-top: 1rem;
}

@media (max-width: 720px) {
    .stripe-connect-facts {
        grid-template-columns: 1fr 1fr;
    }
    .promotion-settings-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

.custom-switch .switch-switch {
    display: block;
    width: 22px;
    height: 22px;
    background: #ffffff;
    position: absolute;
    top: 4px;
    left: 4px;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: left 0.2s ease-in-out;
}

/* Switch Sizes */
.custom-switch.switch-wide {
    width: 160px;
}

.custom-switch.switch-narrow {
    width: 76px;
}

/* Checked States */
.custom-switch input[type="checkbox"]:checked+.switch-label {
    border-color: #0f766e;
}

.custom-switch:has(#toggle-flash-sale) input[type="checkbox"]:checked+.switch-label {
    border-color: #fbbf24;
}

.custom-switch input[type="checkbox"]:checked+.switch-label .switch-inner {
    margin-left: 0;
}

.custom-switch input[type="checkbox"]:checked+.switch-label .switch-switch {
    left: calc(100% - 26px);
}

/* Disabled Switch */
.custom-switch.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Glowing Animations for Toggles */
@keyframes toggle-container-glow-success {
    0% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.6);
        border-color: #14b8a6;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.4);
        border-color: #14b8a6;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
        border-color: #14b8a6;
    }
}

@keyframes toggle-container-glow-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6);
        border-color: #fbbf24;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.4);
        border-color: #fbbf24;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
        border-color: #fbbf24;
    }
}

.custom-switch:has(#toggle-client-access) input[type="checkbox"]:checked+.switch-label {
    animation: toggle-container-glow-success 1.8s infinite !important;
}

.custom-switch:has(#toggle-flash-sale) input[type="checkbox"]:checked+.switch-label {
    animation: toggle-container-glow-warning 1.8s infinite !important;
}

/* Calculator / Estimator */
.hidden {
    display: none !important;
}

.calculator-page {
    overflow: hidden;
    padding: 0;
    scroll-behavior: smooth;
}

.calculator-project-panel {
    background: #111625;
    border-bottom: 1px solid rgba(244, 63, 94, 0.12);
    padding: 1.25rem;
}

.calculator-project-field {
    max-width: 42rem;
}

.calculator-project-field label {
    margin-top: 0;
}

.calculator-body {
    display: grid;
    gap: 1.5rem;
    padding: 1rem;
}

.calculator-accordion {
    gap: 1rem;
}

.calculator-section {
    background: rgba(255, 255, 255, 0.018);
}

.calculator-section .widget-accordion-toggle {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.calculator-accordion-total {
    background: rgba(15, 118, 110, 0.16);
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 999px;
    color: #5eead4;
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.45rem 0.75rem;
    white-space: nowrap;
}

.calculator-section-rows {
    padding: 0.35rem 1rem 1rem;
}

.table-row {
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, .25fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(120px, .55fr) minmax(220px, 1.35fr);
}

.table-cell {
    align-items: center;
    display: flex;
    min-width: 0;
    padding: 0.75rem 1rem;
}

.table-cell>div {
    width: 100%;
}

.table-cell>.type-toggle-container {
    flex: 0 0 auto;
    width: auto;
}

#serviceFeeRow>.table-cell:nth-child(2),
#discountRow>.table-cell:nth-child(2) {
    gap: 0.75rem;
}

.subtotal-cell {
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.notes-cell {
    color: var(--muted);
    font-size: 0.875rem;
}

.total-row {
    background-color: rgba(24, 29, 42, 0.3);
    border-bottom: 2px solid var(--line);
    font-weight: 700;
}

.total-row>.table-cell:nth-child(2),
.total-row>.table-cell:nth-child(3) {
    justify-content: flex-start;
}

.total-row .subtotal-cell {
    color: var(--brand);
}

.type-toggle-container {
    align-items: center;
    background-color: #181d2a;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    display: inline-flex;
    gap: 2px;
    margin-left: 1rem;
    padding: 2px;
    vertical-align: middle;
}

.type-toggle-btn {
    background: transparent;
    border: 0;
    border-radius: 0.375rem;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    min-height: 0;
    padding: 0.25rem 0.65rem;
    transition: var(--transition);
    width: auto;
}

.type-toggle-btn.active {
    background-color: var(--brand);
    box-shadow: 0 2px 8px var(--brand-glow);
    color: #ffffff;
}

.grand-total-container {
    align-items: center;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15) 0%, rgba(244, 63, 94, 0.05) 100%);
    border: 1px solid var(--line-active);
    border-radius: var(--border-radius);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 0.25rem;
    padding: 1.5rem;
}

.grand-total-container h2 {
    color: var(--text);
    font-family: "Outfit", sans-serif;
    margin: 0;
}

.calculator-grand-total-value {
    color: var(--brand);
    font-family: "Outfit", sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 0 15px var(--brand-glow);
}

.calculator-actions,
.rounding-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.calculator-actions {
    padding: 0.5rem 1rem 1.5rem;
}

.calculator-summary-panel {
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: var(--text);
    margin: 0 1rem 1rem;
    padding: clamp(1rem, 2vw, 2rem);
}

.quote-header {
    background-color: rgba(24, 29, 42, 0.4);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem;
}

.quote-logo {
    border-radius: 8px;
    display: block;
    margin-bottom: 1rem;
    max-width: 100%;
    width: 100%;
}

.quote-header h2 {
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 0 0.5rem;
}

.quote-header p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0.25rem 0 0;
}

.quote-body {
    padding: 1.5rem;
}

.quote-line-item {
    align-items: center;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.quote-line-item:last-child {
    border-bottom: 0;
}

.quote-line-emphasis {
    font-weight: 700;
}

.quote-line-note {
    color: var(--muted);
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.quote-line-adjustment {
    color: var(--accent);
    font-style: italic;
}

.quote-line-muted {
    color: var(--muted);
    font-style: italic;
}

.quote-included {
    color: #34d399;
    font-weight: 800;
}

.quote-line-deduction {
    color: #34d399;
}

.quote-total {
    border-top: 2px solid var(--line);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: right;
}

.quote-total p:first-child {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 0;
}

#quoteFinalTotal {
    color: var(--brand);
    font-size: 2rem;
    font-weight: 950;
    margin: 0.35rem 0 0;
}

#roundingControls {
    background-color: rgba(24, 29, 42, 0.6);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    padding: 1.5rem;
    text-align: center;
}

#roundingControls h3 {
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
}

@media (max-width: 768px) {
    .calculator-body {
        padding: 0.75rem;
    }

    .calculator-section-rows {
        padding: 0 0.85rem 0.85rem;
    }

    .table-row {
        gap: 0.5rem 1rem;
        grid-template-columns: 1fr 1fr;
        padding: 1rem 0;
    }

    .table-cell {
        padding: 0.25rem 0;
    }

    .table-row>.table-cell:first-child {
        display: none;
    }

    .table-row:not(.total-row)>.table-cell:nth-child(2),
    .table-row:not(.total-row)>.table-cell:nth-child(3) {
        grid-column: 1 / 3;
    }

    .table-row:not(.total-row)>.table-cell:nth-child(2) {
        font-weight: 600;
        padding-bottom: 0;
    }

    .table-row:not(.total-row)>.table-cell:nth-child(4),
    .table-row:not(.total-row)>.table-cell:nth-child(5) {
        display: none;
    }

    .calculator-section .widget-accordion-toggle {
        gap: 0.7rem;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .total-row>.table-cell:nth-child(1),
    .total-row>.table-cell:nth-child(4),
    .total-row>.table-cell:nth-child(5) {
        display: none;
    }

    .total-row>.table-cell:nth-child(2) {
        grid-column: 1 / 2;
        justify-content: flex-start;
    }

    .total-row>.table-cell:nth-child(3) {
        display: flex;
        grid-column: 2 / 3;
        justify-content: flex-start;
    }

    #serviceFeeRow>.table-cell:nth-child(2),
    #discountRow>.table-cell:nth-child(2) {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    #serviceFeeRow>.table-cell:nth-child(3),
    #discountRow>.table-cell:nth-child(3),
    #mealBuyoutRow>.table-cell:nth-child(3) {
        grid-column: 1 / 2;
    }

    #serviceFeeRow>.table-cell:nth-child(4),
    #discountRow>.table-cell:nth-child(4),
    #mealBuyoutRow>.table-cell:nth-child(4) {
        align-items: center;
        display: flex;
        grid-column: 2 / 3;
        justify-content: flex-end;
    }

    #mealBuyoutRow>.table-cell:nth-child(2) {
        grid-column: 1 / 3;
        padding-bottom: 0;
    }

    .type-toggle-container {
        margin-left: 0;
    }

    .quote-line-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .quote-total {
        text-align: left;
    }
}

/* Custom Tab Pane helper */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}
