/* ═══════════════════════════════════════════════════════════════
   CAARMO GLOBAL STYLESHEET v1.0
   Complete site-wide CSS replacing WordPress theme defaults.
   Brand: CAARMO  |  Accent: #33B54A  |  Font: Montserrat
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. GOOGLE FONTS ────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── 2. DESIGN TOKENS ───────────────────────────────────────── */

:root {
    /* Brand */
    --green:            #33B54A;
    --green-hover:      #2a9e3f;
    --green-5:          rgba(51,181,74,0.05);
    --green-8:          rgba(51,181,74,0.08);
    --green-10:         rgba(51,181,74,0.10);
    --green-15:         rgba(51,181,74,0.15);
    --green-20:         rgba(51,181,74,0.20);
    --green-glow:       rgba(51,181,74,0.25);

    /* Neutrals */
    --black:            #0a0a0a;
    --gray-900:         #111827;
    --gray-800:         #1f2937;
    --gray-700:         #374151;
    --gray-600:         #4b5563;
    --gray-500:         #585555;
    --gray-400:         #9ca3af;
    --gray-300:         #d1d5db;
    --gray-200:         #e5e7eb;
    --gray-100:         #f3f4f6;
    --gray-50:          #f9fafb;
    --white:            #ffffff;

    /* Surfaces */
    --bg-page:          #f4f5f7;
    --bg-body:          var(--white);
    --surface:          var(--white);
    --surface-alt:      #f7f8fa;
    --surface-muted:    #f0f0f0;

    /* Borders */
    --border:           #e2e2e2;
    --border-light:     #eef0f2;
    --border-dark:      #d1d5db;

    /* Shadows */
    --shadow-xs:        0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:        0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:        0 4px 14px rgba(0,0,0,0.07);
    --shadow-lg:        0 10px 30px rgba(0,0,0,0.09);
    --shadow-xl:        0 16px 48px rgba(0,0,0,0.12);
    --shadow-green:     0 4px 16px rgba(51,181,74,0.25);
    --shadow-card:      0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    --shadow-card-hover:0 2px 8px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);

    /* Radii */
    --radius-xs:        4px;
    --radius-sm:        6px;
    --radius-md:        10px;
    --radius-lg:        14px;
    --radius-xl:        20px;
    --radius-pill:      999px;

    /* Spacing scale */
    --sp-1:  4px;  --sp-2:  8px;  --sp-3:  12px;
    --sp-4:  16px; --sp-5:  24px; --sp-6:  32px;
    --sp-7:  48px; --sp-8:  64px; --sp-9:  96px;

    /* Typography */
    --font-body:        'Montserrat', "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono:        'JetBrains Mono', "SF Mono", "Fira Code", monospace;
    --text-xs:          11px;
    --text-sm:          13px;
    --text-base:        15px;
    --text-md:          16px;
    --text-lg:          18px;
    --text-xl:          22px;
    --text-2xl:         28px;
    --text-3xl:         36px;
    --text-4xl:         44px;

    /* Easing */
    --ease-out:         cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out:      cubic-bezier(0.45, 0, 0.55, 1);

    /* Layout */
    --container-max:    1200px;
    --container-wide:   1440px;
    --sidebar-w:        280px;
    --topbar-h:         56px;

    /* Semantic aliases */
    --text-primary:     var(--gray-900);
    --text-secondary:   var(--gray-600);
    --text-muted:       var(--gray-400);
    --text-inverse:     var(--white);
    --brand-primary:    var(--green);
    --brand-hover:      var(--green-hover);
    --danger:           #dc2626;
    --danger-light:     rgba(220,38,38,0.08);
    --warning:          #d97706;
    --warning-light:    rgba(217,119,6,0.08);
    --info:             #2563eb;
    --info-light:       rgba(37,99,235,0.08);
}


