/* ==========================================================
   JDS MEMBER PORTAL — Dashboard Styles
   Comprehensive SaaS-style dashboard for WooCommerce My Account.
   Brand: #16a34a green, Inter font
   ========================================================== */

/* ==========================================================
   0. MY ACCOUNT LAYOUT OVERRIDES
   ========================================================== */

/* Force full-width container inside Kadence on My Account */
body.woocommerce-account.logged-in .site-container .entry-content-wrap,
body.woocommerce-account.logged-in .content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
body.woocommerce-account.logged-in .content-wrap {
    display: block;
}
body.woocommerce-account.logged-in #primary.content-area {
    flex: 0 0 100%;
    max-width: 100%;
}

/* --- Override Kadence float layout with CSS Grid --- */

/* Kill Kadence clearfix pseudo-elements — they become unwanted grid items */
.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after {
    display: none !important;
}

/* Reset Kadence floats, widths, & spacing on the nav wrapper and content */
.woocommerce-account .account-navigation-wrap,
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove Kadence border / margin on nav wrapper */
.woocommerce-account .account-navigation-wrap {
    border-left: 0 !important;
    border-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    .woocommerce-account .woocommerce {
        display: grid !important;
        grid-template-columns: 260px 1fr;
        gap: 2rem;
        align-items: start;
    }

    /* Pin each item to its column so no extra DOM nodes can shift them */
    .woocommerce-account .account-navigation-wrap {
        grid-column: 1;
        grid-row: 1;
        position: sticky;
        top: 2rem;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        grid-column: 2;
        grid-row: 1;
        min-height: 480px;
    }
}

/* ---- Sidebar Nav ---- */

/* Hide Kadence's built-in account avatar — we use our own profile header */
.kadence-account-avatar {
    display: none !important;
}

.woocommerce-MyAccount-navigation {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    padding: 0;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── User Profile Header ──────────────────────────────── */

.jds-nav-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.jds-nav-profile__avatar {
    flex-shrink: 0;
}

.jds-nav-profile__img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.jds-nav-profile__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jds-nav-profile__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jds-nav-profile__email {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Nav List ─────────────────────────────────────────── */

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.woocommerce-MyAccount-navigation ul li {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
}

/* ── Section Dividers ─────────────────────────────────── */

.jds-nav-divider {
    padding: 0;
    margin: 0;
    list-style: none;
}

.jds-nav-divider__label {
    display: block;
    padding: 1rem 1.25rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    user-select: none;
}

.jds-nav-divider--logout {
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}

/* ── Nav Links ────────────────────────────────────────── */

.woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.625rem 1rem !important;
    margin: 1px 0.5rem !important;
    color: #4b5563;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 10px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    border: none !important;
    border-left: none !important;
    position: relative;
}

/* Remove the old ::before pseudo-element icons (Dashicons) */
.woocommerce-MyAccount-navigation ul li a::before {
    content: none !important;
    display: none !important;
}

/* ── Icons (inline SVG) ──────────────────────────────── */

.jds-nav-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.18s ease, color 0.18s ease;
    line-height: 1;
}

.jds-nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Labels ───────────────────────────────────────────── */

.jds-nav-label {
    flex: 1;
    line-height: 1;
}

/* ── Hover State ──────────────────────────────────────── */

.woocommerce-MyAccount-navigation ul li a:hover {
    background: #f0fdf4;
    color: #16a34a;
    transform: translateX(2px);
    border: none !important;
    border-left: none !important;
}

.woocommerce-MyAccount-navigation ul li a:hover .jds-nav-icon {
    transform: scale(1.08);
}

/* ── Active State ─────────────────────────────────────── */

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard.is-active a {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #15803d;
    font-weight: 600;
    border-left: none !important;
}

.woocommerce-MyAccount-navigation ul li.is-active .jds-nav-icon,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard.is-active .jds-nav-icon {
    color: #16a34a;
}

/* Active indicator – highlight only, no extra indicator */
.woocommerce-MyAccount-navigation ul li.is-active a::after {
    content: none;
    display: none;
}

/* ── Logout Link ──────────────────────────────────────── */

.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #9ca3af !important;
}

.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    color: #ef4444 !important;
    background: #fef2f2 !important;
    transform: translateX(2px);
}

.woocommerce-MyAccount-navigation-link--customer-logout a:hover .jds-nav-icon {
    color: #ef4444;
}

/* ── Focus visible for keyboard nav ──────────────────── */

.woocommerce-MyAccount-navigation ul li a:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: -2px;
    border-radius: 10px;
}

/* ==========================================================
   1. PORTAL BASE
   ========================================================== */

.jds-portal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #111827;
}

.jds-portal *, .jds-portal *::before, .jds-portal *::after {
    box-sizing: border-box;
}

/* ---- Back Link (e.g. view-order → orders list) ---- */

.jds-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #16a34a;
    text-decoration: none;
    margin-bottom: 1rem;
    padding: 0.35rem 0.65rem 0.35rem 0.45rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.jds-back-link:hover,
.jds-back-link:focus-visible {
    background: rgba(22,163,74,.08);
    color: #15803d;
    text-decoration: none;
}
.jds-back-link svg {
    flex-shrink: 0;
}

/* ---- Header ---- */

.jds-portal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.jds-portal__header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.jds-portal__header p {
    color: #6b7280;
    font-size: 0.938rem;
    margin: 0;
}

/* ==========================================================
   2. STAT CARDS
   ========================================================== */

