:root {
    --sr-primary: #415a85; /* Slate Blue */
    --sr-primary-600: #324768; /* darker */
    --sr-accent: #7fa1ff; /* lighter accents */
    --sr-ink: #0f172a;
    --sr-muted: #475569;
    --sr-surface: #f7f8fb;
    --sr-card: #ffffff;
    --sr-border: #e5e7eb;
    --sr-green: #10b981;
    --sr-red: #ef4444;
}

body.bg-sr-surface {
    background: var(--sr-surface);
    color: var(--sr-ink);
}

.sr-sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid var(--sr-border);
    padding: 20px;
}
.sr-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.sr-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sr-nav-btn {
    display: block;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--sr-ink);
}
.sr-nav-btn.active {
    background: var(--sr-primary);
    color: #fff;
}
.sr-nav-btn:hover {
    border-color: var(--sr-border);
}

.sr-logout {
    margin-top: auto;
    width: 100%;
    background: var(--sr-primary);
    color: #fff;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
}

.sr-card {
    background: var(--sr-card);
    border: 1px solid var(--sr-border);
    border-radius: 16px;
    padding: 16px;
}
.sr-btn {
    background: var(--sr-accent);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 0.6rem;
    border: 0;
}
.sr-btn-ghost {
    background: transparent;
    border: 1px solid var(--sr-border);
    padding: 0.5rem 0.9rem;
    border-radius: 0.6rem;
}
.sr-btn-primary {
    background: var(--sr-primary);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 0.6rem;
}
.sr-input,
.sr-textarea,
select.sr-input {
    width: 100%;
    border: 1px solid var(--sr-border);
    border-radius: 0.6rem;
    padding: 0.5rem 0.6rem;
    background: #fff;
}
.sr-textarea {
    min-height: 100px;
}

.sr-sandbox-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    text-align: center;
    background: #fff7ed;
    color: #9a3412;
    border-bottom: 1px solid #fed7aa;
    padding: 0.35rem 0.5rem;
}

/* Onboarding Modal */
.sr-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.sr-modal-card {
    width: min(900px, 92vw);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}
.sr-modal-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--sr-border);
}
.sr-modal-body {
    padding: 16px;
    max-height: 70vh;
    overflow: auto;
}
.sr-modal-foot {
    padding: 12px 16px;
    border-top: 1px solid var(--sr-border);
    display: flex;
    justify-content: space-between;
}
/* Brand header for the onboarding modal */
.sr-modal-head--brand {
    background: var(--sr-primary);
    color: #fff;
}
.sr-modal-head--brand .sr-step {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
}
.sr-modal-head--brand .sr-step.active {
    background: #fff;
    color: var(--sr-primary);
    border-color: #fff;
}
.sr-modal-head--brand .sr-step-line {
    background: rgba(255, 255, 255, 0.35);
}

/* ghost button on dark header */
.sr-btn-ghost--light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.sr-btn-ghost--light:hover {
    border-color: #fff;
}

/* stepper bar */
.sr-steps {
    display: flex;
    gap: 8px;
    align-items: center;
}
.sr-step {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sr-border);
    color: var(--sr-muted);
    font-weight: 600;
}
.sr-step.active {
    background: var(--sr-primary);
    color: #fff;
    border-color: var(--sr-primary);
}
.sr-step-line {
    flex: 1;
    height: 2px;
    background: var(--sr-border);
}

/* toast */
.sr-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 22px;
    z-index: 60;
    background: var(--sr-green);
    color: #fff;
    padding: 0.6rem 0.9rem;
    border-radius: 0.6rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.sr-toast.show {
    opacity: 1;
}

/* tips */
.tip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--sr-accent);
    color: #fff;
    font-size: 12px;
}
[data-tip] {
    position: relative;
}
[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(6px);
    background: #111827;
    color: #fff;
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    max-width: 260px;
    white-space: normal;
    z-index: 20;
}

/* simple accordion used on dashboard */
.sr-acc-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--sr-border);
    border-radius: 0.6rem;
    background: #fff;
}
.sr-acc-panel {
    padding: 0.5rem 0 0;
}
.hidden {
    display: none;
}
/* slate-blue header for the entry form */
.sr-form-head {
    background: var(--sr-primary); /* your slate blue */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}
.sr-form-head__title {
    font-weight: 700;
}
.sr-form-head__hint {
    font-size: 0.75rem;
    opacity: 0.85;
}
/* accordion tweaks */
.sr-acc-section + .sr-acc-section {
    margin-top: 6px;
} /* breathing room */

.sr-acc-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f7f9fb;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.sr-acc-btn .label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sr-acc-btn .toggle {
    font-weight: bold;
    transition: transform 0.2s;
}
.sr-acc-btn.open .toggle {
    transform: rotate(90deg);
} /* plus→minus visual */
/* active state for Quick Jump */
/* Quick Jump pills */
.sr-pill {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 9999px; /* full pill */
    background: #e2e8f0; /* light gray background */
    color: #334155; /* slate blue text */
    cursor: pointer;
    transition: all 0.2s ease;
}

.sr-pill:hover {
    background: #cbd5e1; /* darker gray on hover */
}

.sr-pill--active {
    background: #334155; /* solid slate blue when active */
    color: #ffffff;
    font-weight: 600;
}

.sr-announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #3b82f6; /* Tailwind blue-500 */
    color: #fff;
    font-weight: 500;
    text-align: center;
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Keep content from hiding behind it */
body {
    padding-top: 40px;
}