/* ── 3. RESET & BASE ────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 16px;
    height: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img, video {
    border-radius: var(--radius-sm);
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--green-hover);
}

hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: var(--sp-6) 0;
}

::selection {
    background: var(--green-15);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}


/* ── 4. TYPOGRAPHY ──────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--sp-3);
}
h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--sp-3);
}
h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--sp-2);
}
h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--sp-2);
}
h5 {
    font-size: var(--text-md);
    font-weight: 700;
    margin-bottom: var(--sp-1);
}
h6 {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-1);
}

p {
    margin-bottom: var(--sp-3);
    max-width: 72ch;
    line-height: 1.7;
}

.lead {
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 60ch;
}

small, .text-small {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

blockquote {
    border-left: 3px solid var(--green);
    padding: var(--sp-4) var(--sp-5);
    margin: var(--sp-5) 0;
    background: var(--green-5);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}
blockquote p:last-child {
    margin-bottom: 0;
}
blockquote cite {
    display: block;
    font-style: normal;
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-primary);
    margin-top: var(--sp-2);
}

code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-muted);
    color: var(--gray-700);
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--gray-900);
    color: var(--gray-200);
    padding: var(--sp-5);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--sp-5) 0;
    line-height: 1.6;
    border: 1px solid var(--gray-800);
}
pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Eyebrow label */
.eyebrow {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green);
    margin-bottom: var(--sp-1);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--text-primary), #4338ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ── 5. LISTS ───────────────────────────────────────────────── */

ul, ol {
    padding-left: var(--sp-5);
    margin-bottom: var(--sp-3);
}
li {
    margin-bottom: var(--sp-1);
    line-height: 1.6;
}

.check-list {
    list-style: none;
    padding-left: 0;
}
.check-list li {
    padding-left: var(--sp-5);
    position: relative;
}
.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--green);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 8px;
}

.dash-list {
    list-style: none;
    padding-left: 0;
}
.dash-list li {
    padding-left: var(--sp-4);
    position: relative;
}
.dash-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}


/* ── 6. LINKS ───────────────────────────────────────────────── */

.link {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid var(--green-20);
    transition: border-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
}
.link:hover {
    color: var(--green-hover);
    border-color: var(--green-hover);
}

.link-subtle {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.link-subtle:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: gap 0.2s var(--ease-out), color 0.2s ease;
}
.link-arrow:hover {
    gap: 10px;
    color: var(--green-hover);
}
.link-arrow::after {
    content: '→';
    transition: transform 0.2s var(--ease-out);
}


/* ── 7. BUTTONS ─────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
    box-shadow: var(--shadow-green);
}
.btn-primary:hover {
    background: var(--green-hover);
    border-color: var(--green-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(51,181,74,0.3);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--surface-alt);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-dark {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}
.btn-dark:hover {
    background: var(--gray-800);
    border-color: var(--gray-800);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 10px 20px;
}
.btn-ghost:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(220,38,38,0.3);
}
.btn-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-sm {
    padding: 8px 18px;
    font-size: var(--text-sm);
}
.btn-xs {
    padding: 5px 12px;
    font-size: var(--text-xs);
    font-weight: 600;
}
.btn-lg {
    padding: 16px 36px;
    font-size: var(--text-md);
}

.btn:disabled, .btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.btn-full {
    width: 100%;
}

/* Icon inside button */
.btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.btn:hover svg {
    transform: translateX(2px);
}


/* ── 8. FORMS ───────────────────────────────────────────────── */

label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin-bottom: var(--sp-4);
    -webkit-appearance: none;
    appearance: none;
}

input:hover, select:hover, textarea:hover {
    border-color: var(--gray-300);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--green);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--green-10);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23585555' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--green);
    cursor: pointer;
    margin-bottom: 0;
}

/* Input with icon */
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap input {
    padding-left: 44px;
}
.input-icon-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

/* Inline label + input */
.form-row {
    margin-bottom: var(--sp-4);
}
.form-row:last-child {
    margin-bottom: 0;
}
.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: var(--sp-3);
}
.form-error-text {
    font-size: var(--text-xs);
    color: var(--danger);
    margin-top: 4px;
    margin-bottom: var(--sp-3);
    font-weight: 500;
}

/* Search input */
input[type="search"] {
    border-radius: var(--radius-pill);
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}


/* ── 9. CARDS & SURFACES ────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    box-shadow: var(--shadow-card);
    position: relative;
}

.card-hover {
    transition: all 0.25s var(--ease-out);
    will-change: transform, box-shadow;
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

/* Card with green top accent on hover */
.card-accent {
    position: relative;
    overflow: hidden;
}
.card-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--sp-5);
    right: var(--sp-5);
    height: 2px;
    background: var(--green);
    border-radius: 0 0 2px 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.card-accent:hover::before {
    opacity: 1;
}

