/* Legacy names alias the --ds-* tokens defined in base.html */
:root {
    --bg-color: var(--ds-color-page);
    --text-color: var(--ds-color-text);
    --primary-color: var(--ds-color-primary);
    --secondary-color: var(--ds-color-primary-hover);
    --accent-color: var(--ds-color-chrome);
    --sidebar-bg: var(--ds-color-surface);
    --header-bg: var(--ds-color-surface);
    --input-bg: var(--ds-color-surface);
    --border-color: var(--ds-color-border);
    --hover-bg: var(--ds-color-hover);
    --shadow: var(--ds-shadow-card);
}


    .btn-compact {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        line-height: 1.5;
        border-radius: 0.2rem;
    }

/* Global Styles */
body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 60px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ds-color-text);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--ds-color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Button Styles */
button, input[type="submit"], .btn, .cta-button {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

button:hover, input[type="submit"]:hover, .btn:hover, .cta-button:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

/* Form Styles */
form {
    background-color: var(--sidebar-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(15, 122, 90, 0.25);
    outline: none;
}

/* Header Styles */
.top-nav {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--ds-color-primary);
    text-decoration: none;
    padding-left: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    margin-left: 1rem;
}

.nav-links a {
    color: var(--ds-color-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-button {
    background: none;
    border: none;
    color: var(--ds-color-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: var(--ds-color-primary-tint);
}

/* Remove any form styles that might be affecting the logout button */
.nav-links form {
    margin: 0;
    padding: 0;
}

.nav-links form button {
    background: none;
    border: none;
    color: var(--ds-color-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-links form button:hover {
    background-color: var(--ds-color-primary-tint);
}

/* Responsive menu toggle */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #f8f9fa;
        padding: 1rem;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
}

/* Main container */
.main-container {
    display: flex;
    margin-top: 60px; /* Height of the top nav */
    padding: 0;
}

/* Side Navigation Styles */
.side-nav {
    width: 80px;
    height: calc(100vh - 60px); /* Full height minus top nav */
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    position: fixed;
    top: 60px;
    left: 0;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li {
    text-align: center;
}

.side-nav a {
    display: block;
    padding: 15px 0;
    color: var(--ds-color-text);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.side-nav a:hover {
    background-color: #e9ecef;
}

.side-nav a[aria-current="page"] {
    background-color: #dbe9f6;
    box-shadow: inset 3px 0 0 var(--ds-color-primary);
}

.side-nav-label {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
}

.side-nav a:focus-visible,
.nav-links a:focus-visible,
.nav-links button:focus-visible {
    outline: 3px solid #1d6fb8;
    outline-offset: -3px;
}

.side-nav i {
    font-size: 24px;
}

/* Main content area */
main {
    flex-grow: 1;
    margin-left: 80px; /* Width of the side nav */
    padding: 20px;
}

/* Phone: bottom tab bar */
@media screen and (max-width: 768px) {
    .side-nav {
        width: 100%;
        height: auto;
        top: auto;
        bottom: 0;
        z-index: 1000;
        box-sizing: border-box;
        padding-bottom: env(safe-area-inset-bottom);
        border-right: 0;
        border-top: 1px solid #e0e0e0;
    }

    .side-nav ul {
        display: flex;
    }

    .side-nav li {
        flex: 1 1 0;
        min-width: 0;
    }

    .side-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 56px;
        padding: 6px 0;
    }

    .side-nav a[aria-current="page"] {
        box-shadow: inset 0 3px 0 #3498db;
    }

    .side-nav-label {
        margin-top: 2px;
        font-size: 9px;
        letter-spacing: -0.03em;
        max-width: 100%;
        white-space: nowrap;
    }

    .side-nav i {
        font-size: 18px;
    }

    main {
        margin-left: 0;
        min-width: 0;
    }

    .compact-footer {
        margin-bottom: calc(56px + env(safe-area-inset-bottom));
    }
}

.content {
    flex: 1;
    padding: 0 2rem;
}

/* Table Styles */
table, .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--ds-color-header-bg);
    color: var(--ds-color-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) {
    background-color: var(--bg-color);
}

tr:hover {
    background-color: var(--hover-bg);
}

/* KPI Styles */
.kpi-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    padding: 1rem;
    width: 23%;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.kpi-card h3 {
    margin-top: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

/* Tag Styles */
.tag {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 16px;
    font-size: 0.8rem;
    color: #ffffff;
    background-color: var(--secondary-color);
    white-space: nowrap;
}

.tag-cell {
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
}

.tag-icons {
    display: flex;
    flex-wrap: wrap;
}

.tag-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-block;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
}

.remove-tag {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-weight: bold;
    margin-left: 0.3rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.remove-tag:hover {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--sidebar-bg);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

#existingTags {
    margin-bottom: 1rem;
}

#newTagInput {
    width: 100%;
    margin-bottom: 1rem;
}

/* Footer Styles */
footer {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_filter input {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.3rem;
}

.dataTables_wrapper .dataTables_length select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.3rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .content {
        padding: 0;
    }

    .kpi-container {
        flex-wrap: wrap;
    }

    .kpi-card {
        width: 48%;
        margin-bottom: 1rem;
    }
}

/* In your style.css file */

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.pricing-container h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.billing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.billing-toggle span {
    margin: 0 1rem;
}

.billing-toggle .savings {
    background-color: #e0f2fe;
    color: #0284c7;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.pricing-tiers {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-tier {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    width: calc(33.333% - 1.5rem);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-tier:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.pricing-tier.highlight {
    border: 2px solid var(--primary-color);
}

.pricing-tier h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tier-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.price .period {
    font-size: 1rem;
    color: #666;
}

.users {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.pricing-tier .btn {
    margin-bottom: 1.5rem;
}

.features {
    list-style-type: none;
    padding: 0;
    text-align: left;
}

.features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .pricing-tiers {
        flex-direction: column;
    }

    .pricing-tier {
        width: 100%;
        margin-bottom: 1.5rem;
    }
}

.compact-footer {
    background-color: #f8f9fa;
    padding: 20px 0;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    margin-right: 20px;
}

.footer-section:last-child {
    margin-right: 0;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--ds-color-text);
}

.footer-section p, .footer-section a {
    color: #666;
    line-height: 1.4;
}

.footer-section a {
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    color: #888;
    font-size: 0.8rem;
}

.footer-bottom p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

.blog-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1rem;
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.blog-card-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.blog-card-excerpt {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.read-more-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: #0056b3;
}

#notifications-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.notification-alert {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-width: 300px;
}
/* App shell (authenticated, desktop only; phone layout is untouched) */
.rail-brand { display: none; }

.footer-copy { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.compact-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 0 24px;
    font-size: 12px;
    color: #5C6B64;
    background-color: #F5F3EC;
    border-top: 1px solid #E4E0D3;
}
.compact-footer a { color: #5C6B64; text-decoration: underline; }
.compact-footer a:hover { color: #10201B; }
.compact-footer a:focus-visible { outline: 2px solid #0F7A5A; outline-offset: 2px; border-radius: 2px; }

@media screen and (max-width: 480px) {
    .compact-footer { flex-direction: column; justify-content: center; padding: 8px 16px; }
}

@media screen and (min-width: 769px) {
    body.app-shell { background-color: #F5F3EC; padding-top: 64px; }
    body.app-shell .top-nav { left: 240px; height: 64px; background-color: #0B1F1A; box-shadow: none; border-bottom: 1px solid #1A362E; }
    body.app-shell .top-nav .container { max-width: none; padding: 0; }
    body.app-shell .nav-wrapper { height: 64px; justify-content: flex-end; padding: 0 24px; }
    body.app-shell .nav-wrapper .logo { display: none; }
    body.app-shell .nav-links { gap: 8px; }
    body.app-shell .nav-links li { margin-left: 0; }
    body.app-shell .nav-links a { color: #9FB3A8; padding: 8px 12px; border-radius: 8px; display: inline-block; }
    body.app-shell .nav-links a:hover { color: #FFFFFF; background-color: #16342C; }
    body.app-shell .nav-links form { background: none; box-shadow: none; }
    body.app-shell .nav-links form button.nav-logout {
        color: #FFFFFF;
        background: transparent;
        border: 1px solid #9FB3A8;
        border-radius: 8px;
        padding: 6px 14px;
        box-shadow: none;
    }
    body.app-shell .nav-links form button.nav-logout:hover { background-color: #16342C; border-color: #FFFFFF; }
    body.app-shell .nav-links a:focus-visible,
    body.app-shell .nav-links button:focus-visible { outline: 2px solid #C8F03C; outline-offset: 2px; }

    body.app-shell .main-container { margin-top: 0; }
    body.app-shell .rail-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 64px;
        padding: 0 20px;
        box-sizing: border-box;
        z-index: 1001;
        background-color: #0B1F1A;
        color: #FFFFFF;
        border-bottom: 1px solid #1A362E;
    }
    body.app-shell .rail-brand:hover { color: #FFFFFF; }
    body.app-shell .rail-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
    body.app-shell .rail-brand-sub { color: #9FB3A8; font-weight: 600; }
    body.app-shell .rail-brand:focus-visible { outline: 2px solid #C8F03C; outline-offset: -4px; }

    body.app-shell .side-nav {
        width: 240px;
        top: 0;
        bottom: 0;
        height: auto;
        box-sizing: border-box;
        padding: 80px 12px 16px;
        background-color: #0B1F1A;
        border-right: 0;
        border-radius: 0;
        overflow-y: auto;
    }
    body.app-shell .side-nav ul { display: grid; gap: 4px; }
    body.app-shell .side-nav li { text-align: left; }
    body.app-shell .side-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 8px;
        color: #9FB3A8;
        font-size: 14px;
    }
    body.app-shell .side-nav a:hover { background-color: #16342C; color: #FFFFFF; }
    body.app-shell .side-nav i { width: 20px; font-size: 16px; text-align: center; }
    body.app-shell .side-nav-label { display: inline; margin: 0; font-size: 14px; }
    body.app-shell .side-nav a[aria-current="page"] { background-color: #16342C; color: #FFFFFF; box-shadow: none; }
    body.app-shell .side-nav a[aria-current="page"]::after {
        content: "";
        width: 8px;
        height: 8px;
        margin-left: auto;
        border-radius: 50%;
        background-color: #C8F03C;
    }
    body.app-shell .side-nav a:focus-visible { outline: 2px solid #C8F03C; outline-offset: 2px; }

    body.app-shell main { margin-left: 240px; padding: 24px; }
    body.app-shell .dashboard-container { max-width: 1280px; margin: 0 auto; }
    body.app-shell .compact-footer { margin-left: 240px; }
}

:focus-visible { outline: 2px solid var(--ds-color-primary); outline-offset: 2px; }

/* Auth card */
.auth-wrap { display: flex; justify-content: center; padding: var(--ds-space-6) var(--ds-space-4); background: var(--ds-color-header-bg); border-radius: var(--ds-radius-card); }
.auth-card { width: 100%; max-width: 420px; box-sizing: border-box; background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-card); padding: var(--ds-space-6); color: var(--ds-color-text); }
.auth-brand { display: inline-flex; align-items: center; gap: var(--ds-space-2); margin-bottom: var(--ds-space-4); color: var(--ds-color-primary); font-weight: 700; text-decoration: none; }
.auth-brand-sub { font-weight: 400; color: var(--ds-color-muted); }
.auth-title { margin: 0 0 var(--ds-space-2); font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.auth-subhead { margin: 0 0 var(--ds-space-4); color: var(--ds-color-muted); }
.auth-errors { margin-bottom: var(--ds-space-4); padding: var(--ds-space-3); border: 1px solid var(--ds-color-error); border-radius: var(--ds-radius); background: var(--ds-color-error-tint); color: var(--ds-color-error); font-size: 0.875rem; }
.auth-errors-title { margin: 0 0 var(--ds-space-1); font-weight: 600; }
.auth-errors ul { margin: 0; padding-left: var(--ds-space-4); list-style: disc; }
.auth-errors a { color: inherit; text-decoration: underline; }
.ds-help ul { margin: 0; padding-left: var(--ds-space-4); list-style: disc; }
.ds-help li { margin: 0; }
.auth-submit { display: block; width: 100%; box-sizing: border-box; padding: var(--ds-space-3) var(--ds-space-4); border: 1px solid var(--ds-color-primary); border-radius: var(--ds-radius); background: var(--ds-color-primary); color: #fff; font-size: 1rem; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ds-space-2) var(--ds-space-4); margin: var(--ds-space-4) 0 0; font-size: 0.875rem; }
.auth-links a, .auth-fineprint a { color: var(--ds-color-primary); }
.auth-fineprint { margin: var(--ds-space-4) 0 0; color: var(--ds-color-muted); font-size: 0.8125rem; }
.auth-card form { background: none; padding: 0; border-radius: 0; box-shadow: none; }
.auth-card .ds-field input { margin-bottom: 0; }
.auth-card h1 { color: var(--ds-color-text); font-size: 1.5rem; margin-bottom: var(--ds-space-2); }
body:not(.app-shell) main:has(.auth-wrap) { margin-left: 0; padding: var(--ds-space-4) 0; }
@media (max-width: 480px) {
    .auth-wrap { padding: var(--ds-space-3); }
    .auth-card { padding: var(--ds-space-4); }
}

/* Prospect and opportunity record pages */
.record-page { display: grid; gap: var(--ds-space-6); max-width: 1280px; min-width: 0; color: var(--ds-color-text); }
.record-card, .record-page .comments-section { min-width: 0; box-sizing: border-box; background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-card); box-shadow: var(--ds-shadow-card); padding: var(--ds-space-6); margin: 0; }
.record-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-4) var(--ds-space-6); }
.record-identity { flex: 1 1 280px; min-width: 0; }
.record-title { margin: 0 0 var(--ds-space-2); font-family: var(--font-display); font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.record-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--ds-radius-pill); background: #eae8df; color: var(--ds-color-text); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.record-contact { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-1) var(--ds-space-3); margin: 0; }
.record-label { color: var(--ds-color-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.record-value, .record-wrap { overflow-wrap: anywhere; min-width: 0; }
.record-mono { font-family: var(--font-mono); font-size: 13px; }
.record-tags { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); margin: var(--ds-space-3) 0 0; padding: 0; list-style: none; }
.record-tag-dot { display: inline-block; width: 8px; height: 8px; margin-right: var(--ds-space-2); border-radius: var(--ds-radius-pill); }
.record-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.record-actions form { margin: 0; padding: 0; background: none; box-shadow: none; }
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-6); align-items: start; }
.record-grid > .opportunities, .record-grid > .status-changes { grid-column: 1 / -1; }
.record-card-title, .record-page .comments-title { margin: 0 0 var(--ds-space-4); font-family: var(--font-display); font-size: 18px; line-height: 28px; font-weight: 600; color: var(--ds-color-text); }
.record-table-wrap { position: relative; overflow-x: auto; max-width: 100%; }
.record-table { width: 100%; margin: 0; box-shadow: none; border-radius: 0; background: var(--ds-color-surface); }
.record-table th { background: var(--ds-color-header-bg); color: var(--ds-color-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--ds-color-border); }
.record-table td { border-bottom: 1px solid var(--ds-color-border); }
.record-table tr:nth-child(even) { background: transparent; }
.record-table tbody tr:hover { background: var(--ds-color-hover); }
.record-row-actions { white-space: nowrap; }
.record-link { display: inline-flex; align-items: center; min-height: 44px; margin-right: var(--ds-space-3); color: var(--ds-color-primary); font-weight: 600; text-decoration: none; }
.record-link:hover { text-decoration: underline; }
.record-link--quiet { color: var(--ds-color-muted); font-weight: 400; text-decoration: underline; }
.record-empty { padding: var(--ds-space-4); border: 1px dashed var(--ds-color-border); border-radius: var(--ds-radius); color: var(--ds-color-muted); text-align: center; list-style: none; }
td.record-empty { border: 1px dashed var(--ds-color-border); }
.record-list { display: grid; gap: var(--ds-space-3); margin: 0 0 var(--ds-space-4); padding: 0; list-style: none; }
.record-followup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: var(--ds-space-3); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius); }
.record-followup-main { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ds-space-1); flex: 1 1 200px; min-width: 0; }
.record-followup-title { font-weight: 600; overflow-wrap: anywhere; }
.record-followup-due { color: var(--ds-color-muted); }
.record-due--overdue { color: var(--ds-color-error); font-weight: 600; }
.record-due--today { color: var(--ds-color-warning); font-weight: 600; }
.record-followup-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.record-followup-actions form { margin: 0; padding: 0; background: none; box-shadow: none; }
.record-followup-form { margin: 0; padding: var(--ds-space-4) 0 0; border-top: 1px solid var(--ds-color-border); background: none; box-shadow: none; display: grid; gap: var(--ds-space-3); }
.record-followup-form .ds-field { margin: 0; }
.record-followup-form input, .record-followup-form select { display: block; width: 100%; min-height: 44px; box-sizing: border-box; }
.record-facts { display: grid; gap: var(--ds-space-3); margin: 0; }
.record-facts div { display: grid; grid-template-columns: minmax(96px, 30%) minmax(0, 1fr); gap: var(--ds-space-3); }
.record-facts dt { color: var(--ds-color-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.record-facts dd { margin: 0; overflow-wrap: anywhere; }
.record-person { display: flex; align-items: center; gap: var(--ds-space-4); margin-bottom: var(--ds-space-4); }
.record-person-name { margin: 0 0 var(--ds-space-1); font-weight: 600; overflow-wrap: anywhere; }
.record-page .comment-form { display: grid; gap: var(--ds-space-3); margin: 0 0 var(--ds-space-4); padding: 0; background: none; box-shadow: none; }
.record-page .comment-form textarea { width: 100%; min-height: 88px; box-sizing: border-box; padding: var(--ds-space-2) var(--ds-space-3); border: 1px solid var(--ds-color-muted); border-radius: var(--ds-radius); font: inherit; }
.record-page .comment-form button { justify-self: start; min-height: 44px; padding: var(--ds-space-2) var(--ds-space-4); border: 1px solid transparent; border-radius: var(--ds-radius); background: var(--ds-color-primary); color: #fff; font-weight: 600; cursor: pointer; }
.record-page .comment-form button:hover { background: var(--ds-color-primary-hover); }
.record-page .comments-list { display: grid; gap: var(--ds-space-3); }
.record-page .comment-card { padding: var(--ds-space-3); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius); }
.record-page .comment-content { margin: 0 0 var(--ds-space-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.record-page .comment-meta { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); color: var(--ds-color-muted); font-size: 0.875rem; }
.record-page .comment-date { font-family: var(--font-mono); font-size: 13px; }
.record-page .no-comments { margin: 0; padding: var(--ds-space-4); border: 1px dashed var(--ds-color-border); border-radius: var(--ds-radius); color: var(--ds-color-muted); text-align: center; }
@media (max-width: 768px) {
    .record-grid { grid-template-columns: minmax(0, 1fr); }
    .record-card, .record-page .comments-section { padding: var(--ds-space-4); }
    .record-title { font-size: 24px; line-height: 32px; }
    .record-facts div { grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-1); }
}

/* Customer record page */
.customer-profile .current-plan { background: var(--ds-color-surface); color: var(--ds-color-text); margin: 0; }
.customer-plan-name { margin: 0 0 var(--ds-space-1); font-family: var(--font-display); font-size: 18px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.customer-plan-price { margin: 0 0 var(--ds-space-3); font-size: 18px; }
.customer-chart { position: relative; height: 200px; }
.customer-profile .record-grid > #followups, .customer-profile .record-grid > .comments-section { grid-column: 1 / -1; }
.customer-profile .record-actions .ds-btn { white-space: normal; }

/* Dashboard */
.dash { display: grid; gap: var(--ds-space-6); max-width: 1280px; min-width: 0; color: var(--ds-color-text); }
.dash-h1 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.dash-card { min-width: 0; box-sizing: border-box; background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-card); box-shadow: var(--ds-shadow-card); padding: var(--ds-space-6); }
.dash-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); margin-bottom: var(--ds-space-4); }
.dash-title { margin: 0 0 var(--ds-space-4); font-family: var(--font-display); font-size: 18px; line-height: 28px; font-weight: 600; }
.dash-card-head .dash-title { margin: 0; }
.dash-intro { margin: 0 0 var(--ds-space-4); }
.dash-muted { color: var(--ds-color-muted); }
.dash-strong { font-weight: 600; }
.dash-link { color: var(--ds-color-primary); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.dash-link:hover { text-decoration: underline; }
.dash-link:focus-visible, .dash-tab:focus-visible, .dash-stat:focus-visible { outline: 2px solid var(--ds-color-primary); outline-offset: 2px; }
.dash-stat--dark:focus-visible { outline-color: var(--ds-color-signal); }
.dash-tabs { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); margin-bottom: var(--ds-space-4); }
.dash-tab { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--ds-space-4); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius); color: var(--ds-color-primary); font-weight: 600; text-decoration: none; }
.dash-tab:hover { background: var(--ds-color-hover); }
.dash-tab.is-current { background: var(--ds-color-primary); border-color: var(--ds-color-primary); color: #fff; }
.dash-tab--end { margin-left: auto; border-color: transparent; }
.dash-list { display: grid; margin: 0; padding: 0; list-style: none; }
.dash-task, .dash-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-4); padding: var(--ds-space-3) 0; border-top: 1px solid var(--ds-color-border); }
.dash-task { justify-content: space-between; }
.dash-task-main, .dash-row-main { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.dash-row-main { display: flex; flex-direction: column; }
.dash-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-4); }
.dash-due { font-weight: 600; }
.dash-due--overdue { color: var(--ds-color-error); }
.dash-due--today { color: var(--ds-color-warning); }
.dash-empty { margin: 0; padding: var(--ds-space-4); border: 1px dashed var(--ds-color-border); border-radius: var(--ds-radius); color: var(--ds-color-muted); text-align: center; }
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ds-space-4); }
.dash-stat { display: flex; flex-direction: column; gap: var(--ds-space-2); min-width: 0; box-sizing: border-box; padding: var(--ds-space-6); background: var(--ds-color-surface); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-card); box-shadow: var(--ds-shadow-card); color: var(--ds-color-text); text-decoration: none; }
.dash-stat:hover { background: var(--ds-color-hover); }
.dash-stat-num { font-family: var(--font-display); font-size: 36px; line-height: 40px; font-weight: 600; }
.dash-stat-label { color: var(--ds-color-muted); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.dash-stat--dark { background: var(--ds-color-chrome); border-color: var(--ds-color-chrome); }
.dash-stat--dark:hover { background: var(--ds-color-chrome-raised); }
.dash-stat--dark .dash-stat-num { color: var(--ds-color-signal); }
.dash-stat--dark .dash-stat-label { color: #fff; }
.dash-recent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-6); align-items: start; }
.dash-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--ds-radius-pill); background: #eae8df; color: var(--ds-color-text); font-family: var(--font-display); font-weight: 600; }
.dash-mono { font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 1100px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-recent { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .dash-stats { grid-template-columns: minmax(0, 1fr); } .dash-card { padding: var(--ds-space-4); } }

/* Organization admin, notification history, follow-up agenda */
.org-person { display: inline-flex; align-items: center; gap: var(--ds-space-3); }
.org-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--ds-radius-pill); background: #eae8df; color: var(--ds-color-text); font-family: var(--font-display); font-weight: 600; }
.org-members th, .org-members td, .org-prefs-form .record-table th, .org-prefs-form .record-table td { padding: var(--ds-space-3); text-align: left; vertical-align: middle; }
.org-members td.record-wrap, .org-members .record-wrap { min-width: 0; }
.org-inline-form { margin: 0; padding: 0; background: none; box-shadow: none; }
.org-invite-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ds-space-3); margin: 0; padding: 0; background: none; box-shadow: none; }
.org-invite-form .ds-field { flex: 1 1 260px; margin: 0; }
.org-seats, .org-hint { margin: var(--ds-space-4) 0 0; color: var(--ds-color-muted); }
.org-invitation { align-items: center; }
.inquiry-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.org-inline-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); margin-top: var(--ds-space-3); }
.org-link-field { flex: 2 1 280px; margin: 0; }
.org-link-field input { font-family: var(--font-mono); font-size: 13px; }
.org-prefs-form { margin: 0; padding: 0; background: none; box-shadow: none; display: grid; gap: var(--ds-space-4); justify-items: start; }
.org-prefs-form .record-table-wrap { width: 100%; }
.org-prefs-form td.ds-field { margin: 0; }
.org-row-label { font-weight: 600; }
.org-row-label label { font-weight: 600; }
.notice-item--unread { background: var(--ds-color-header-bg); }
.notice-item--unread .record-followup-title { font-weight: 700; }
.notice-link { min-height: 0; margin-right: 0; font-weight: inherit; }
.agenda-filters { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.agenda-filter { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--ds-space-4); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-pill); background: var(--ds-color-surface); color: var(--ds-color-primary); font-weight: 600; text-decoration: none; }
.agenda-filter:hover { background: var(--ds-color-hover); }
.agenda-filter--active { background: var(--ds-color-text); border-color: var(--ds-color-text); color: #fff; }
.agenda-chip--overdue { background: var(--ds-color-error-tint); color: var(--ds-color-error); }
.agenda-chip--today { background: var(--ds-chip-success-bg); color: var(--ds-chip-success-fg); }
.agenda-assignee { color: var(--ds-color-muted); }
.agenda-scopes { margin-top: var(--ds-space-2); }
.agenda-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-4); }
.org-members { min-width: 860px; }