.jds-portal__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.jds-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.jds-stat-card:hover {
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(22,163,74,0.1);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.jds-stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jds-stat-card__icon--green  { background: #f0fdf4; color: #16a34a; }
.jds-stat-card__icon--blue   { background: #eff6ff; color: #3b82f6; }
.jds-stat-card__icon--purple { background: #faf5ff; color: #8b5cf6; }
.jds-stat-card__icon--orange { background: #fff7ed; color: #f97316; }

.jds-stat-card__body {
    display: flex;
    flex-direction: column;
}

.jds-stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}

.jds-stat-card__label {
    font-size: 0.813rem;
    color: #6b7280;
    font-weight: 500;
}

/* Compact stats (reminders page) */
.jds-portal__stats--small {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin-bottom: 1.5rem;
}

.jds-stat-card--small {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    gap: 0.25rem;
}

.jds-stat-card--small .jds-stat-card__value {
    font-size: 1.5rem;
}

.jds-stat-card--danger {
    border-color: #fca5a5;
    background: #fef2f2;
}

.jds-stat-card--danger .jds-stat-card__value {
    color: #dc2626;
}

/* ==========================================================
   3. CARDS
   ========================================================== */

/* --- Company summary grid on dashboard --- */
.jds-company-summary {
    display: flex;
    flex-direction: column;
}

.jds-company-summary__item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.jds-company-summary__item:last-child {
    border-bottom: none;
}

.jds-company-summary__item--link {
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
    cursor: pointer;
    border-radius: 0;
}

.jds-company-summary__item--link:hover {
    background-color: #f9fafb;
}

.jds-company-summary__item--link:hover .jds-company-summary__info strong {
    color: #2563eb;
}

.jds-company-summary__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #16a34a;
    flex-shrink: 0;
}

.jds-company-summary__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.jds-company-summary__info strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jds-company-summary__meta {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: capitalize;
}

.jds-portal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.jds-portal__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

.jds-portal__card--danger {
    border-color: #fca5a5;
}

.jds-portal__card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.jds-portal__card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.jds-portal__card-link {
    font-size: 0.813rem;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
}

.jds-portal__card-link:hover {
    text-decoration: underline;
}

.jds-portal__card-count {
    font-size: 0.813rem;
    color: #9ca3af;
    font-weight: 500;
}

.jds-portal__card-body {
    padding: 0;
}

/* ==========================================================
   4. LIST ITEMS (dashboard recent filings, deadlines)
   ========================================================== */

.jds-portal__list {
    display: flex;
    flex-direction: column;
}

.jds-portal__list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    gap: 1rem;
}

.jds-portal__list-item:last-child {
    border-bottom: none;
}

.jds-portal__list-item--link {
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.jds-portal__list-item--link:hover {
    background-color: #f9fafb;
}

.jds-portal__list-item--link:hover .jds-portal__list-item-info strong {
    color: #2563eb;
}

.jds-portal__list-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.jds-portal__list-item-info strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jds-portal__list-item-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ==========================================================
   5. BADGES
   ========================================================== */

.jds-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

.jds-badge--sm,
.jds-badge--small {
    padding: 0.125rem 0.5rem;
    font-size: 0.688rem;
}

.jds-badge__icon {
    font-size: 0.688rem;
}

/* Status badge colors */
.jds-badge--completed  { background: #f0fdf4; color: #16a34a; }
.jds-badge--in-progress { background: #eff6ff; color: #3b82f6; }
.jds-badge--not-started { background: #f3f4f6; color: #6b7280; }
.jds-badge--waiting    { background: #fff7ed; color: #f97316; }
.jds-badge--on-hold, .jds-badge--deferred { background: #fefce8; color: #ca8a04; }
.jds-badge--cancelled, .jds-badge--archived { background: #f3f4f6; color: #9ca3af; }
.jds-badge--blocked    { background: #fef2f2; color: #dc2626; }
.jds-badge--needs-review, .jds-badge--scheduled { background: #faf5ff; color: #8b5cf6; }
.jds-badge--neutral    { background: #f3f4f6; color: #374151; }

/* Entity status badges */
.jds-badge--green   { background: #f0fdf4; color: #16a34a; }
.jds-badge--red     { background: #fef2f2; color: #dc2626; }
.jds-badge--yellow  { background: #fefce8; color: #ca8a04; }
.jds-badge--blue    { background: #eff6ff; color: #3b82f6; }
.jds-badge--orange  { background: #fff7ed; color: #f97316; }
.jds-badge--gray    { background: #f3f4f6; color: #9ca3af; }
.jds-badge--ghost   { background: transparent; color: #9ca3af; border: 1px solid #e5e7eb; }

/* Priority badges */
.jds-badge--urgent     { background: #fef2f2; color: #dc2626; }

/* Reminder urgency */
.jds-badge--overdue    { background: #fef2f2; color: #dc2626; }
.jds-badge--warning    { background: #fff7ed; color: #f97316; }

/* ==========================================================
   6. EMPTY STATES
   ========================================================== */

.jds-portal__empty,
.jds-portal__empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #9ca3af;
}

.jds-portal__empty-state svg {
    margin: 0 auto 1rem;
    opacity: 0.4;
}

.jds-portal__empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem;
}

.jds-portal__empty-state p {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0 0 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================
   7. ACTION BUTTONS
   ========================================================== */

.jds-portal__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.jds-portal__action-btn,
.jds-btn,
.jds-btn--primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #16a34a !important;
    color: #fff !important;
    border: 2px solid #16a34a;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.jds-portal__action-btn:hover,
.jds-btn:hover,
.jds-btn--primary:hover {
    background: #15803d !important;
    border-color: #15803d;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(22,163,74,0.25);
}

.jds-portal__action-btn--outline,
.jds-btn--outline {
    background: transparent !important;
    color: #374151 !important;
    border-color: #d1d5db;
}

.jds-portal__action-btn--outline:hover,
.jds-btn--outline:hover {
    background: #f9fafb !important;
    border-color: #9ca3af;
    color: #111827 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.jds-btn--sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.813rem;
    border-radius: 8px;
}

.jds-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.jds-close-btn:hover {
    color: #374151;
}

/* ==========================================================
   8. NOTICES
   ========================================================== */

.jds-portal-notice {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.jds-portal-notice--warning {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.jds-portal-notice--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.jds-portal-notice a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================================
   9. FILTER BAR
   ========================================================== */

.jds-portal__filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.jds-portal__filter-bar label {
    font-size: 0.813rem;
    font-weight: 600;
    color: #6b7280;
}

.jds-portal__select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: #fff 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='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
}

.jds-portal__select:focus {
    border-color: #16a34a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.jds-portal__search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    flex: 1;
    max-width: 320px;
}

.jds-portal__search svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.jds-portal__search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 0.875rem;
    color: #374151;
    width: 100%;
    font-family: inherit;
    background: transparent;
    padding: 0;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================
   10. FILING CARDS
   ========================================================== */

.jds-portal__filing-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jds-filing-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.jds-filing-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.jds-filing-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.jds-filing-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.125rem;
}

.jds-filing-card__company {
    font-size: 0.813rem;
    color: #6b7280;
}

.jds-filing-card__desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.jds-filing-card__meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.75rem;
}

/* Progress bar */
.jds-filing-card__progress {
    height: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.jds-filing-card__progress-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    transition: width 0.5s ease;
}

/* ==========================================================
   11. DOCUMENT TABLE + VIEWS
   ========================================================== */

/* ── View toggle ── */
.jds-portal__filter-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.jds-view-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.jds-view-toggle__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.jds-view-toggle__btn svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.jds-view-toggle__btn:hover {
    color: #374151;
    background: rgba(255,255,255,0.5);
}

.jds-view-toggle__btn.is-active {
    background: #fff;
    color: #111827;
    border-color: #16a34a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── View visibility ── */
.jds-doc-container--list .jds-doc-view--list { display: block; }
.jds-doc-container--list .jds-doc-view--grid { display: none; }
.jds-doc-container--grid .jds-doc-view--list { display: none; }
.jds-doc-container--grid .jds-doc-view--grid { display: grid; }

/* ── List view (table) ── */
.jds-doc-table {
    width: 100%;
}

.jds-doc-table__header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr minmax(150px, auto);
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f3f4f6;
}

.jds-doc-table__row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr minmax(150px, auto);
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    align-items: center;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.1s ease;
}

.jds-doc-table__row:hover {
    background: #fafafa;
}

.jds-doc-table__row:last-child {
    border-bottom: none;
}

.jds-doc-table__name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    min-width: 0;
}

.jds-doc-table__name > svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.jds-doc-table__name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jds-doc-table__size {
    display: block;
    font-size: 0.688rem;
    color: #9ca3af;
    font-weight: 400;
}

.jds-doc-table__type {
    font-size: 0.813rem;
}

.jds-doc-table__date {
    font-size: 0.813rem;
    color: #6b7280;
}

.jds-doc-table__status {
    font-size: 0.813rem;
}

.jds-doc-table__action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.jds-doc-table__action .jds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    white-space: nowrap;
    flex-shrink: 0;
    height: 34px;
    box-sizing: border-box;
}

.jds-text-muted {
    color: #9ca3af;
    font-size: 0.813rem;
}

/* ── Grid view ── */
.jds-doc-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.875rem;
    padding: 1rem 1.25rem;
}

.jds-doc-grid__card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.jds-doc-grid__card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.jds-doc-grid__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.jds-doc-grid__icon svg {
    width: 22px;
    height: 22px;
}

.jds-doc-grid__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.jds-doc-grid__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.jds-doc-grid__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.jds-doc-grid__date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.jds-doc-grid__download {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    transition: all 0.15s ease;
    text-decoration: none;
}

.jds-doc-grid__download:hover {
    background: #dcfce7;
    color: #15803d;
}

/* ==========================================================
   12. COMPANY CARDS
   ========================================================== */

.jds-company-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.jds-company-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}

.jds-company-card__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.375rem;
}

.jds-company-card__details {
    padding: 1.25rem 1.5rem;
}

.jds-company-card__section {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.jds-company-card__section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Detail grid (used in company-profile) */
.jds-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
}

.jds-detail-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.jds-detail-grid__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.jds-detail-grid--compact .jds-detail-grid__item {
    padding: 0.25rem 0;
    border-bottom: none;
}

.jds-detail-grid__label {
    display: block;
    font-size: 0.688rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.jds-detail-grid__value {
    font-size: 0.938rem;
    font-weight: 500;
    color: #111827;
}

/* Jurisdiction list */
.jds-jurisdiction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jds-jurisdiction-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #f3f4f6;
}

.jds-jurisdiction-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.jds-jurisdiction-item__header strong {
    font-size: 0.938rem;
    color: #111827;
}

/* Person cards */
.jds-person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.jds-person-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.jds-person-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #4ade80);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.813rem;
    font-weight: 700;
    flex-shrink: 0;
}

.jds-person-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.jds-person-card__info strong {
    font-size: 0.875rem;
    color: #111827;
}

.jds-person-card__role {
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 600;
}

/* Contact list */
.jds-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jds-contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.jds-contact-item strong {
    font-size: 0.875rem;
    color: #111827;
}

.jds-contact-item a {
    font-size: 0.813rem;
    color: #16a34a;
    text-decoration: none;
}

.jds-contact-item a:hover {
    text-decoration: underline;
}

/* ==========================================================
   14. FORMS
   ========================================================== */

.jds-form {
    padding: 1rem 1.25rem 1.25rem;
}

.jds-form__row {
    margin-bottom: 1rem;
}

.jds-form__row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.jds-form__row--3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.jds-form__field label {
    display: block;
    font-size: 0.813rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.jds-form__field input,
.jds-form__field select,
.jds-form__field textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    color: #374151;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jds-form__field input:focus,
.jds-form__field select:focus,
.jds-form__field textarea:focus {
    border-color: #16a34a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.jds-form__field select {
    appearance: none;
    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='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

.jds-form__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.jds-form__status {
    font-size: 0.813rem;
    font-weight: 500;
}

.jds-form__feedback {
    margin-top: 0.75rem;
    font-size: 0.813rem;
    font-weight: 500;
    display: none;
}

.jds-form__feedback--success {
    color: #16a34a;
}

.jds-form__feedback--error {
    color: #dc2626;
}

/* ==========================================================
   15. REMINDER CARDS
   ========================================================== */

.jds-reminder-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s ease;
}

.jds-reminder-card:last-child {
    border-bottom: none;
}

.jds-reminder-card:hover {
    background: #fafafa;
}

/* Urgency left-border indicator */
.jds-reminder-card--overdue { border-left: 4px solid #dc2626; }
.jds-reminder-card--urgent  { border-left: 4px solid #f97316; }
.jds-reminder-card--warning { border-left: 4px solid #eab308; }
.jds-reminder-card--normal  { border-left: 4px solid #16a34a; }
.jds-reminder-card--neutral { border-left: 4px solid #d1d5db; }

.jds-reminder-card__left {
    flex-shrink: 0;
}

.jds-reminder-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.375rem;
    text-align: center;
}

.jds-reminder-card__date--empty {
    opacity: 0.4;
}

.jds-reminder-card__month {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.05em;
}

.jds-reminder-card__day {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.jds-reminder-card__body {
    flex: 1;
    min-width: 0;
}

.jds-reminder-card__title {
    font-size: 0.938rem;
    color: #111827;
    display: block;
    margin-bottom: 0.125rem;
}

.jds-reminder-card__meta {
    display: flex;
    gap: 0.25rem;
    font-size: 0.813rem;
    color: #6b7280;
}

.jds-reminder-card__right {
    flex-shrink: 0;
}

/* ==========================================================
   16. LOADING SPINNER
   ========================================================== */

.jds-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.jds-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: jds-spin 0.6s linear infinite;
}

@keyframes jds-spin {
    to { transform: rotate(360deg); }
}

/* Button loading state */
.jds-btn--loading {
    pointer-events: none;
    opacity: 0.7;
}

.jds-btn--loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: jds-spin 0.6s linear infinite;
    margin-left: 0.5rem;
}

/* ==========================================================
   16B. DOCUMENT VIEWER MODAL
   ========================================================== */

.jds-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.jds-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.jds-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jds-modal__dialog--large {
    max-width: 900px;
}

.jds-modal__dialog--xl {
    max-width: 1100px;
}

.jds-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.jds-modal__header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jds-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jds-modal__body img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.jds-modal__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    gap: 1rem;
}

.jds-modal__page-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.813rem;
    color: #6b7280;
    font-weight: 500;
}

/* Grid view button for document viewer */
.jds-doc-grid__view {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #16a34a;
    background: #f0fdf4;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    padding: 0;
}

.jds-doc-grid__view:hover {
    background: #dcfce7;
    color: #15803d;
}

/* ==========================================================
   16C. SERVICES PAGE
   ========================================================== */

.jds-service-section {
    padding: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.jds-service-section:last-child {
    border-bottom: none;
}

.jds-service-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
}

.jds-service-card {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.jds-service-card:last-child {
    margin-bottom: 0;
}

.jds-service-card--compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.jds-service-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.jds-service-card__info .jds-badge {
    align-self: flex-start;
}

.jds-service-card__info strong {
    font-size: 0.938rem;
    color: #111827;
}

.jds-service-card__meta {
    display: flex;
    gap: 0.25rem;
    font-size: 0.813rem;
    color: #6b7280;
}

.jds-service-card__address {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.jds-service-card__detail {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.jds-service-card__label {
    font-size: 0.688rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.jds-service-card__value {
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.5;
}

/* ── RA details — structured address with copy buttons ── */

.jds-ra-details {
    margin-top: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.jds-ra-field {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.jds-ra-field__label {
    font-size: 0.688rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.jds-ra-field__row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.jds-ra-field__value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Copy button ── */

.jds-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.jds-copy-btn:hover {
    color: #374151;
    border-color: #d1d5db;
    background: #f9fafb;
}

.jds-copy-btn.copied {
    color: #16a34a;
    border-color: #86efac;
    background: #f0fdf4;
}



.jds-service-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Service card row layout (name + cancel btn) ── */

.jds-service-card__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.jds-service-card__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ── Cancel / outline-danger button ── */

.jds-btn--outline-danger {
    background: transparent !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.jds-btn--outline-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.jds-btn--danger {
    background: #dc2626 !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.jds-btn--danger:hover:not(:disabled) {
    background: #b91c1c;
}

.jds-btn--danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Cancelled service state ── */

.jds-service-section--cancelled {
    opacity: 0.65;
}

.jds-service-section__title--muted {
    color: #9ca3af !important;
}

.jds-service-card--cancelled {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.jds-service-card--cancelled .jds-service-card__info strong {
    color: #9ca3af;
    text-decoration: line-through;
}

.jds-badge--cancelled {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* ── Cancel confirmation modal ── */
/* Scoped under #jds-cancel-modal to prevent conflict with document viewer modal */

#jds-cancel-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#jds-cancel-modal .jds-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#jds-cancel-modal .jds-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 90%;
    overflow: hidden;
    animation: jdsModalIn 0.2s ease-out;
    display: block;
    max-height: none;
}

@keyframes jdsModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#jds-cancel-modal .jds-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

#jds-cancel-modal .jds-modal__header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
    white-space: normal;
}

#jds-cancel-modal .jds-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#jds-cancel-modal .jds-modal__close:hover {
    color: #374151;
}

#jds-cancel-modal .jds-modal__body {
    display: block;
    padding: 1.5rem;
    min-height: 0;
    overflow-y: visible;
    flex: none;
    align-items: initial;
    justify-content: initial;
}

#jds-cancel-modal .jds-modal__warning {
    display: flex;
    gap: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

#jds-cancel-modal .jds-modal__warning svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

#jds-cancel-modal .jds-modal__warning strong {
    display: block;
    color: #991b1b;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

#jds-cancel-modal .jds-modal__warning p {
    margin: 0;
    color: #b91c1c;
    font-size: 0.813rem;
    line-height: 1.5;
}

#jds-cancel-modal .jds-modal__service-name {
    font-size: 0.938rem;
    font-weight: 600;
    color: #111827;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#jds-cancel-modal .jds-modal__confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.813rem;
    color: #374151;
    cursor: pointer;
    line-height: 1.5;
}

#jds-cancel-modal .jds-modal__confirm-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

#jds-cancel-modal .jds-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
}

.jds-btn--secondary {
    background: #fff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.jds-btn--secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ── Add Service modal ── */

#jds-add-service-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#jds-add-service-modal .jds-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#jds-add-service-modal .jds-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 720px;
    width: 95%;
    overflow: hidden;
    animation: jdsModalIn 0.2s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#jds-add-service-modal .jds-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

#jds-add-service-modal .jds-modal__header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
}

#jds-add-service-modal .jds-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#jds-add-service-modal .jds-modal__close:hover {
    color: #374151;
}

#jds-add-service-modal .jds-add-svc-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
}

#jds-add-service-modal .jds-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
    flex-shrink: 0;
}

/* Company selector */
.jds-add-svc__company-select {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.jds-add-svc__label {
    font-size: 0.813rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.jds-add-svc__select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s ease;
}

.jds-add-svc__select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

/* Service catalog grid */
.jds-add-svc__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.875rem;
}

/* Individual service card in catalog */
.jds-add-svc__card {
    position: relative;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.125rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jds-add-svc__card:hover {
    border-color: #86efac;
    background: #f0fdf4;
}

.jds-add-svc__card.selected {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.jds-add-svc__card-check {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.jds-add-svc__card.selected .jds-add-svc__card-check {
    background: #16a34a;
    border-color: #16a34a;
}

.jds-add-svc__card-check svg {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.jds-add-svc__card.selected .jds-add-svc__card-check svg {
    opacity: 1;
}

.jds-add-svc__card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jds-add-svc__card-icon--shield  { background: #dcfce7; color: #16a34a; }
.jds-add-svc__card-icon--document { background: #dbeafe; color: #3b82f6; }
.jds-add-svc__card-icon--bank    { background: #fef3c7; color: #d97706; }
.jds-add-svc__card-icon--calendar { background: #ede9fe; color: #7c3aed; }
.jds-add-svc__card-icon--search  { background: #fce7f3; color: #db2777; }

.jds-add-svc__card-name {
    font-size: 0.938rem;
    font-weight: 600;
    color: #111827;
    padding-right: 1.75rem; /* room for check circle */
}

.jds-add-svc__card-desc {
    font-size: 0.813rem;
    color: #6b7280;
    line-height: 1.5;
}

.jds-add-svc__card-price {
    font-size: 0.938rem;
    font-weight: 700;
    color: #16a34a;
    margin-top: auto;
}

/* Add Service button in header */
.jds-portal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

#jds-add-service-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Submit button loading state */
#jds-add-svc-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#jds-add-svc-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive: stack service cards on mobile */
@media (max-width: 640px) {
    .jds-add-svc__grid {
        grid-template-columns: 1fr;
    }

    #jds-add-service-modal .jds-modal__dialog {
        width: 100%;
        max-height: 95vh;
    }
}

/* ==========================================================
   16C-2. BROWSE SERVICES (filings empty state catalog)
   ========================================================== */

.jds-browse-section {
    margin-top: 2rem;
}

.jds-browse-section__header {
    margin-bottom: 1.25rem;
}

.jds-browse-section__header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
}

.jds-browse-section__header h3 svg {
    color: #16a34a;
    flex-shrink: 0;
}

.jds-browse-section__header p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* ── Formation Tier Cards ── */

.jds-browse-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.jds-browse-tier {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.jds-browse-tier:hover {
    border-color: #bbf7d0;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.08);
}

.jds-browse-tier--featured {
    border-color: #16a34a;
    box-shadow: 0 0 0 1px #16a34a, 0 4px 16px rgba(22, 163, 74, 0.12);
}

.jds-browse-tier__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #16a34a;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.jds-browse-tier__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.jds-browse-tier__price {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    margin-bottom: 0.625rem;
}

.jds-browse-tier__amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.jds-browse-tier__freq {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.jds-browse-tier__desc {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.jds-browse-tier__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    flex: 1;
}

.jds-browse-tier__features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #374151;
    padding: 0.3rem 0;
}

.jds-browse-tier__features li svg {
    flex-shrink: 0;
}

.jds-btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ── Add-On Service Cards (inline grid on filings page) ── */

.jds-browse-addons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.jds-browse-addon-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.jds-browse-addon-card:hover {
    border-color: #16a34a;
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.1);
}

.jds-browse-addon-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: #fff;
}

.jds-browse-addon-card__icon--shield   { background: #16a34a; }
.jds-browse-addon-card__icon--document { background: #16a34a; }
.jds-browse-addon-card__icon--bank     { background: #16a34a; }
.jds-browse-addon-card__icon--calendar { background: #16a34a; }
.jds-browse-addon-card__icon--search   { background: #16a34a; }

.jds-browse-addon-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.jds-browse-addon-card__desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex: 1;
}

.jds-browse-addon-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jds-browse-addon-card__price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #16a34a;
}

.jds-browse-addon-card__action {
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive: single-col tiers on mobile */
@media (max-width: 640px) {
    .jds-browse-tiers {
        grid-template-columns: 1fr;
    }
    .jds-browse-addons {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 400px) {
    .jds-browse-addons {
        grid-template-columns: 1fr;
    }
}

/* Browse modal body: scrollable, stacked layout */
.jds-browse-modal-body {
    display: block;
    align-items: stretch;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.jds-browse-modal-body .jds-browse-section {
    margin-top: 0;
}

.jds-browse-modal-body .jds-browse-section + .jds-browse-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* ==========================================================
   16D. FORMATION DOCUMENTS PAGE
   ========================================================== */

/* ==========================================================
   16D. FORMATION DOCUMENTS PAGE
   ========================================================== */

/* Stats bar */
.jds-formation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.jds-formation-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.875rem;
    padding: 1.25rem;
}

.jds-formation-doc-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jds-formation-doc-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.jds-formation-doc-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    color: #3b82f6;
}

/* Color-coded icon backgrounds */
.jds-formation-doc-card__icon--purple { background: #f5f3ff; border-color: #e9d5ff; }
.jds-formation-doc-card__icon--gold   { background: #fffbeb; border-color: #fde68a; }
.jds-formation-doc-card__icon--green  { background: #f0fdf4; border-color: #bbf7d0; }
.jds-formation-doc-card__icon--blue   { background: #eff6ff; border-color: #dbeafe; }
.jds-formation-doc-card__icon--grey   { background: #f9fafb; border-color: #e5e7eb; }

.jds-formation-doc-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.jds-formation-doc-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.jds-formation-doc-card__type {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jds-formation-doc-card__date {
    font-size: 0.688rem;
    color: #9ca3af;
}

.jds-formation-doc-card__actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.jds-formation-doc-card__actions .jds-btn--sm {
    padding: 0.375rem 0.625rem;
}

.jds-formation-doc-card__actions .jds-btn--outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.jds-formation-doc-card__actions .jds-btn--outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ==========================================================
   16D-ii. FORMATION DOCUMENT VIEWER MODAL
   ========================================================== */

.jds-doc-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.jds-doc-viewer__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.jds-doc-viewer__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 900px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: jds-viewer-enter 0.2s ease-out;
}

@keyframes jds-viewer-enter {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.jds-doc-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.jds-doc-viewer__header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.jds-doc-viewer__close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.jds-doc-viewer__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.jds-doc-viewer__body {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f9fafb;
}

.jds-doc-viewer__body iframe {
    width: 100%;
    height: 75vh;
    border: none;
    border-radius: 8px;
    background: #fff;
}

.jds-doc-viewer__body img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    object-fit: contain;
}

.jds-doc-viewer__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.jds-doc-viewer__footer .jds-btn--primary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

@media (max-width: 640px) {
    .jds-doc-viewer {
        padding: 0;
    }
    .jds-doc-viewer__dialog {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .jds-doc-viewer__body iframe {
        height: 60vh;
    }
}



/* ==========================================================
   17. RESPONSIVE
   ========================================================== */

/* --- 17A. Portal Disclaimer --- */
.jds-portal-disclaimer {
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.788rem;
    line-height: 1.6;
    color: #78350f;
}

.jds-portal-disclaimer p {
    margin: 0;
}

.jds-portal-disclaimer strong {
    color: #92400e;
}

/* ─────────────────────────────────────────────────────────
   17C. HTMX SPA Transitions & Loading State
   ───────────────────────────────────────────────────────── */

/* Lock scrollbar so it never appears/disappears between tabs */
body.woocommerce-account.logged-in {
    overflow-y: scroll;
}

/* Smooth opacity transition on content area */
.woocommerce-MyAccount-content {
    transition: opacity 120ms ease;
    box-sizing: border-box;
}

/* Dimmed + no-click while loading */
body.jds-portal-loading .woocommerce-MyAccount-content {
    opacity: 0.25;
    pointer-events: none;
    /* Lock the current height so layout doesn't shift during swap */
    min-height: var(--jds-content-h, 480px);
}

/* ─────────────────────────────────────────────────────────
   17D. Active nav highlight during SPA navigation
   ───────────────────────────────────────────────────────── */
.woocommerce-MyAccount-navigation li.is-active a {
    font-weight: 600;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #15803d;
}



@media (max-width: 767px) {

    /* ── Collapsible Sidebar Nav ─────────────────────────── */

    .woocommerce-MyAccount-navigation {
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    /* Mobile toggle button (visible only on mobile) */
    .jds-mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.875rem 1rem;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        font-size: 0.875rem;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        margin-bottom: 0.75rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        transition: border-color 0.15s ease;
    }

    .jds-mobile-nav-toggle:hover {
        border-color: #16a34a;
    }

    .jds-mobile-nav-toggle__left {
        display: flex;
        align-items: center;
        gap: 0.625rem;
    }

    .jds-mobile-nav-toggle__avatar img {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: block;
    }

    .jds-mobile-nav-toggle__chevron {
        transition: transform 0.25s ease;
        color: #9ca3af;
        flex-shrink: 0;
    }

    .jds-mobile-nav-toggle.is-open .jds-mobile-nav-toggle__chevron {
        transform: rotate(180deg);
    }

    /* Hide nav by default on mobile, show when toggled */
    .woocommerce-MyAccount-navigation.jds-nav-collapsed {
        display: none;
    }

    .woocommerce-MyAccount-navigation.jds-nav-expanded {
        display: block;
        animation: jdsNavSlideDown 0.2s ease-out;
    }

    @keyframes jdsNavSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Compact profile in nav when expanded */
    .jds-nav-profile {
        padding: 0.875rem 1rem;
    }

    .jds-nav-profile__img {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    /* Compact nav links for touch */
    .woocommerce-MyAccount-navigation ul li a {
        padding: 0.625rem 1rem !important;
        margin: 1px 0.375rem !important;
        font-size: 0.875rem;
        min-height: 44px; /* Touch-friendly target */
    }

    .jds-nav-divider__label {
        padding: 0.75rem 1rem 0.25rem;
    }

    /* ── Portal Header ───────────────────────────────────── */

    .jds-portal__header {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .jds-portal__header h2 {
        font-size: 1.25rem;
    }

    .jds-portal__header p {
        font-size: 0.875rem;
    }

    /* ── Stat Cards ──────────────────────────────────────── */

    .jds-portal__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        margin-bottom: 1.25rem;
    }

    .jds-stat-card {
        padding: 0.875rem;
        gap: 0.75rem;
        border-radius: 10px;
    }

    .jds-stat-card__icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .jds-stat-card__icon svg {
        width: 18px;
        height: 18px;
    }

    .jds-stat-card__value {
        font-size: 1.375rem;
    }

    .jds-stat-card__label {
        font-size: 0.75rem;
    }

    /* ── Cards & Grid ────────────────────────────────────── */

    .jds-portal__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .jds-portal__card {
        border-radius: 10px;
        margin-bottom: 1rem;
    }

    .jds-portal__card-header {
        padding: 0.875rem 1rem;
    }

    .jds-portal__card-header h3 {
        font-size: 0.938rem;
    }

    .jds-portal__list-item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .jds-portal__list-item-info strong {
        font-size: 0.813rem;
        white-space: normal;
    }

    /* ── Company Summary ─────────────────────────────────── */

    .jds-company-summary__item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .jds-company-summary__icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .jds-company-summary__icon svg {
        width: 18px;
        height: 18px;
    }

    .jds-company-summary__info strong {
        font-size: 0.813rem;
    }

    /* ── Forms ────────────────────────────────────────────── */

    .jds-form {
        padding: 0.875rem 1rem 1rem;
    }

    .jds-form__row--2col,
    .jds-form__row--3col {
        grid-template-columns: 1fr;
    }

    .jds-form__field input,
    .jds-form__field select,
    .jds-form__field textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.75rem;
    }

    .jds-form__actions {
        flex-direction: column;
    }

    .jds-form__actions .jds-btn {
        width: 100%;
        justify-content: center;
    }

    /* ── Document Table ──────────────────────────────────── */

    .jds-doc-table__header,
    .jds-doc-table__row {
        grid-template-columns: 1fr auto;
        padding: 0.75rem 1rem;
    }

    .jds-doc-table__type,
    .jds-doc-table__date,
    .jds-doc-table__status {
        display: none;
    }

    .jds-doc-table__header span:nth-child(2),
    .jds-doc-table__header span:nth-child(3),
    .jds-doc-table__header span:nth-child(4) {
        display: none;
    }

    .jds-doc-table__name {
        font-size: 0.813rem;
    }

    .jds-doc-table__action .jds-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        height: 32px;
    }

    /* ── Document Grid ──────────────────────────────────── */

    .jds-doc-grid {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .jds-doc-grid__card {
        padding: 0.875rem;
    }

    /* ── Formation Documents ─────────────────────────────── */

    .jds-formation-doc-grid {
        grid-template-columns: 1fr;
        padding: 0.875rem;
        gap: 0.625rem;
    }

    .jds-formation-doc-card {
        padding: 0.875rem;
    }

    .jds-formation-doc-card__icon {
        width: 38px;
        height: 38px;
    }

    .jds-formation-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* ── Filter Bar ──────────────────────────────────────── */

    .jds-portal__filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
    }

    .jds-portal__filter-right {
        justify-content: space-between;
    }

    .jds-portal__search {
        max-width: none;
    }

    .jds-portal__select {
        width: 100%;
    }

    /* ── Company Cards ──────────────────────────────────── */

    .jds-company-card__header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .jds-company-card__details {
        padding: 1rem;
    }

    .jds-company-card__details .jds-detail-grid {
        grid-template-columns: 1fr;
    }

    .jds-company-card__section {
        padding: 1rem;
    }

    .jds-person-grid {
        grid-template-columns: 1fr;
    }

    /* ── Filing Cards ────────────────────────────────────── */

    .jds-filing-card {
        padding: 1rem;
    }

    .jds-filing-card__header {
        flex-direction: column;
        gap: 0.375rem;
        align-items: flex-start;
    }

    .jds-filing-card__meta {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    /* ── Reminder Cards ──────────────────────────────────── */

    .jds-reminder-card {
        flex-wrap: wrap;
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .jds-reminder-card__body {
        flex: 1 1 calc(100% - 64px);
        min-width: 0;
    }

    .jds-reminder-card__right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .jds-reminder-card__title {
        font-size: 0.875rem;
    }

    /* ── Service Cards ──────────────────────────────────── */

    .jds-service-card--compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .jds-service-card__row {
        flex-direction: column;
        gap: 0.625rem;
        align-items: flex-start;
    }

    .jds-service-card__actions {
        width: 100%;
    }

    .jds-service-card__actions .jds-btn--outline-danger {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .jds-service-card__address {
        grid-template-columns: 1fr;
    }

    /* ── RA Details ──────────────────────────────────────── */

    .jds-ra-details {
        padding: 0.75rem;
    }

    .jds-ra-field__value {
        font-size: 0.813rem;
    }

    /* ── Action Buttons ──────────────────────────────────── */

    .jds-portal__actions {
        flex-direction: column;
        margin-top: 1.25rem;
    }

    .jds-portal__actions .jds-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.25rem;
    }

    /* ── Modals ──────────────────────────────────────────── */

    .jds-modal {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .jds-modal__dialog {
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        max-width: 100%;
    }

    .jds-modal__header {
        padding: 1rem;
    }

    .jds-modal__body {
        padding: 1rem;
    }

    .jds-modal__footer {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }

    #jds-cancel-modal .jds-modal__dialog {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }



    /* ── Notices ──────────────────────────────────────────── */

    .jds-portal-notice {
        padding: 0.875rem 1rem;
        font-size: 0.813rem;
    }

    /* ── Disclaimer ──────────────────────────────────────── */

    .jds-portal-disclaimer {
        padding: 1rem;
        margin-top: 1.75rem;
        font-size: 0.75rem;
    }

    /* ── Badges ──────────────────────────────────────────── */

    .jds-badge {
        font-size: 0.688rem;
        padding: 0.2rem 0.5rem;
    }

    /* ── Empty States ────────────────────────────────────── */

    .jds-portal__empty,
    .jds-portal__empty-state {
        padding: 2rem 1rem;
    }

    .jds-portal__empty-state h3 {
        font-size: 1rem;
    }

    .jds-portal__empty-state p {
        font-size: 0.813rem;
    }
}

/* ─────────────────────────────────────────────────────────
   Small Phone (≤ 480px)
   ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .jds-portal__stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .jds-stat-card {
        padding: 0.75rem;
    }

    .jds-stat-card__icon {
        width: 36px;
        height: 36px;
    }

    .jds-stat-card__value {
        font-size: 1.25rem;
    }

    .jds-formation-stats {
        grid-template-columns: 1fr;
    }

    .jds-formation-doc-card {
        gap: 0.625rem;
    }

    .jds-formation-doc-card__actions {
        flex-direction: column;
    }

    .jds-filing-card__meta {
        font-size: 0.688rem;
    }

    .jds-portal__header h2 {
        font-size: 1.125rem;
    }
}

/* ==========================================================
   ACCOUNT SETTINGS PAGE
   ========================================================== */

.jds-account-form {
    /* Reset WooCommerce form defaults */
    margin: 0;
    padding: 0;
}

/* Override default WC form-row styles inside the account form */
.jds-account-form .woocommerce-form-row,
.jds-account-form p.form-row {
    padding: 0;
    margin: 0;
}

.jds-account-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.jds-account-form fieldset legend {
    display: none; /* Replaced by card header */
}

/* Card spacing for account page */
.jds-account-card {
    margin-bottom: 1.25rem;
}

.jds-account-card .jds-form {
    padding: 1.25rem;
}

/* Hint text under inputs */
.jds-form__hint {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.375rem;
    font-style: italic;
}

/* Section note (e.g. password section) */
.jds-form__section-note {
    font-size: 0.813rem;
    color: #6b7280;
    margin: 0 0 1rem;
    padding: 0.625rem 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #d1d5db;
}

/* Required asterisk */
.jds-form__field .required {
    color: #dc2626;
    font-weight: 400;
}

/* Save button row */
.jds-account-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

/* Override any WooCommerce button styles on the account page */
.jds-account-form .woocommerce-Button,
.jds-account-form button[name="save_account_details"] {
    display: none; /* Hidden — replaced by .jds-btn below the form */
}

/* WC notices inside portal — match card style */
.jds-portal .woocommerce-message,
.jds-portal .woocommerce-error,
.jds-portal .woocommerce-info {
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-family: inherit;
}

.jds-portal .woocommerce-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.jds-portal .woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.jds-portal .woocommerce-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ─── Visibility Toggle (eye icon) ─────────────────────── */
.jds-input-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.jds-input-toggle input {
    padding-right: 2.75rem;
    width: 100%;
}

.jds-input-toggle__btn {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.jds-input-toggle__btn:hover {
    color: #4b5563;
}

.jds-input-toggle__btn:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 1px;
}

/* Inline variant for EIN (inside a <span>, not an input wrapper) */
.jds-input-toggle__btn--inline {
    position: static;
    transform: none;
    margin-left: 0.5rem;
    vertical-align: middle;
    display: inline-flex;
}

.jds-ein-toggle {
    display: inline-flex;
    align-items: center;
}

/* Active state: swap eye icons */
.jds-input-toggle.is-visible .jds-icon-eye { display: none; }
.jds-input-toggle.is-visible .jds-icon-eye-off { display: block; }
.jds-input-toggle__btn--inline.is-visible .jds-icon-eye { display: none; }
.jds-input-toggle__btn--inline.is-visible .jds-icon-eye-off { display: inline-block; }

/* ─── Account settings responsive ─────────────────────── */
@media (max-width: 640px) {
    .jds-account-card .jds-form__row--2col {
        grid-template-columns: 1fr;
    }

    .jds-account-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .jds-account-actions .jds-btn {
        justify-content: center;
    }
}

/* ─────────────────────────────────────────────────────────
   Desktop: hide mobile toggle
   ───────────────────────────────────────────────────────── */
@media (min-width: 768px) {
    .jds-mobile-nav-toggle {
        display: none !important;
    }
}

/* ═════════════════════════════════════════════════════════
   ANNUAL REPORTS PAGE
   ═════════════════════════════════════════════════════════ */

/* ── Collapsed Company Rows ── */
.jds-ar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jds-ar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.jds-ar-row:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.jds-ar-row--has-service {
    border-left: 3px solid #16a34a;
}

.jds-ar-row--no-service {
    border-left: 3px solid #d1d5db;
}

.jds-ar-row__info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.jds-ar-row__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jds-ar-row__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.jds-ar-row__actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* Fix: ensure <a> tags with .jds-btn--primary show white text */
a.jds-btn,
a.jds-btn--primary,
a.jds-btn:visited,
a.jds-btn--primary:visited,
.jds-ar-row__actions a.jds-btn,
.jds-ar-hire-btn {
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Modal Form — Fieldsets ── */
.jds-ar-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.jds-ar-fieldset legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    padding: 0;
    margin: 0 0 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.625rem;
    width: 100%;
}

.jds-ar-fieldset legend svg {
    color: #6b7280;
    flex-shrink: 0;
}

/* Read-only inputs (entity info) */
.jds-ar-readonly {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    cursor: default !important;
    border-color: #e5e7eb !important;
}

/* ── Person rows in modal ── */
.jds-ar-person-row {
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.jds-ar-person-row:last-child {
    margin-bottom: 0;
}

.jds-ar-person-row__header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.jds-ar-person-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jds-ar-person-role {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
}

.jds-ar-empty-note {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
    margin: 0;
}

/* Nested 2-col inside person row */
.jds-form__field--2col-inner {
    padding: 0;
}
.jds-form__field--2col-inner > .jds-form__row--2col {
    margin: 0;
    gap: 0.75rem;
}

/* ── Modal loading & success states ── */
.jds-ar-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
    text-align: center;
}

.jds-ar-modal-loading p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.jds-ar-modal-body {
    display: block !important;
    align-items: stretch !important;
}

.jds-ar-modal-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
}

.jds-ar-modal-success svg {
    color: #16a34a;
    margin-bottom: 1rem;
}

.jds-ar-modal-success h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.jds-ar-modal-success p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 400px;
}

/* ── Notice bar (reused in modal) ── */
.jds-ar-notice {
    display: flex;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.jds-ar-notice svg {
    flex-shrink: 0;
    color: #3b82f6;
    margin-top: 1px;
}

.jds-ar-notice p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #374151;
}

.jds-ar-notice a {
    color: #2563eb;
    text-decoration: underline;
}

/* Form status message */
.jds-ar-form-status {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .jds-ar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .jds-ar-row__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .jds-ar-row__name {
        white-space: normal;
    }

    .jds-ar-person-row .jds-form__row--2col {
        grid-template-columns: 1fr;
    }
}

/* ── Google Places autocomplete dropdown ── */
.jds-places-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    margin: 2px 0 0;
    padding: 4px 0;
}
.jds-places-item {
    padding: 8px 12px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}
.jds-places-item:hover,
.jds-places-item.active {
    background: #f0fdf4;
    color: #16a34a;
}

/* =================================================================
   ADD COMPANY MODAL
   ================================================================= */

#jds-add-company-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#jds-add-company-modal .jds-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#jds-add-company-modal .jds-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 560px;
    width: 95%;
    overflow: hidden;
    animation: jdsModalIn 0.2s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#jds-add-company-modal .jds-modal__dialog--sm {
    max-width: 560px;
}

#jds-add-company-modal .jds-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

#jds-add-company-modal .jds-modal__header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

#jds-add-company-modal .jds-modal__close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

#jds-add-company-modal .jds-modal__close:hover {
    color: #374151;
    background: #f3f4f6;
}

#jds-add-company-modal .jds-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: block;
}

/* ── Choice cards (Step 1) ── */

.jds-add-company__intro {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
    text-align: center;
}

.jds-add-company__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.jds-add-company__option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    color: inherit;
    font: inherit;
}

.jds-add-company__option-card:hover {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.jds-add-company__option-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    border-radius: 50%;
    color: #16a34a;
    margin-bottom: 0.875rem;
}

.jds-add-company__option-card h4 {
    margin: 0 0 0.375rem;
    font-size: 0.938rem;
    font-weight: 600;
    color: #111827;
}

.jds-add-company__option-card p {
    margin: 0;
    font-size: 0.813rem;
    color: #6b7280;
    line-height: 1.45;
}

/* ── Back link (Step 2) ── */

.jds-add-company__back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.813rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
    transition: color 0.15s;
}

.jds-add-company__back:hover {
    color: #111827;
}

/* ── Entity type grid (Step 2A) ── */

.jds-add-company__entity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
}

.jds-add-company__entity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 0.875rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    color: inherit;
}

.jds-add-company__entity-card:hover {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.jds-add-company__entity-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    border-radius: 50%;
    color: #3b82f6;
    margin-bottom: 0.625rem;
}

.jds-add-company__entity-card:hover .jds-add-company__entity-icon {
    background: #dcfce7;
    color: #16a34a;
}

.jds-add-company__entity-card h4 {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.jds-add-company__entity-card p {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Form fields ── */

#jds-add-company-form .jds-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

#jds-add-company-form .jds-form-group label {
    font-size: 0.813rem;
    font-weight: 600;
    color: #374151;
}

#jds-add-company-form .jds-form-group label .required {
    color: #ef4444;
}

#jds-add-company-form .jds-form-group input,
#jds-add-company-form .jds-form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

#jds-add-company-form .jds-form-group input:focus,
#jds-add-company-form .jds-form-group select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

#jds-add-company-form .jds-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#jds-add-company-form .jds-form-error {
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.813rem;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 1rem;
}

#jds-add-company-form .jds-modal__footer {
    padding: 0;
    border: none;
    background: none;
}

#jds-add-company-form .jds-btn--block {
    width: 100%;
    justify-content: center;
}

/* ── Responsive ── */

@media (max-width: 540px) {
    .jds-add-company__options {
        grid-template-columns: 1fr;
    }

    .jds-add-company__entity-grid {
        grid-template-columns: 1fr;
    }

    #jds-add-company-form .jds-form-row {
        grid-template-columns: 1fr;
    }
}