/* Card with permanent green bottom bar */
.card-bar {
    position: relative;
}
.card-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--sp-5);
    right: var(--sp-5);
    height: 3px;
    background: var(--green);
    border-radius: 3px 3px 0 0;
}

/* Card with green top bar (login, form cards) */
.card-bar-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--sp-5);
    right: var(--sp-5);
    height: 3px;
    background: var(--green);
    border-radius: 0 0 3px 3px;
}

.card-compact {
    padding: var(--sp-4);
}

.card-flat {
    box-shadow: none;
    border-color: var(--border-light);
}

/* Dark card */
.card-dark {
    background: var(--gray-900);
    border-color: var(--gray-800);
    color: var(--white);
}
.card-dark h1, .card-dark h2, .card-dark h3,
.card-dark h4, .card-dark h5, .card-dark h6 {
    color: var(--white);
}
.card-dark p {
    color: var(--gray-300);
}


/* ── 10. TABLES ─────────────────────────────────────────────── */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--text-sm);
    margin: var(--sp-4) 0;
}

th {
    text-align: left;
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 2px solid var(--border);
    background: var(--surface-alt);
}

td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
}

tbody tr:hover td {
    background: var(--surface-alt);
    color: var(--text-primary);
}

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

/* Table with dark header */
.table-dark-header thead th {
    background: linear-gradient(135deg, var(--black), #1a1a2e);
    color: var(--white);
    border-bottom: none;
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-xs);
}
.table-dark-header tbody td {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
}
.table-dark-header tbody tr:hover td {
    background: var(--surface-alt);
}
.table-dark-header tbody tr:last-child td {
    border-bottom: none;
}

/* Key-value table (form-table style) */
.table-kv th {
    width: 200px;
    background: none;
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-sm);
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
    font-weight: 600;
    padding: var(--sp-2) var(--sp-4);
}
.table-kv td {
    border-bottom: 1px solid var(--border-light);
    padding: var(--sp-2) var(--sp-4);
}

/* Bordered table */
.table-bordered {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Striped */
.table-striped tbody tr:nth-child(even) td {
    background: var(--surface-alt);
}


/* ── 11. BADGES & TAGS ──────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-green {
    background: var(--green-10);
    border-color: var(--green-20);
    color: var(--green);
}
.badge-dark {
    background: var(--gray-900);
    color: var(--white);
    border-color: var(--gray-800);
}
.badge-muted {
    background: var(--surface-muted);
    border-color: var(--border);
    color: var(--text-muted);
}
.badge-danger {
    background: var(--danger-light);
    border-color: rgba(220,38,38,0.2);
    color: var(--danger);
}
.badge-warning {
    background: var(--warning-light);
    border-color: rgba(217,119,6,0.2);
    color: var(--warning);
}
.badge-info {
    background: var(--info-light);
    border-color: rgba(37,99,235,0.2);
    color: var(--info);
}

.badge-pending {
    animation: blink-pending 1.2s ease-in-out infinite;
}

/* Email badge (mono font) */
.badge-email {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
    padding: 4px 14px;
}

/* Tag chips */
.tag-chip {
    display: inline-block;
    background: var(--green-8);
    border: 1px solid var(--green-15);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--green-hover);
    transition: background 0.15s;
}
.tag-chip:hover {
    background: var(--green-15);
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}

/* Status dot */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}
.status-dot.active {
    background: var(--green);
    box-shadow: 0 0 0 3px var(--green-20);
}
.status-dot.inactive {
    background: var(--gray-400);
}
.status-dot.pending {
    background: var(--warning);
    animation: blink-pending 1.2s ease-in-out infinite;
}


/* ── 12. ALERTS & NOTICES ───────────────────────────────────── */

.alert {
    padding: var(--sp-4);
    border-radius: var(--radius-md);
    border: 1px solid;
    font-size: var(--text-sm);
    margin: var(--sp-4) 0;
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
}
.alert p:last-child {
    margin-bottom: 0;
}

