/* Base colors: see shamshub-theme.css (:root / body.sh-page) */

.card,
.border,
.ad-slot {
    border-color: var(--sh-color-border, #e2e8f0) !important;
}

.tool-item.hidden {
    display: none;
}

textarea.form-control {
    min-height: 160px;
    line-height: 1.45;
    padding: 0.9rem;
    resize: vertical;
    font-family: var(--sh-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
}

/* Form labels: weight from shamshub-theme.css */

/* Below Bootstrap modal (1050/1055) so “Customize” dialog and buttons stay clickable */
.cookie-consent-banner {
    z-index: 1040;
}

/* Site footer — surface colors from shamshub-theme.css (.site-footer__main) */
.site-footer {
    color: var(--sh-color-text, #0f172a);
}

.site-footer__brand {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.03em;
    color: var(--sh-color-text, #0f172a);
    margin-bottom: 0.5rem;
}

.site-footer__heading {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sh-color-muted, #64748b);
    margin: 0 0 1rem;
}

.site-footer__link {
    display: inline-block;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sh-color-text-secondary, #475569);
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer__link:hover {
    color: var(--sh-color-text, #0f172a);
}

.site-footer__link--btn {
    background: none;
    border: none;
    padding-left: 0;
    padding-right: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: auto;
}

.site-footer__bar {
    background: var(--sh-color-bg, #ffffff);
    border-color: var(--sh-color-border, #e2e8f0) !important;
}

/* —— User dashboard (templates/dashboard-layout.php) —— */
.sh-dashboard {
    background: linear-gradient(180deg, var(--sh-color-bg-subtle) 0%, var(--sh-color-bg) 28rem);
}

.sh-dash-hero {
    background: linear-gradient(135deg, var(--sh-color-bg) 0%, var(--sh-color-bg-muted) 50%, var(--sh-color-accent-subtle) 100%);
    border: 1px solid var(--sh-color-border) !important;
    border-radius: var(--sh-radius-xl) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    overflow: hidden;
    position: relative;
}

.sh-dash-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 100% 0%, rgba(30, 64, 175, 0.1), transparent 55%);
    pointer-events: none;
}

.sh-dash-hero .card-body {
    position: relative;
    z-index: 1;
}

.sh-dash-eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
}

.sh-dash-section-intro .h4,
.sh-dash-section-intro h2 {
    letter-spacing: -0.02em;
    color: var(--sh-color-text);
}

.sh-dash-section-intro > p.text-secondary {
    max-width: 40rem;
    line-height: 1.55;
}

.sh-dash-hero-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (min-width: 992px) {
    .sh-dash-hero-aside {
        align-items: flex-end;
        text-align: right;
    }
}

.sh-dash-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

@media (min-width: 992px) {
    .sh-dash-hero-badges {
        justify-content: flex-end;
    }
}

.sh-dash-hero-note {
    color: var(--sh-warning);
    font-weight: 500;
    line-height: 1.45;
    max-width: 22rem;
}

@media (min-width: 992px) {
    .sh-dash-hero-note {
        margin-left: auto;
    }
}

.sh-dash-hero-cta.btn-primary {
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.22);
}

.sh-dash-free-upsell {
    background: linear-gradient(135deg, var(--sh-color-bg-subtle) 0%, var(--sh-color-accent-subtle) 100%) !important;
    border: 1px solid rgba(30, 64, 175, 0.14) !important;
    border-radius: var(--sh-radius-xl) !important;
    box-shadow: var(--sh-shadow-xs) !important;
}

.sh-dash-free-upsell .btn-primary {
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.22);
}

.sh-dash-status-badge {
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.75rem;
}

.sh-dash-plan-card .card-header.sh-dash-card-header {
    background: var(--sh-color-bg-subtle);
    border-bottom: 1px solid var(--sh-color-border) !important;
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin: 0 -1px;
    border-radius: var(--sh-radius-lg) var(--sh-radius-lg) 0 0 !important;
}

.sh-dash-plan-limits {
    padding-top: 0.25rem;
    border-color: var(--sh-color-border) !important;
}

.sh-dash-plan-limits li {
    padding: 0.2rem 0;
}

.sh-dash-plan-actions {
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sh-color-border);
    gap: 0.5rem 0.65rem !important;
}

.sh-dash-action-primary.btn-primary,
.sh-dash-action-primary.btn-warning {
    font-weight: 600;
    padding-left: 1rem;
    padding-right: 1rem;
    box-shadow: var(--sh-shadow-xs);
}

.sh-dash-action-primary.btn-primary {
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.2);
}

.sh-dash-billing-snapshot {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    background: var(--sh-color-bg);
}

.sh-dash-billing-snapshot .card-body {
    padding: 1.25rem 1.35rem;
}

.sh-dash-billing-snapshot-header {
    border-bottom: 1px solid var(--sh-color-border);
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
}

.sh-dash-billing-snapshot dt {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
}

.sh-dash-billing-snapshot dd {
    color: var(--sh-color-text);
}

.sh-dash-usage-card .card-header.sh-dash-card-header {
    background: var(--sh-color-bg-subtle);
    border-bottom: 1px solid var(--sh-color-border) !important;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.sh-dash-account-panel {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-xs) !important;
    background: var(--sh-color-bg);
}

.sh-dash-account-panel .card-body {
    padding: 1.15rem 1.25rem;
}

.sh-dash-account-panel-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-color-muted);
    margin-bottom: 0.85rem;
}

