:root {
    color-scheme: light;
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at 70% 0%, rgba(37, 99, 235, 0.06), transparent 30rem),
        linear-gradient(180deg, #f9fbff 0%, #f7faff 52%, #fbfdff 100%);
}

button,
input,
textarea,
select {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.plans-hero h1,
.sidebar-title,
.brand-lockup,
.metric-value,
.mini-value {
    font-family: var(--font-sans);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 700;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    color: #334155;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
    background: #f8fafc;
    color: #0f172a;
}

.info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: 0.25rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    cursor: help;
}

.sidebar-usage {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.85rem;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
}

.tag-box {
    display: flex;
    min-height: 3rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.45rem 0.6rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tag-box:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.tag-input {
    min-width: min(100%, 18rem);
    flex: 1;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.875rem;
    outline: none;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    background: #eff6ff;
    padding: 0.35rem 0.55rem 0.35rem 0.7rem;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
}

.tag-pill button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.7rem;
    line-height: 1;
}

.option-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-height: 4rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.option-card:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.option-card input {
    margin-top: 0.1rem;
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
}

.form-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.7rem 0.85rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-input:disabled {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.location-combobox {
    position: relative;
}

.location-options {
    position: absolute;
    z-index: 60;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    padding: 0.25rem;
}

.location-option {
    width: 100%;
    border-radius: 0.4rem;
    padding: 0.55rem 0.7rem;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
}

.location-option:hover,
.location-option.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    border-radius: 0.5rem;
    padding: 0.6rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-secondary {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.btn-secondary:hover,
.btn-light:hover {
    background: #f8fafc;
    color: #0f172a;
}

.btn-light {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.metric-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric-label,
.mini-label {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.metric-value {
    display: block;
    margin-top: 0.4rem;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
}

.mini-value {
    display: block;
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.check-row input {
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
}

.plan-group {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.plan-group-title {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 800;
}

.plan-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.plan-keyword {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.55rem 0.65rem;
    color: #334155;
    font-size: 0.8rem;
}

.plan-remove {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #dc2626;
    font-size: 0.72rem;
    font-weight: 800;
}

.plan-remove:hover {
    color: #991b1b;
}

.plan-negative {
    display: inline-flex;
    margin: 0.35rem 0.25rem 0 0;
    border-radius: 999px;
    background: #fff1f2;
    padding: 0.25rem 0.5rem;
    color: #be123c;
    font-size: 0.72rem;
    font-weight: 700;
}

.plan-folder {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.plan-folder summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
}

.plan-folder summary::-webkit-details-marker {
    display: none;
}

.plan-folder[open] summary {
    border-bottom: 1px solid #e2e8f0;
}

.folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1.15rem;
    font-weight: 800;
}

.folder-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: #2563eb;
    font-size: 1.25rem;
    font-weight: 900;
    transition: transform 0.15s ease, background 0.15s ease;
}

.plan-folder[open] .folder-chevron {
    transform: rotate(180deg);
}

.plan-folder summary:hover .folder-chevron {
    background: #eff6ff;
}

.dashboard-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-topbar {
    border-color: rgba(226, 232, 240, 0.72) !important;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.06);
}

.brand-mark {
    background: linear-gradient(145deg, #1d4ed8, #2563eb 54%, #60a5fa);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.demo-badge {
    background: #eef4ff !important;
    color: #0b55f4 !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.05), 0 12px 26px rgba(37, 99, 235, 0.08);
}

.account-pill,
.app-topbar .js-sidebar-toggle {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-pill:hover,
.app-topbar .js-sidebar-toggle:hover {
    border-color: #bfdbfe;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: linear-gradient(145deg, #dbeafe, #94a3b8);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 900;
}

.app-sidebar {
    border-color: rgba(226, 232, 240, 0.72) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(18px);
}

.sidebar-title {
    padding: 1.15rem 0.55rem 0.6rem;
    color: #020617;
    font-size: 1.32rem;
    letter-spacing: 0;
}

.sidebar-user-card {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.sidebar-user-card .demo-badge {
    justify-self: start;
    padding: 0.42rem 0.75rem;
}

.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #f8fbff;
    padding: 0.7rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.sidebar-user-link:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.sidebar-user-name {
    display: block;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.15;
}

.sidebar-user-mode {
    display: block;
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 650;
}

.nav-item {
    color: #64748b;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.nav-item:hover {
    background: #f8fafc;
    color: #0f172a;
    transform: translateX(1px);
}

.nav-item.bg-blue-600 {
    background: linear-gradient(135deg, #2f6bff, #0b55f4) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 14px 28px rgba(37, 99, 235, 0.26);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.55rem;
    position: relative;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
}

.nav-item.bg-blue-600 .nav-icon {
    border-color: rgba(255, 255, 255, 0.7);
    background: transparent;
    color: #ffffff;
}

.nav-icon::before,
.nav-icon::after {
    position: absolute;
    content: "";
    border-color: currentColor;
}

.nav-icon-grid::before {
    inset: 0.36rem;
    border: 2px solid currentColor;
    border-radius: 0.15rem;
    box-shadow: 0.48rem 0 0 -0.02rem currentColor, 0 0.48rem 0 -0.02rem currentColor, 0.48rem 0.48rem 0 -0.02rem currentColor;
}

.nav-icon-folder::before {
    left: 0.3rem;
    right: 0.3rem;
    top: 0.48rem;
    bottom: 0.36rem;
    border: 2px solid currentColor;
    border-radius: 0.18rem;
}

.nav-icon-plus::before {
    left: 0.42rem;
    right: 0.42rem;
    top: 50%;
    border-top: 2px solid currentColor;
}

.nav-icon-plus::after {
    top: 0.42rem;
    bottom: 0.42rem;
    left: 50%;
    border-left: 2px solid currentColor;
}

.nav-icon-card::before {
    inset: 0.42rem 0.3rem;
    border: 2px solid currentColor;
    border-radius: 0.16rem;
}

.nav-icon-card::after {
    left: 0.42rem;
    right: 0.42rem;
    top: 0.74rem;
    border-top: 2px solid currentColor;
}

.nav-icon-gear::before {
    inset: 0.38rem;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.nav-icon-gear::after {
    inset: 0.68rem;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.sidebar-usage {
    border-color: #dce6f5;
    border-radius: 1.05rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 16px 36px rgba(15, 23, 42, 0.05);
}

.usage-track {
    height: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.usage-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.sidebar-add-link {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.theme-toggle {
    border-radius: 999px;
    border-color: #e2e8f0;
    background: #f8fbff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.theme-toggle .js-theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.65rem;
    font-weight: 900;
}

.logout-link {
    background: rgba(255, 255, 255, 0.64);
    min-height: 3.9rem;
}

.btn-primary,
.btn-secondary,
.btn-light {
    border-radius: 999px;
    min-height: 2.65rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2f6bff, #0b55f4);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
}

.btn-secondary,
.btn-light {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.plans-shell {
    display: grid;
    gap: 1.5rem;
}

.plans-shell::before {
    position: fixed;
    inset: 6rem auto auto 20rem;
    width: 34rem;
    height: 20rem;
    pointer-events: none;
    content: "";
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
    filter: blur(4px);
    z-index: -1;
}

.plans-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 1.55rem;
    background: rgba(255, 255, 255, 0.82);
    padding: 2.4rem 2.5rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.06);
}

.plans-hero h1 {
    margin-top: 0.2rem;
    max-width: 48rem;
    color: #0f172a;
    font-size: clamp(2.35rem, 4vw, 3.55rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.98;
}

.plans-hero p:not(.eyebrow) {
    margin-top: 1rem;
    max-width: 44rem;
    color: #66758f;
    font-size: 1rem;
    line-height: 1.7;
}

.page-hero {
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 1.55rem;
    background: rgba(255, 255, 255, 0.82);
    padding: 2rem 2.25rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.06);
}

.page-hero.dashboard-panel {
    padding: 0;
}

.page-hero h1 {
    color: #0f172a;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
}

.page-hero p {
    max-width: 44rem;
    color: #66758f;
    font-size: 0.96rem;
    line-height: 1.7;
}

.eyebrow {
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.premium-action {
    flex: 0 0 auto;
    padding-inline: 1.15rem;
}

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

.summary-grid-single {
    grid-template-columns: minmax(0, 18rem);
}

.metric-card {
    border-color: rgba(203, 213, 225, 0.7);
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.055);
}

.summary-grid .metric-card::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    margin-bottom: 0.9rem;
    border-radius: 0.8rem;
    background: #eef4ff;
    color: #0b55f4;
    content: "";
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.summary-grid .metric-card:nth-child(1)::before {
    background-image: linear-gradient(#0b55f4, #0b55f4), linear-gradient(#0b55f4, #0b55f4), linear-gradient(#0b55f4, #0b55f4);
    background-position: center 0.68rem, center, center 1.55rem;
    background-repeat: no-repeat;
    background-size: 0.9rem 0.12rem, 1.15rem 0.12rem, 0.9rem 0.12rem;
}

.summary-grid .metric-card:nth-child(2)::before {
    background-image: linear-gradient(#0b55f4, #0b55f4), linear-gradient(#0b55f4, #0b55f4);
    background-position: center, center;
    background-repeat: no-repeat;
    background-size: 1rem 0.12rem, 0.12rem 1rem;
}

.summary-grid .metric-card:nth-child(3)::before {
    border-radius: 999px;
    background-image: radial-gradient(circle, #0b55f4 0.2rem, transparent 0.22rem);
}

.metric-value {
    font-size: 1.85rem;
}

.plans-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.plans-main {
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 1.55rem;
    background: rgba(255, 255, 255, 0.72);
    padding: 1.35rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.055);
}

.plans-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.plans-section-head h2 {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 850;
}

.plans-section-head span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.plans-main,
.plans-aside {
    min-width: 0;
}

.plans-aside {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 5.5rem;
}

.side-panel {
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.88);
    padding: 1.25rem;
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.055);
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.8rem;
    background: #f6f9ff;
    padding: 0.75rem 0.85rem;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 800;
}

.side-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.side-value {
    display: block;
    margin-top: 0.45rem;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 850;
}

.side-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.side-row strong {
    color: #0f172a;
}

.empty-state {
    border-radius: 1.1rem;
}

.plan-folder {
    border-color: rgba(203, 213, 225, 0.78);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.plan-row {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.plan-row:hover {
    border-color: #bfdbfe;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.plan-row summary {
    padding: 1.15rem 1.25rem;
}

.plan-row-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.plan-row-title h2 {
    overflow: hidden;
    color: #0f172a;
    font-size: 1.04rem;
    font-weight: 850;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-row-title p {
    margin-top: 0.25rem;
    overflow: hidden;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-dot {
    flex: 0 0 auto;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: #0b55f4;
    box-shadow: 0 0 0 0.35rem #eff6ff;
}

.plan-row-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 800;
}

.plan-row-body {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.25rem 1.25rem;
}

.plan-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mini-label {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.mini-value {
    font-size: 0.92rem;
    line-height: 1.35;
}

.plan-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.plan-tags span {
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eef4ff;
    padding: 0.32rem 0.55rem;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 850;
}

.plan-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    border-top: 1px solid #eef2f7;
    padding-top: 1rem;
}

@media (min-width: 1024px) {
    .app-sidebar {
        top: 0.5rem !important;
        bottom: 0.5rem !important;
        left: 0.5rem !important;
        width: 17.25rem !important;
        border-radius: 1.55rem;
    }

    .app-topbar {
        display: none;
    }

}

[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body,
[data-theme="dark"] .bg-slate-100 {
    background: #0b1120 !important;
    color: #e5e7eb;
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] header,
[data-theme="dark"] .bg-white\/95,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .plan-folder,
[data-theme="dark"] .plan-group,
[data-theme="dark"] .sidebar-usage,
[data-theme="dark"] .option-card,
[data-theme="dark"] .tag-box,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .location-options,
[data-theme="dark"] .form-input {
    background: #111827 !important;
    color: #e5e7eb;
}

[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .form-input:disabled,
[data-theme="dark"] .option-card:has(input:checked),
[data-theme="dark"] .plan-keyword {
    background: #1f2937 !important;
}

[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-300,
[data-theme="dark"] header,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .plan-folder,
[data-theme="dark"] .plan-group,
[data-theme="dark"] .sidebar-usage,
[data-theme="dark"] .option-card,
[data-theme="dark"] .tag-box,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .location-options,
[data-theme="dark"] .form-input {
    border-color: #334155 !important;
}

[data-theme="dark"] .text-slate-950,
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] header a,
[data-theme="dark"] .metric-value,
[data-theme="dark"] .mini-value,
[data-theme="dark"] .plan-group-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] header .text-slate-500,
[data-theme="dark"] header .text-slate-700,
[data-theme="dark"] .metric-label,
[data-theme="dark"] .mini-label,
[data-theme="dark"] .plan-keyword,
[data-theme="dark"] .check-row,
[data-theme="dark"] .tag-input,
[data-theme="dark"] .location-option,
[data-theme="dark"] .option-card,
[data-theme="dark"] .form-label {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .hover\:bg-slate-50:hover,
[data-theme="dark"] .hover\:bg-slate-100:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-light:hover,
[data-theme="dark"] .location-option:hover,
[data-theme="dark"] .location-option.is-active,
[data-theme="dark"] .icon-button:hover {
    background: #1f2937 !important;
}

[data-theme="dark"] .folder-icon,
[data-theme="dark"] .folder-chevron,
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .tag-pill {
    background: #172554 !important;
    color: #bfdbfe !important;
}

[data-theme="dark"] .bg-rose-50 {
    background: #3f121f !important;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #0b1120 0%, #0f172a 100%) !important;
}

[data-theme="dark"] .app-sidebar,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .side-panel,
[data-theme="dark"] .plan-folder,
[data-theme="dark"] .metric-card {
    background: rgba(17, 24, 39, 0.92) !important;
}

[data-theme="dark"] .nav-item {
    color: #cbd5e1;
}

[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .side-link {
    background: #1f2937;
    color: #e5e7eb;
}

[data-theme="dark"] .nav-item.bg-blue-600 {
    background: linear-gradient(135deg, #172554, #1e3a8a) !important;
    color: #bfdbfe !important;
}

[data-theme="dark"] .nav-icon,
[data-theme="dark"] .theme-toggle .js-theme-icon {
    background: #1e293b;
    color: #bfdbfe;
}

[data-theme="dark"] .plans-hero h1,
[data-theme="dark"] .page-hero h1,
[data-theme="dark"] .plan-row-title h2,
[data-theme="dark"] .side-value,
[data-theme="dark"] .side-row strong {
    color: #f8fafc;
}

[data-theme="dark"] .plans-hero p:not(.eyebrow),
[data-theme="dark"] .page-hero p,
[data-theme="dark"] .plan-row-title p,
[data-theme="dark"] .plan-row-meta,
[data-theme="dark"] .side-row {
    color: #cbd5e1;
}

[data-theme="dark"] .plan-tags span {
    border-color: #1d4ed8;
    background: #172554;
    color: #bfdbfe;
}

[data-theme="dark"] .plan-actions {
    border-color: #334155;
}

@media (max-width: 640px) {
    .metric-value {
        font-size: 1.35rem;
    }
}

@media (max-width: 1024px) {
    .plans-layout {
        grid-template-columns: 1fr;
    }

    .plans-aside {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .plans-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-grid,
    .plan-detail-grid,
    .plans-aside {
        grid-template-columns: 1fr;
    }

    .plan-row summary {
        align-items: flex-start;
    }

    .plan-row-meta span:first-child {
        display: none;
    }

    .plan-actions {
        justify-content: stretch;
    }

    .plan-actions > *,
    .plan-actions .btn-primary,
    .plan-actions .btn-secondary,
    .plan-actions .btn-light {
        width: 100%;
    }
}

/* Contrast pass for brand and system icons across light/dark themes. */
.brand-lockup span:last-child,
.sidebar-title strong {
    color: #020617 !important;
}

.brand-mark {
    color: #ffffff !important;
}

.nav-icon {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.nav-icon::before,
.nav-icon::after {
    display: none;
}

.nav-icon-grid {
    background:
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.42rem 0.42rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.96rem 0.42rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.42rem 0.96rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.96rem 0.96rem / 0.58rem 0.58rem no-repeat,
        #ffffff;
}

.nav-icon-folder {
    background:
        linear-gradient(currentColor, currentColor) 0.42rem 0.58rem / 0.48rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.38rem 0.76rem / 0.86rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.38rem 1.04rem / 0.86rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.32rem 0.76rem / 0.12rem 0.4rem no-repeat,
        linear-gradient(currentColor, currentColor) 1.18rem 0.76rem / 0.12rem 0.4rem no-repeat,
        #ffffff;
}

.nav-icon-plus {
    background:
        linear-gradient(currentColor, currentColor) center / 0.85rem 0.14rem no-repeat,
        linear-gradient(currentColor, currentColor) center / 0.14rem 0.85rem no-repeat,
        #ffffff;
}

.nav-icon-card {
    background:
        linear-gradient(currentColor, currentColor) center 0.72rem / 0.95rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.45rem 1.05rem / 0.3rem 0.12rem no-repeat,
        #ffffff;
}

.nav-icon-gear {
    background:
        radial-gradient(circle, transparent 0 0.17rem, currentColor 0.18rem 0.29rem, transparent 0.3rem),
        linear-gradient(currentColor, currentColor) center / 0.95rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) center / 0.12rem 0.95rem no-repeat,
        #ffffff;
}

.nav-item.bg-blue-600 .nav-icon {
    border-color: rgba(255, 255, 255, 0.72);
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-item.bg-blue-600 .nav-icon-grid {
    background:
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.42rem 0.42rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.96rem 0.42rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.42rem 0.96rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.96rem 0.96rem / 0.58rem 0.58rem no-repeat,
        rgba(255, 255, 255, 0.12);
}

.nav-item.bg-blue-600 .nav-icon-folder {
    background:
        linear-gradient(currentColor, currentColor) 0.42rem 0.58rem / 0.48rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.38rem 0.76rem / 0.86rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.38rem 1.04rem / 0.86rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.32rem 0.76rem / 0.12rem 0.4rem no-repeat,
        linear-gradient(currentColor, currentColor) 1.18rem 0.76rem / 0.12rem 0.4rem no-repeat,
        rgba(255, 255, 255, 0.12);
}

.nav-item.bg-blue-600 .nav-icon-plus,
.nav-item.bg-blue-600 .nav-icon-card,
.nav-item.bg-blue-600 .nav-icon-gear {
    background-color: rgba(255, 255, 255, 0.12);
}

.theme-toggle,
.account-pill,
.logout-link {
    color: #0f172a;
}

.theme-toggle .js-theme-icon {
    position: relative;
    color: #0b55f4;
    font-size: 0;
}

.theme-toggle .js-theme-icon::before {
    position: absolute;
    inset: 0.3rem;
    border: 2px solid currentColor;
    border-radius: 999px;
    content: "";
}

.theme-toggle .js-theme-icon::after {
    position: absolute;
    left: 50%;
    top: 0.15rem;
    width: 0.12rem;
    height: 0.24rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow:
        0 0.82rem 0 currentColor,
        0.42rem 0.41rem 0 currentColor,
        -0.42rem 0.41rem 0 currentColor;
    content: "";
    transform: translateX(-50%);
}

[data-theme="dark"] .brand-lockup span:last-child,
[data-theme="dark"] .sidebar-title strong {
    color: #f8fafc !important;
}

[data-theme="dark"] .brand-mark {
    background: #f8fafc !important;
    color: #020617 !important;
    box-shadow: 0 14px 30px rgba(248, 250, 252, 0.08);
}

[data-theme="dark"] .nav-icon {
    border-color: #475569;
    background-color: #020617;
    color: #f8fafc;
}

[data-theme="dark"] .nav-icon-grid {
    background:
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.42rem 0.42rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.96rem 0.42rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.42rem 0.96rem / 0.58rem 0.58rem no-repeat,
        radial-gradient(circle, currentColor 0 0.16rem, transparent 0.17rem) 0.96rem 0.96rem / 0.58rem 0.58rem no-repeat,
        #020617;
}

[data-theme="dark"] .nav-icon-folder {
    background:
        linear-gradient(currentColor, currentColor) 0.42rem 0.58rem / 0.48rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.38rem 0.76rem / 0.86rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.38rem 1.04rem / 0.86rem 0.12rem no-repeat,
        linear-gradient(currentColor, currentColor) 0.32rem 0.76rem / 0.12rem 0.4rem no-repeat,
        linear-gradient(currentColor, currentColor) 1.18rem 0.76rem / 0.12rem 0.4rem no-repeat,
        #020617;
}

[data-theme="dark"] .nav-icon-plus,
[data-theme="dark"] .nav-icon-card,
[data-theme="dark"] .nav-icon-gear {
    background-color: #020617;
}

[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon {
    border-color: rgba(255, 255, 255, 0.76);
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .account-pill,
[data-theme="dark"] .logout-link,
[data-theme="dark"] .sidebar-user-link {
    color: #f8fafc !important;
}

[data-theme="dark"] .sidebar-user-link {
    border-color: #334155;
    background: #0f172a;
}

[data-theme="dark"] .sidebar-user-link:hover {
    background: #1e293b;
}

[data-theme="dark"] .sidebar-user-name {
    color: #f8fafc;
}

[data-theme="dark"] .sidebar-user-mode {
    color: #cbd5e1;
}

[data-theme="dark"] .theme-toggle .js-theme-icon {
    background: #f8fafc !important;
    color: #020617 !important;
}

[data-theme="dark"] .theme-toggle .js-theme-icon::before {
    inset: 0.22rem 0.28rem 0.22rem 0.46rem;
    border-width: 0;
    background: #020617;
    border-radius: 999px;
    box-shadow: -0.22rem 0 0 #f8fafc;
}

[data-theme="dark"] .theme-toggle .js-theme-icon::after {
    display: none;
}

[data-theme="dark"] .user-avatar {
    background: #f8fafc;
    color: #020617;
}

/* Restore previous sidebar icon style while keeping the brand contrast fixes. */
.nav-icon {
    background: #ffffff;
    color: #64748b;
}

.nav-icon::before,
.nav-icon::after {
    display: block;
}

.nav-icon-grid,
.nav-icon-folder,
.nav-icon-plus,
.nav-icon-card,
.nav-icon-gear {
    background: #ffffff;
}

.nav-icon-grid::before {
    inset: 0.36rem;
    border: 2px solid currentColor;
    border-radius: 0.15rem;
    box-shadow: 0.48rem 0 0 -0.02rem currentColor, 0 0.48rem 0 -0.02rem currentColor, 0.48rem 0.48rem 0 -0.02rem currentColor;
}

.nav-icon-folder::before {
    left: 0.3rem;
    right: 0.3rem;
    top: 0.48rem;
    bottom: 0.36rem;
    border: 2px solid currentColor;
    border-radius: 0.18rem;
}

.nav-icon-plus::before {
    left: 0.42rem;
    right: 0.42rem;
    top: 50%;
    border-top: 2px solid currentColor;
}

.nav-icon-plus::after {
    top: 0.42rem;
    bottom: 0.42rem;
    left: 50%;
    border-left: 2px solid currentColor;
}

.nav-icon-card::before {
    inset: 0.42rem 0.3rem;
    border: 2px solid currentColor;
    border-radius: 0.16rem;
}

.nav-icon-card::after {
    left: 0.42rem;
    right: 0.42rem;
    top: 0.74rem;
    border-top: 2px solid currentColor;
}

.nav-icon-gear::before {
    inset: 0.38rem;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.nav-icon-gear::after {
    inset: 0.68rem;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.nav-item.bg-blue-600 .nav-icon {
    border-color: rgba(255, 255, 255, 0.7);
    background: transparent;
    color: #ffffff;
}

[data-theme="dark"] .nav-icon {
    border-color: #475569;
    background: #1e293b;
    color: #bfdbfe;
}

[data-theme="dark"] .nav-icon-grid,
[data-theme="dark"] .nav-icon-folder,
[data-theme="dark"] .nav-icon-plus,
[data-theme="dark"] .nav-icon-card,
[data-theme="dark"] .nav-icon-gear {
    background: #1e293b;
}

[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon {
    border-color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* Final icon reset: SVG icons, no CSS-drawn artifacts. */
.nav-icon,
.nav-icon-grid,
.nav-icon-folder,
.nav-icon-plus,
.nav-icon-card,
.nav-icon-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 auto;
    border: 1px solid #cbd5e1;
    border-radius: 0.55rem;
    background: #ffffff !important;
    background-image: none !important;
    color: #64748b;
}

.nav-icon::before,
.nav-icon::after {
    display: none !important;
    content: none !important;
}

.nav-icon svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.nav-item.bg-blue-600 .nav-icon,
.nav-item.bg-blue-600 .nav-icon-grid,
.nav-item.bg-blue-600 .nav-icon-folder,
.nav-item.bg-blue-600 .nav-icon-plus,
.nav-item.bg-blue-600 .nav-icon-card,
.nav-item.bg-blue-600 .nav-icon-gear {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.14) !important;
    background-image: none !important;
    color: #ffffff;
}

[data-theme="dark"] .nav-icon,
[data-theme="dark"] .nav-icon-grid,
[data-theme="dark"] .nav-icon-folder,
[data-theme="dark"] .nav-icon-plus,
[data-theme="dark"] .nav-icon-card,
[data-theme="dark"] .nav-icon-gear {
    border-color: #475569;
    background: #0f172a !important;
    background-image: none !important;
    color: #e5e7eb;
}

[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon,
[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon-grid,
[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon-folder,
[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon-plus,
[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon-card,
[data-theme="dark"] .nav-item.bg-blue-600 .nav-icon-gear {
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff;
}

/* Polished system refresh: flat surfaces, compact sidebar, brand assets. */
*,
*::before,
*::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

body {
    background: #f6f8fc !important;
}

[data-theme="dark"] body,
[data-theme="dark"] .bg-slate-100 {
    background: #090d16 !important;
}

.plans-shell::before {
    display: none !important;
}

.brand-logo {
    display: block;
    width: 15.5rem;
    max-width: 52vw;
    height: 4.25rem;
    object-fit: contain;
    object-position: left center;
}

.home-brand-logo {
    display: block;
    width: min(12rem, 72vw);
    max-width: 100%;
    height: auto;
}

.brand-logo-dark,
.sidebar-logo-dark,
.sidebar-logo-mark {
    display: none;
}

[data-theme="dark"] .brand-logo-light,
[data-theme="dark"] .sidebar-logo-light {
    display: none;
}

[data-theme="dark"] .brand-logo-dark,
[data-theme="dark"] .sidebar-logo-dark {
    display: block;
}

.app-topbar {
    background: #ffffff !important;
    border-color: #e4eaf3 !important;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-color: #e3e8f2 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    padding: 1rem 0.7rem !important;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 4.7rem;
    margin: -1rem -0.7rem 0;
    padding: 0 1.2rem;
    border-bottom: 1px solid #e3e8f2;
    position: relative;
}

.sidebar-logo-link {
    display: flex;
    min-width: 0;
}

.sidebar-logo {
    width: 141px;
    height: 40px;
    object-fit: contain;
    object-position: center;
}

.sidebar-logo-mark {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.sidebar-collapse-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-left: 1px solid #e3e8f2;
    border-radius: 0;
    background: #f8fafc;
    color: #475569;
    position: absolute;
    right: 0;
    top: 0;
    width: 4rem;
    height: 100%;
    transform: none;
}

.app-sidebar-pin {
    display: none;
}

.sidebar-collapse-button svg {
    width: 1.1rem;
    height: 1.1rem;
}

.sidebar-title {
    margin: 0 !important;
    padding: 0 !important;
}

.nav-item {
    min-height: 2.85rem;
    border-radius: 0.75rem !important;
    color: #475569 !important;
    transform: none !important;
}

.nav-item:hover,
.nav-item.is-active {
    background: #eef1f7 !important;
    color: #0f172a !important;
}

.nav-icon,
.nav-icon-grid,
.nav-icon-folder,
.nav-icon-plus,
.nav-icon-card,
.nav-icon-gear,
.nav-icon-home,
.nav-icon-file,
.nav-icon-calendar,
.nav-icon-cart {
    width: 1.45rem;
    height: 1.45rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: currentColor;
}

.nav-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-item.is-active .nav-icon {
    color: #0f172a;
}

.theme-toggle {
    justify-content: flex-start;
    gap: 0.65rem;
    min-height: 2.75rem;
    border: 2px solid #111827 !important;
    border-radius: 0.85rem !important;
    background: #ffffff !important;
    color: #64748b !important;
    padding: 0.35rem 0.55rem;
}

.theme-moon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    color: #64748b;
}

.theme-moon svg {
    width: 1rem;
    height: 1rem;
}

.theme-toggle .js-theme-label {
    flex: 1;
    color: #64748b;
    font-weight: 650;
    text-align: left;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    width: 2rem;
    height: 1.15rem;
    border: 1px solid #e8edf5;
    border-radius: 999px;
    background: #f1f4fa;
    padding: 0.12rem;
}

.theme-switch span {
    display: block;
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 0.15s ease, background 0.15s ease;
}

.theme-toggle.is-dark .theme-switch span {
    transform: translateX(0.8rem);
    background: #0b63ff;
}

.btn-primary,
.btn-secondary,
.btn-light,
.icon-button,
.form-input,
.tag-box,
.option-card,
.metric-card,
.dashboard-panel,
.page-hero,
.plans-hero,
.plans-main,
.side-panel,
.plan-folder,
.sidebar-user-link,
.sidebar-usage,
.logout-link {
    box-shadow: none !important;
}

.btn-primary:hover,
.account-pill:hover,
.app-topbar .js-sidebar-toggle:hover,
.nav-item:hover,
.plan-row:hover {
    transform: none !important;
}

.metric-card,
.dashboard-panel,
.page-hero,
.plans-hero,
.plans-main,
.side-panel,
.plan-folder {
    border-color: #dbe3ef !important;
    background: #ffffff !important;
}

.metric-card {
    min-height: 7rem;
    border-radius: 1rem;
    padding: 1.25rem 1.35rem;
}

.metric-title {
    display: flex;
    align-items: center;
    gap: 0.72rem;
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 0.7rem;
    background: #e0f2fe;
    color: #0284c7;
}

.metric-card:nth-child(5n+2) .metric-icon {
    background: #eef8ff;
    color: #0877c9;
}

.metric-card:nth-child(5n+3) .metric-icon {
    background: #f0fdf4;
    color: #159447;
}

.metric-card:nth-child(5n+4) .metric-icon {
    background: #fff7ed;
    color: #f97316;
}

.metric-card:nth-child(5n+5) .metric-icon {
    background: #ecfeff;
    color: #0891b2;
}

.metric-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.metric-label {
    color: #52627a;
    font-size: 0.8rem;
}

.metric-value {
    margin-top: 0.85rem;
    color: #06122c;
}

[data-theme="dark"] .app-topbar,
[data-theme="dark"] .app-sidebar,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .plans-hero,
[data-theme="dark"] .plans-main,
[data-theme="dark"] .side-panel,
[data-theme="dark"] .plan-folder {
    border-color: #222b3b !important;
    background: #101827 !important;
}

[data-theme="dark"] .nav-item {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .nav-item.is-active {
    background: #1c2534 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .theme-toggle {
    border-color: #e5e7eb !important;
    background: #111827 !important;
}

[data-theme="dark"] .theme-switch {
    border-color: #334155;
    background: #1f2937;
}

[data-theme="dark"] .metric-value {
    color: #ffffff !important;
}

[data-theme="dark"] .nav-item.is-active {
    border-color: transparent !important;
    outline: 0 !important;
    background: #242d3c !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .nav-item.is-active .nav-icon,
[data-theme="dark"] .nav-item.is-active .nav-icon-home,
[data-theme="dark"] .nav-item.is-active .nav-icon-file,
[data-theme="dark"] .nav-item.is-active .nav-icon-calendar,
[data-theme="dark"] .nav-item.is-active .nav-icon-cart,
[data-theme="dark"] .nav-item.is-active .nav-icon-gear {
    border-color: transparent !important;
    background: transparent !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .sidebar-brand {
    border-bottom-color: #1f2937 !important;
}

[data-theme="dark"] .app-sidebar-pin {
    color: #cbd5e1 !important;
}

.plans-total-text {
    margin-top: 0.8rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 750;
}

[data-theme="dark"] .plans-total-text {
    color: #cbd5e1;
}

@media (min-width: 1024px) {
    .app-sidebar {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 17.25rem !important;
    }

    .app-sidebar-pin {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        z-index: 60;
        top: 1.15rem;
        left: 18rem;
        width: 2rem;
        height: 2rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #475569;
    }

    .app-sidebar-pin svg {
        width: 1.1rem;
        height: 1.1rem;
    }

    body.is-authenticated main {
        padding-left: 18.5rem !important;
    }

    .sidebar-collapsed .app-sidebar {
        width: 4.75rem !important;
        align-items: center;
        padding-inline: 0.45rem !important;
    }

    .sidebar-collapsed .app-sidebar-pin {
        left: 5.5rem;
    }

    .sidebar-collapsed body.is-authenticated main,
    body.is-authenticated:has(.app-sidebar) main {
        padding-left: 18.5rem !important;
    }

    .sidebar-collapsed body.is-authenticated main {
        padding-left: 6rem !important;
    }

    .sidebar-collapsed .sidebar-brand {
        flex-direction: row;
        justify-content: center;
        min-height: 4.7rem;
        margin: -1rem -0.45rem 0;
        padding: 0;
    }

    .sidebar-collapsed .sidebar-logo-light,
    .sidebar-collapsed .sidebar-logo-dark,
    .sidebar-collapsed .sidebar-title,
    .sidebar-collapsed .nav-label,
    .sidebar-collapsed .sidebar-usage,
    .sidebar-collapsed .logout-link,
    .sidebar-collapsed .theme-toggle .js-theme-label,
    .sidebar-collapsed .theme-switch {
        display: none !important;
    }

    .sidebar-collapsed .sidebar-logo-mark {
        display: block !important;
    }

    .sidebar-collapsed .nav-item {
        justify-content: center;
        width: 3rem;
        padding-inline: 0 !important;
    }

    .sidebar-collapsed .theme-toggle {
        justify-content: center;
        width: 3rem;
        padding: 0;
    }
}

/* Small corrections after visual pass. */
.theme-toggle {
    border-width: 1px !important;
    border-color: #dbe3ef !important;
}

[data-theme="dark"] .theme-toggle {
    border-width: 1px !important;
    border-color: #334155 !important;
}

.logout-link {
    border-color: #fecaca !important;
    background: #fff1f2 !important;
    color: #dc2626 !important;
}

.logout-link:hover {
    background: #ffe4e6 !important;
    color: #b91c1c !important;
}

[data-theme="dark"] .logout-link {
    border-color: #7f1d1d !important;
    background: #3f121f !important;
    color: #fecaca !important;
}

.sidebar-logo-light,
.brand-logo-light {
    display: block !important;
}

.sidebar-logo-dark,
.brand-logo-dark,
.sidebar-logo-mark {
    display: none !important;
}

[data-theme="dark"] .sidebar-logo-light,
[data-theme="dark"] .brand-logo-light {
    display: none !important;
}

[data-theme="dark"] .sidebar-logo-dark,
[data-theme="dark"] .brand-logo-dark {
    display: block !important;
}

.login-brand-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(4.75rem, 34vw);
    height: min(4.75rem, 34vw);
    overflow: hidden;
}

.login-brand-mark {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

@media (min-width: 1024px) {
    .sidebar-collapsed .sidebar-logo-light,
    .sidebar-collapsed .sidebar-logo-dark {
        display: none !important;
    }

    .sidebar-collapsed .sidebar-logo-mark {
        display: block !important;
    }
}

/* Workspace-inspired system skin. */
:root {
    --workspace-bg: #ffffff;
    --workspace-sidebar: #f7f7f8;
    --workspace-border: #e4e4e7;
    --workspace-border-strong: #d7d7dc;
    --workspace-muted: #5f6570;
    --workspace-text: #050505;
    --workspace-soft: #f1f1f3;
    --workspace-active: #e5e5e8;
    --workspace-blue: #0153fb;
    --workspace-blue-soft: #0153fb;
    --workspace-blue-bg: #e8f0ff;
}

html {
    background: var(--workspace-bg);
}

body,
body.is-authenticated,
body.is-public {
    background: var(--workspace-bg) !important;
    color: var(--workspace-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-authenticated main {
    background: var(--workspace-bg);
}

.app-topbar {
    border-color: var(--workspace-border) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.app-sidebar {
    gap: 1rem;
    width: 15.9rem !important;
    border-color: var(--workspace-border) !important;
    background: var(--workspace-sidebar) !important;
    padding: 0.85rem 0.5rem !important;
}

.sidebar-brand {
    justify-content: flex-start;
    min-height: auto;
    margin: 0;
    padding: 0.15rem 0.45rem 0.65rem;
    border: 0;
}

.sidebar-logo {
    width: 148px;
    height: 42px;
    object-position: left center;
}

.sidebar-title {
    display: block !important;
    margin: 0 !important;
}

.sidebar-user-card {
    gap: 0.55rem;
    margin: 0 !important;
    padding: 0 0.45rem;
}

.sidebar-user-link {
    min-height: auto;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    padding: 0.2rem 0;
}

.sidebar-user-link:hover {
    background: transparent;
}

.user-avatar,
.sidebar-user-mode,
.demo-badge,
.sidebar-usage {
    display: none !important;
}

.sidebar-user-name {
    color: var(--workspace-text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.nav-item {
    min-height: 2.25rem;
    border-radius: 0.4rem !important;
    padding: 0.45rem 0.55rem !important;
    color: var(--workspace-text) !important;
    font-size: 0.9rem;
    font-weight: 500 !important;
}

.nav-item:hover,
.nav-item.is-active,
.nav-item.bg-blue-600 {
    background: var(--workspace-active) !important;
    color: var(--workspace-text) !important;
}

.nav-icon,
.nav-icon-home,
.nav-icon-file,
.nav-icon-calendar,
.nav-icon-cart,
.nav-icon-gear {
    width: 1.15rem;
    height: 1.15rem;
    color: currentColor !important;
}

.nav-icon svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 1.85;
}

.sidebar-add-link {
    display: none !important;
}

.theme-toggle {
    display: none !important;
}

.logout-link {
    min-height: 2rem !important;
    width: fit-content;
    border: 0 !important;
    border-radius: 0.4rem !important;
    background: transparent !important;
    padding: 0.35rem 0.6rem !important;
    color: var(--workspace-muted) !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
}

.logout-link:hover {
    background: var(--workspace-active) !important;
    color: var(--workspace-text) !important;
}

.btn-primary,
.btn-secondary,
.btn-light,
.icon-button {
    min-height: 2.25rem;
    border-radius: 0.42rem !important;
    padding: 0.55rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1;
}

.btn-primary {
    border-color: #0153fb !important;
    background: #0153fb !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    border-color: #0147d6 !important;
    background: #0147d6 !important;
    color: #ffffff !important;
}

.btn-secondary,
.btn-light,
.icon-button {
    border: 1px solid var(--workspace-border) !important;
    background: #ffffff !important;
    color: var(--workspace-muted) !important;
}

.btn-secondary:hover,
.btn-light:hover,
.icon-button:hover {
    border-color: var(--workspace-border-strong) !important;
    background: #fafafa !important;
    color: var(--workspace-text) !important;
}

.form-label {
    margin-bottom: 0.55rem;
    color: var(--workspace-text);
    font-size: 0.88rem;
    font-weight: 600;
}

.form-input,
.tag-box,
.location-options {
    border-color: var(--workspace-border-strong) !important;
    border-radius: 0.45rem !important;
    background: #ffffff !important;
    color: var(--workspace-text);
}

.form-input {
    min-height: 2.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.form-input:focus,
.tag-box:focus-within {
    border-color: var(--workspace-blue-soft) !important;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.28) !important;
}

.page-hero,
.plans-hero {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

.page-hero h1,
.plans-hero h1,
.workspace-title {
    color: var(--workspace-text) !important;
    font-size: 1.55rem !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    line-height: 1.18 !important;
}

.page-hero p,
.plans-hero p,
.workspace-description {
    color: var(--workspace-muted) !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.dashboard-panel,
.metric-card,
.plans-main,
.plan-folder,
.option-card,
.rounded-xl.border,
article.rounded-xl.border {
    border-color: var(--workspace-border) !important;
    border-radius: 0.65rem !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

.metric-card {
    min-height: 6.25rem;
    padding: 1.15rem 1.25rem;
}

.metric-label,
.mini-label {
    color: var(--workspace-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.metric-value,
.mini-value {
    color: var(--workspace-text) !important;
    font-weight: 650;
}

.metric-value {
    font-size: 1.65rem;
}

.option-card {
    min-height: 3.6rem;
    padding: 0.9rem 1rem;
    color: var(--workspace-text);
    font-weight: 550;
}

.option-card:has(input:checked) {
    border-color: var(--workspace-blue) !important;
    background: var(--workspace-blue-bg) !important;
}

.option-card input,
.check-row input {
    accent-color: var(--workspace-blue);
}

.tag-pill {
    border-radius: 0.35rem;
    background: var(--workspace-blue-bg);
    color: var(--workspace-blue);
}

.info-dot {
    color: #8a8f99;
}

.plans-shell,
.workspace-shell {
    display: grid;
    gap: 3.25rem;
}

.plans-layout,
.workspace-layout {
    display: grid;
    gap: 1.35rem;
}

.plans-main {
    padding: 0;
}

.plans-section-head {
    margin: 0 0 1rem;
}

.plan-row summary {
    padding: 1rem 1.15rem;
}

.plan-row-body {
    border-top-color: var(--workspace-border);
}

.plan-tags span {
    border-radius: 0.35rem;
    background: var(--workspace-blue-bg);
    color: var(--workspace-blue);
}

.folder-chevron {
    color: var(--workspace-text);
}

table thead {
    background: #fafafa !important;
}

table th {
    color: var(--workspace-muted) !important;
    letter-spacing: 0 !important;
}

.workspace-card {
    border: 1px solid var(--workspace-border);
    border-radius: 0.65rem;
    background: #ffffff;
}

.workspace-section-title {
    color: var(--workspace-text);
    font-size: 1rem;
    font-weight: 650;
}

.workspace-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.workspace-danger {
    border-top: 1px solid transparent;
    padding-top: 3.5rem;
}

.pricing-grid {
    display: grid;
    gap: 1.45rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-card {
    position: relative;
    min-height: 35.4rem;
    border: 1px solid var(--workspace-border);
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 1.55rem 1.55rem 1.4rem;
}

.pricing-card.is-popular {
    border-color: var(--workspace-blue);
    background: #f0f9ff;
}

.popular-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    border-radius: 0.45rem;
    background: #bae6fd;
    padding: 0.25rem 0.55rem;
    color: var(--workspace-blue);
    font-size: 0.74rem;
    font-weight: 700;
}

.pricing-card h2 {
    color: var(--workspace-text);
    font-size: 1.28rem;
    font-weight: 700;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-top: 1.35rem;
}

.price-row strong {
    color: var(--workspace-text);
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1;
}

.price-row span {
    color: var(--workspace-muted);
    font-size: 0.86rem;
}

.old-price {
    text-decoration: line-through;
}

.pricing-card > p {
    margin-top: 0.65rem;
    color: var(--workspace-muted);
    font-size: 0.82rem;
}

.pricing-features {
    display: grid;
    gap: 0;
    margin-top: 1.5rem;
    border-top: 1px solid #eeeeef;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.82rem;
    border-bottom: 1px solid #eeeeef;
    color: var(--workspace-text);
    font-size: 0.88rem;
}

.pricing-features li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    color: var(--workspace-blue);
}

.pricing-features svg {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 1024px) {
    .app-topbar {
        display: none;
    }

    .app-sidebar {
        top: 0 !important;
        width: 15.9rem !important;
    }

    body.is-authenticated main {
        padding-top: 4.1rem !important;
        padding-left: 15.9rem !important;
        padding-right: 2rem !important;
    }

    body.is-authenticated main > .mx-auto {
        max-width: none !important;
    }

    .dashboard-page,
    .results-page,
    .saved-plans-page {
        max-width: 64rem;
        margin: 0 auto;
    }

    .settings-page,
    .new-planning-page {
        max-width: 41rem;
        margin: 0 auto;
    }

    .billing-page {
        max-width: 80rem;
        margin: 0 auto;
    }

    .sidebar-collapsed .app-sidebar {
        width: 4.75rem !important;
    }

    .sidebar-collapsed body.is-authenticated main,
    body.is-authenticated:has(.app-sidebar) main {
        padding-left: 15.9rem !important;
    }

    .sidebar-collapsed body.is-authenticated main {
        padding-left: 5.75rem !important;
    }
}

@media (max-width: 1023px) {
    body.is-authenticated main {
        padding-top: 5.5rem !important;
    }

    .app-sidebar {
        top: 4rem !important;
    }

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

@media (min-width: 640px) and (max-width: 1279px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

[data-theme="dark"] body,
[data-theme="dark"] body.is-authenticated,
[data-theme="dark"] body.is-public {
    background: #0b0f17 !important;
    color: #f8fafc;
}

[data-theme="dark"] .app-sidebar,
[data-theme="dark"] .app-topbar,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .plans-main,
[data-theme="dark"] .plan-folder,
[data-theme="dark"] .option-card,
[data-theme="dark"] .rounded-xl.border,
[data-theme="dark"] article.rounded-xl.border,
[data-theme="dark"] .workspace-card,
[data-theme="dark"] .pricing-card {
    border-color: #252b36 !important;
    background: #111827 !important;
}

[data-theme="dark"] .pricing-card.is-popular {
    border-color: #38bdf8 !important;
    background: #082f49 !important;
}

[data-theme="dark"] .app-sidebar {
    background: #0f172a !important;
}

[data-theme="dark"] .nav-item,
[data-theme="dark"] .sidebar-user-name,
[data-theme="dark"] .page-hero h1,
[data-theme="dark"] .plans-hero h1,
[data-theme="dark"] .workspace-title,
[data-theme="dark"] .form-label,
[data-theme="dark"] .workspace-section-title,
[data-theme="dark"] .pricing-card h2,
[data-theme="dark"] .price-row strong,
[data-theme="dark"] .pricing-features li {
    color: #f8fafc !important;
}

[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .nav-item.is-active,
[data-theme="dark"] .nav-item.bg-blue-600 {
    background: #1f2937 !important;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .tag-box,
[data-theme="dark"] .location-options {
    border-color: #334155 !important;
    background: #0f172a !important;
    color: #f8fafc;
}