.alert-success {
    background: rgba(51,181,74,0.06);
    border-color: var(--green-20);
    color: var(--green-hover);
}
.alert-error {
    background: var(--danger-light);
    border-color: rgba(220,38,38,0.2);
    color: var(--danger);
}
.alert-warning {
    background: var(--warning-light);
    border-color: rgba(217,119,6,0.2);
    color: var(--warning);
}
.alert-info {
    background: var(--info-light);
    border-color: rgba(37,99,235,0.2);
    color: var(--info);
}

.alert-title {
    font-weight: 700;
    font-size: var(--text-sm);
    margin-bottom: 2px;
}


/* ── 13. AVATARS ────────────────────────────────────────────── */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}
.avatar:hover {
    border-color: var(--green);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}
.avatar-lg {
    width: 64px;
    height: 64px;
}
.avatar-xl {
    width: 100px;
    height: 100px;
}

.avatar-init {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.02em;
}
.avatar-init.avatar-xl {
    font-size: 32px;
}

.avatar-gradient {
    background: linear-gradient(135deg, var(--green), #4338ca);
    color: var(--white);
    border: none;
}


/* ── 14. NAVIGATION ─────────────────────────────────────────── */

/* Top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-xs);
}

.topbar-inner {
    max-width: var(--container-wide);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--sp-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-brand {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.06em;
    color: var(--green);
    text-decoration: none;
}
.topbar-brand:hover {
    color: var(--green-hover);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    list-style: none;
    margin: 0;
    padding: 0;
}
.topbar-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
.topbar-nav a:hover {
    color: var(--text-primary);
    background: var(--surface-muted);
}
.topbar-nav a.active {
    color: var(--green);
    background: var(--green-8);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

/* Breadcrumb */
.breadcrumb {
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}
.breadcrumb .sep {
    margin: 0 6px;
    color: var(--border);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: var(--sp-4);
    overflow-y: auto;
}

/* Sidebar nav links */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}
.sidebar-link:hover {
    background: var(--surface-alt);
}
.sidebar-link.active {
    background: var(--green-8);
    color: var(--green);
    font-weight: 600;
}

.sidebar-link-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-link.completed .sidebar-link-indicator {
    background: var(--green);
}

/* Progress bar */
.progress-track {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: var(--border-light);
    overflow: hidden;
}
.progress-track .bar {
    height: 100%;
    border-radius: 4px;
    background: var(--green);
    transition: width 0.8s ease;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: var(--sp-5) 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}
.pagination a:hover {
    background: var(--surface-muted);
    border-color: var(--gray-300);
    color: var(--text-primary);
}
.pagination .current {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}


/* ── 15. LAYOUT HELPERS ─────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--sp-5);
}

.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--sp-5);
}

.container-narrow {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 var(--sp-5);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--sp-4);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.flex-1 { flex: 1; min-width: 0; }

/* App layout (sidebar + main) */
.app-layout {
    display: flex;
    min-height: calc(100vh - var(--topbar-h));
}
.app-main {
    flex: 1;
    min-width: 0;
    padding: var(--sp-5) var(--sp-6);
    max-width: 920px;
}