.sh-dash-account-panel a {
    font-weight: 500;
    text-decoration: none;
    color: var(--sh-color-text-secondary);
}

.sh-dash-account-panel a:hover {
    color: var(--sh-color-accent);
}

.sh-dashboard .upgrade-cta-banner[data-upgrade-surface="dashboard"] {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    box-shadow: var(--sh-shadow-sm) !important;
}

.sh-dash-limit-soft {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-color-border) !important;
    background: var(--sh-color-accent-subtle) !important;
    color: var(--sh-color-text) !important;
}

.sh-dash-limit-strong {
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid rgba(180, 83, 9, 0.35) !important;
}

.sh-dash-sync-nudge {
    background: var(--sh-warning-bg);
    color: var(--sh-warning);
    border: 1px solid rgba(180, 83, 9, 0.22);
    border-radius: var(--sh-radius-md);
}

.sh-dash-plan-badge {
    background: linear-gradient(135deg, var(--sh-color-text) 0%, #334155 100%);
    color: var(--sh-color-bg) !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
}

.sh-dash-nav-card {
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.sh-dash-nav-card-head-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sh-dash-nav-card-sub {
    font-size: 0.75rem;
    line-height: 1.3;
}

.sh-dash-nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.sh-dash-nav-group + .sh-dash-nav-group {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.sh-dash-nav-group-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    padding-top: 0.85rem;
    padding-bottom: 0.35rem;
}

.sh-dash-nav-quick {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    margin-top: 0.25rem;
}

.sh-dash-nav-quick-list li + li {
    margin-top: 0.2rem;
}

.sh-dash-nav-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    padding: 0.25rem 0;
    border-radius: 0.25rem;
    transition: color 0.15s ease;
}

.sh-dash-nav-quick-link:hover {
    color: #1d4ed8;
}

.sh-dash-nav-quick-link .bi {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Mobile: sticky horizontal section switcher */
.sh-dash-nav-mobile {
    position: sticky;
    top: 3.65rem;
    z-index: 1010;
    margin: 0 -0.5rem 1rem;
    padding: 0.5rem 0.5rem 0.65rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.97) 0%, rgba(248, 250, 252, 0.88) 100%);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

@media (min-width: 576px) {
    .sh-dash-nav-mobile {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0.75rem;
        border: 1px solid rgba(15, 23, 42, 0.06);
    }
}

.sh-dash-nav-mobile-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.sh-dash-nav-mobile-scroll::-webkit-scrollbar {
    height: 4px;
}

.sh-dash-nav-mobile-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.sh-dash-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-dash-nav-pill:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
}