.agenda-main { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-3); }

.record-note { margin: var(--ds-space-3) 0 0; color: var(--ds-color-muted); font-size: 0.875rem; }

.record-disclosure { padding-top: var(--ds-space-4); border-top: 1px solid var(--ds-color-border); }
.record-disclosure > summary { display: inline-flex; list-style: none; cursor: pointer; }
.record-disclosure > summary::-webkit-details-marker { display: none; }
.record-disclosure[open] > summary { margin-bottom: var(--ds-space-4); }
.record-disclosure .record-followup-form { border-top: 0; padding-top: 0; }

/* Ideal client profiles */
.icp-intro { color: var(--ds-color-muted); max-width: 60ch; }
.icp-list { display: grid; gap: var(--ds-space-4); padding: 0; }
.icp-summary-heading { margin: var(--ds-space-2) 0 var(--ds-space-1); font-weight: 600; }
.icp-summary { margin: 0; display: grid; gap: var(--ds-space-1); }
.icp-summary > div { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.icp-summary dt { font-weight: 600; min-width: 7rem; }
.icp-summary dd { margin: 0; }
.icp-choices { border: 0; padding: 0; margin: 0 0 var(--ds-space-4); }
.icp-choices legend { font-weight: 600; padding: 0; margin-bottom: var(--ds-space-2); }
.icp-choice-list { display: flex; flex-wrap: wrap; gap: var(--ds-space-2) var(--ds-space-4); }
.icp-choice { display: inline-flex; align-items: center; gap: var(--ds-space-2); min-height: 32px; }
.icp-exclusions summary { cursor: pointer; }
.icp-empty { padding: var(--ds-space-6, 24px); }