/* Sections */
.section {
    margin-bottom: var(--sp-6);
}
.section-header {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.section-header h2 {
    white-space: nowrap;
    margin-bottom: 0;
}
.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Spacing */
.mt-1 { margin-top: var(--sp-1); } .mb-1 { margin-bottom: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); } .mb-2 { margin-bottom: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mb-3 { margin-bottom: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mb-4 { margin-bottom: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mb-5 { margin-bottom: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); } .mb-6 { margin-bottom: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); } .mb-7 { margin-bottom: var(--sp-7); }
.mx-auto { margin-left: auto; margin-right: auto; }

.pt-4 { padding-top: var(--sp-4); } .pb-4 { padding-bottom: var(--sp-4); }
.pt-5 { padding-top: var(--sp-5); } .pb-5 { padding-bottom: var(--sp-5); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.px-5 { padding-left: var(--sp-5); padding-right: var(--sp-5); }
.py-5 { padding-top: var(--sp-5); padding-bottom: var(--sp-5); }
.py-6 { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Width */
.w-full { width: 100%; }
.max-w-sm { max-width: 420px; }
.max-w-md { max-width: 680px; }
.max-w-lg { max-width: 920px; }
.max-w-xl { max-width: 1200px; }


/* ── 16. HERO SECTION ───────────────────────────────────────── */

.hero {
    margin-bottom: var(--sp-6);
}
.hero h1 {
    background: linear-gradient(135deg, var(--text-primary), #4338ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: var(--text-2xl);
}
.hero .eyebrow {
    background: var(--green-8);
    border: 1px solid var(--green-15);
    border-radius: var(--radius-pill);
    padding: 2px 12px;
}
.hero-date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: -4px;
}

/* Hero profile banner */
.hero-profile {
    display: flex;
    gap: var(--sp-6);
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    box-shadow: var(--shadow-card);
    position: relative;
}
.hero-profile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--sp-6);
    right: var(--sp-6);
    height: 3px;
    background: var(--green);
    border-radius: 3px 3px 0 0;
}
.hero-profile-name {
    font-weight: 800;
    font-size: var(--text-4xl);
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.hero-profile-sub {
    font-weight: 400;
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--sp-4);
    line-height: 1.4;
}
.hero-profile-sub .co::before {
    content: ' at ';
    opacity: 0.55;
}


/* ── 17. PE PULSE CARD COMPONENT ────────────────────────────── */

.pulse-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-7);
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}
.pulse-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--sp-7);
    right: var(--sp-7);
    height: 3px;
    background: var(--green);
    border-radius: 3px 3px 0 0;
}

.pulse-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    margin-bottom: var(--sp-2);
}

.pulse-meta {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--sp-6);
}

.pulse-statements {
    display: grid;
    gap: var(--sp-5);
    margin-bottom: var(--sp-6);
}

.pulse-statement {
    border-left: 3px solid var(--green);
    padding-left: var(--sp-4);
}
.pulse-statement h4 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green);
    margin-bottom: var(--sp-1);
}
.pulse-statement p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.65;
}

.pulse-3sec  { border-left-color: var(--green); }
.pulse-30sec { border-left-color: var(--green); }
.pulse-3min  { border-left-color: var(--green); }

.pulse-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--green);
    color: var(--white);
    font-weight: 700;
    font-size: var(--text-base);
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.2s var(--ease-out);
    box-shadow: var(--shadow-green);
}
.pulse-link:hover {
    background: var(--green-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(51,181,74,0.3);
    color: var(--white);
}

/* Pulse field grid (dashboard style) */
.pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-4);
}

.pulse-field-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--sp-5);
    transition: all 0.2s ease;
    position: relative;
}
.pulse-field-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}
.pulse-field-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--sp-5);
    right: var(--sp-5);
    height: 2px;
    background: var(--green);
    border-radius: 0 0 2px 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pulse-field-card:hover::before {
    opacity: 1;
}

.pulse-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--green-10);
    color: var(--green);
    flex-shrink: 0;
    margin-bottom: var(--sp-2);
}
.pulse-field-icon svg {
    width: 16px;
    height: 16px;
}

.pulse-field-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green);
    margin-bottom: var(--sp-2);
}

.pulse-field-value {
    font-size: var(--text-base);
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
    max-width: 42ch;
}
.pulse-field-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--text-sm);
}
.pulse-field-value.url {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.pulse-field-value.date {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.pulse-field-value a {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid var(--green-20);
}
.pulse-field-value a:hover {
    color: var(--green-hover);
    border-color: var(--green-hover);
}


/* ── 18. STEP CARDS (Onboarding / Workflow) ──────────────────── */

.step-card {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--sp-3);
    box-shadow: var(--shadow-xs);
    transition: all 0.2s var(--ease-out);
    min-height: 72px;
}
.step-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.step-card.completed {
    border-left: 4px solid var(--green);
}

.step-badge {
    width: 56px;
    min-width: 56px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
}
.step-card.completed .step-badge {
    background: var(--green);
}

.step-body {
    padding: var(--sp-3) var(--sp-4);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.step-card.completed .step-title {
    color: var(--green-hover);
}

.step-desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--sp-2);
}
.step-card.completed .step-desc {
    text-decoration: line-through;
    color: var(--text-muted);
}