.sh-dash-nav-pill.is-active {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.sh-dash-nav-pill-icon {
    font-size: 0.95rem;
    opacity: 0.9;
}

.sh-dash-nav-pill.is-active .sh-dash-nav-pill-icon {
    opacity: 1;
}

.sh-dash-side-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.125rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sh-dash-side-nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sh-dash-side-nav-link.is-active {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    color: #1d4ed8;
    box-shadow: inset 3px 0 0 0 #2563eb, inset 0 0 0 1px rgba(59, 130, 246, 0.2);
    font-weight: 600;
}

.sh-dash-side-nav-link:focus-visible,
.sh-dash-nav-pill:focus-visible,
.sh-dash-nav-quick-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.sh-dash-side-nav-icon {
    font-size: 1.1rem;
    opacity: 0.85;
    width: 1.35rem;
    text-align: center;
    flex-shrink: 0;
}

.sh-dash-side-nav-chevron {
    font-size: 0.85rem;
    opacity: 0.65;
    flex-shrink: 0;
}

.sh-dash-sticky-side {
    position: sticky;
    top: 5.5rem;
}

@media (max-width: 991.98px) {
    .sh-dash-sticky-side {
        position: static;
    }
}

.sh-dash-stat-tile {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    border: 1px solid var(--sh-color-border) !important;
    border-radius: var(--sh-radius-lg) !important;
}

.sh-dash-stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-shadow-md) !important;
    border-color: var(--sh-color-border-strong) !important;
}

.sh-dash-stat-tile .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.sh-dash-stat-icon {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
    opacity: 0.9;
    line-height: 1;
}

.sh-dash-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #0f172a;
}

.sh-dash-stat-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sh-color-muted);
    margin-bottom: 0.35rem;
}

.sh-dash-stat-tile .small.text-primary {
    margin-top: 0.15rem;
}

.sh-dash-card {
    border: 1px solid var(--sh-color-border) !important;
}

.sh-dash-card-header {
    background: transparent;
    border-bottom: 1px solid var(--sh-color-border) !important;
}

.sh-dash-filter-card {
    background: #fafbfc;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-left: 3px solid #6366f1;
}

.sh-dash-breadcrumb {
    background: var(--sh-color-bg-subtle);
    border: 1px solid var(--sh-color-border);
    border-radius: var(--sh-radius-lg) !important;
}

.sh-dash-table-wrap {
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.sh-dash-table {
    margin-bottom: 0;
}

.sh-dash-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sh-color-muted);
    border-bottom-width: 1px;
}

.sh-dash-pro-hint {
    background: linear-gradient(135deg, var(--sh-warning-bg) 0%, #fef3c7 45%, var(--sh-color-bg) 100%);
    border: 1px solid rgba(180, 83, 9, 0.28) !important;
    border-radius: var(--sh-radius-xl) !important;
    box-shadow: var(--sh-shadow-xs);
}

/* Plan + usage column cards (dashboard home) */
.sh-dash-sub-card {
    border: 1px solid var(--sh-color-border) !important;
    border-radius: var(--sh-radius-lg) !important;
    box-shadow: var(--sh-shadow-sm) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sh-dash-sub-card:hover {
    box-shadow: var(--sh-shadow-md) !important;
    border-color: var(--sh-color-border-strong) !important;
}

.sh-dash-billing-summary {
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left-width: 3px;
    border-left-color: #1e40af;
}

.sh-dash-meter .progress {
    height: 0.5rem;
    border-radius: 999px;
    background: var(--sh-color-bg-muted);
    border: 1px solid var(--sh-color-border);
}

.sh-dash-meter .progress-bar {
    border-radius: 999px;
}

.sh-dash-alert {
    border-radius: 0.5rem;
}

/* —— Admin area (templates/admin-layout.php + partials) —— */
.sh-admin-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 12rem, #f8fafc 100%);
}

.sh-admin-navbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #172554 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.35);
}

.sh-admin-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sh-admin-navbar .nav-link {
    border-radius: 0.375rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.sh-admin-navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.sh-admin-main {
    max-width: 1320px;
}

.sh-admin-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #eef2ff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.sh-admin-stat-tile {
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sh-admin-stat-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.08) !important;
}

.sh-admin-stat-tile .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 1.35rem;
    padding-bottom: 1.35rem;
}

.sh-admin-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.sh-admin-stat-tile .sh-admin-stat-label {
    margin-top: 0.15rem;
}

.sh-admin-stat-tile .card-body > a.small {
    margin-top: 0.5rem;
    display: inline-block;
}

.sh-admin-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sh-admin-card {
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.sh-admin-card .card-header {
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.sh-admin-table-wrap {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