/* ── 19. MODAL / OVERLAY ────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--sp-7);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: scaleIn 0.35s var(--ease-out);
}

.modal-close {
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-4);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-muted);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}
.modal-close:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

/* Dark modal (login gate) */
.modal-dark {
    background: #111;
    border: 1px solid var(--green-20);
    box-shadow: 0 0 60px rgba(51,181,74,0.06);
    text-align: center;
}
.modal-dark h2 {
    color: var(--white);
    font-size: var(--text-2xl);
}
.modal-dark p {
    color: rgba(255,255,255,0.6);
    margin-left: auto;
    margin-right: auto;
}
.modal-dark input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: var(--white);
    text-align: center;
}
.modal-dark input::placeholder {
    color: rgba(255,255,255,0.3);
}
.modal-dark input:focus {
    border-color: var(--green);
    background: rgba(51,181,74,0.06);
    box-shadow: 0 0 0 4px rgba(51,181,74,0.12);
    color: var(--white);
}
.modal-dark label {
    color: var(--green);
}


/* ── 20. TOOLTIPS ───────────────────────────────────────────── */

[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--gray-900);
    color: var(--white);
    font-size: var(--text-xs);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ── 21. DIVIDERS ───────────────────────────────────────────── */

.divider {
    height: 1px;
    background: var(--border);
    margin: var(--sp-5) 0;
    border: none;
}

.divider-green {
    height: 2px;
    background: var(--green);
    margin: var(--sp-5) 0;
    border: none;
    border-radius: 2px;
    max-width: 60px;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin: var(--sp-5) 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}


/* ── 22. MISC COMPONENTS ────────────────────────────────────── */

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.spinner-sm {
    width: 14px;
    height: 14px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--sp-8) var(--sp-5);
    color: var(--text-muted);
}
.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: var(--sp-2);
}
.empty-state p {
    max-width: 40ch;
    margin: 0 auto var(--sp-4);
    font-size: var(--text-sm);
}

/* KPI stat card */
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-5);
    box-shadow: var(--shadow-xs);
}
.stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--sp-1);
}
.stat-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.stat-change {
    font-size: var(--text-xs);
    font-weight: 600;
    margin-top: var(--sp-1);
}
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--danger); }

/* Icon circle */
.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--green-10);
    color: var(--green);
    flex-shrink: 0;
}
.icon-circle svg {
    width: 16px;
    height: 16px;
}

/* Glow effect behind cursor */
.mouse-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 40%),
        rgba(51,181,74,0.06) 0%,
        rgba(51,181,74,0.015) 40%,
        transparent 70%
    );
    transition: background 0.1s ease;
}


/* ── 23. ANIMATIONS ─────────────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes checkBounce {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes blink-pending {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animation utilities */
.animate-fade-in   { animation: fadeIn 0.3s ease forwards; opacity: 0; }
.animate-fade-up   { animation: fadeUp 0.4s var(--ease-out) forwards; opacity: 0; }
.animate-scale-in  { animation: scaleIn 0.35s var(--ease-out) forwards; opacity: 0; }
.animate-slide-left { animation: slideInLeft 0.3s var(--ease-out) forwards; opacity: 0; }

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-alt) 50%, var(--surface-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 80%;
}
.skeleton-text:last-child {
    width: 60%;
}
.skeleton-circle {
    border-radius: 50%;
}


/* ── 24. THRIVE ARCHITECT COMPATIBILITY ─────────────────────── */

/* Ensure shortcodes render inside Thrive elements */
.tve_p_custom_font,
.tve_p_custom_size,
.tve_ea_thrive_text,
.thrv_text_element {
    font-family: var(--font-body) !important;
}

.tcb-shortcode-content {
    font-family: inherit;
}

/* Override Thrive's default heading styles within our cards */
.cm-dash h1, .cm-dash h2, .cm-dash h3,
.cm-dash h4, .cm-dash h5, .cm-dash h6 {
    font-family: var(--font-body);
}

/* Prevent Thrive from injecting unwanted margins on our elements */
.thrv_wrapper {
    margin: 0;
}

/* Make sure our buttons aren't overridden by Thrive */
.btn-primary.tcb-button-link,
.btn-secondary.tcb-button-link {
    font-family: var(--font-body);
    border-radius: var(--radius-pill) !important;
}


/* ── 25. WORDPRESS OVERRIDES ────────────────────────────────── */

/* Override WP default gallery, caption, align styles */
.wp-caption {
    max-width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.wp-caption-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding: var(--sp-2) 0;
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: var(--sp-5);
    margin-bottom: var(--sp-4);
}
.alignright {
    float: right;
    margin-left: var(--sp-5);
    margin-bottom: var(--sp-4);
}
.aligncenter {
    display: block;
    margin: var(--sp-5) auto;
}
.alignnone {
    display: block;
    margin: var(--sp-4) 0;
}

/* WP admin bar offset */
body.admin-bar .topbar {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .topbar {
        top: 46px;
    }
}

/* WP default search form */
.search-form {
    display: flex;
    gap: var(--sp-2);
}
.search-form input[type="search"] {
    flex: 1;
    margin-bottom: 0;
}
.search-form button {
    composes: btn btn-primary;
}

/* WP comment form */
.comment-form label {
    display: block;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
}
.comment-form .form-submit input[type="submit"] {
    extend: .btn .btn-primary;
}

/* WP navigation menu reset */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu li {
    margin: 0;
}


/* ── 26. PRINT STYLES ───────────────────────────────────────── */

@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    .topbar, .sidebar, .btn, .btn-primary, .btn-secondary,
    .modal-overlay, .mouse-glow, .btn-logout, .pagination {
        display: none !important;
    }
    .app-layout {
        display: block;
    }
    .card, .step-card, .pulse-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    a {
        color: black;
        text-decoration: underline;
    }
    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 10pt;
        color: #666;
    }
}


/* ── 27. RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    .app-main {
        padding: var(--sp-4);
    }
    .hero-profile-name {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 820px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: var(--sp-3) var(--sp-4);
        display: flex;
        flex-wrap: wrap;
        gap: var(--sp-3);
        align-items: flex-start;
    }
    .app-main {
        padding: var(--sp-4);
    }

    .topbar-inner {
        padding: 0 var(--sp-4);
    }
    .topbar-nav {
        display: none;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .hero-profile {
        flex-direction: column;
        text-align: center;
        padding: var(--sp-5);
        gap: var(--sp-4);
    }
    .hero-profile::after {
        left: var(--sp-5);
        right: var(--sp-5);
    }
    .hero-profile-name {
        font-size: var(--text-2xl);
    }

    h1 { font-size: var(--text-2xl); }
    .hero h1 { font-size: var(--text-xl); }

    .step-badge {
        width: 44px;
        min-width: 44px;
        font-size: 18px;
    }

    .pulse-field-value {
        max-width: 100%;
    }

    table {
        font-size: var(--text-xs);
    }
    th, td {
        padding: var(--sp-2) var(--sp-3);
    }
}

@media (max-width: 640px) {
    .container, .container-wide, .container-narrow {
        padding: 0 var(--sp-4);
    }

    .topbar {
        height: 48px;
    }

    .hero-profile {
        padding: var(--sp-4);
    }
    .hero-profile-name {
        font-size: var(--text-xl);
    }

    .btn {
        padding: 10px 22px;
        font-size: var(--text-sm);
    }
    .btn-lg {
        padding: 14px 28px;
        font-size: var(--text-base);
    }

    .pulse-card {
        padding: var(--sp-5);
    }
    .pulse-card::after {
        left: var(--sp-5);
        right: var(--sp-5);
    }

    .step-card {
        flex-wrap: wrap;
        min-height: auto;
    }
    .step-badge {
        width: 100%;
        min-width: 100%;
        padding: var(--sp-2) 0;
        font-size: 16px;
    }

    .stat-value {
        font-size: var(--text-2xl);
    }

    .avatar-xl {
        width: 80px;
        height: 80px;
    }
    .avatar-init.avatar-xl {
        font-size: 28px;
    }

    .modal {
        padding: var(--sp-5);
    }

    .table-kv th {
        width: 140px;
    }
}

@media (max-width: 400px) {
    html {
        font-size: 14px;
    }

    .hero-profile-name {
        font-size: var(--text-lg);
    }

    .badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .tag-chip {
        font-size: 9px;
        padding: 1px 8px;
    }
}


/* ── 28. SCROLLBAR ──────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}