body,form,figure{margin:0;padding:0}img{border:0}header,footer,nav,section,aside,article,figure,figcaption{display:block}body{font-size:100.01%}select,input,textarea{font-size:99%}#container,.inside{position:relative}#main,#left,#right{float:left;position:relative}#main{width:100%}#left{margin-left:-100%}#right{margin-right:-100%}#footer{clear:both}#main .inside{min-height:1px}.ce_gallery>ul,.content-gallery>ul{margin:0;padding:0;overflow:hidden;list-style:none}.ce_gallery>ul li,.content-gallery>ul li{float:left}.ce_gallery>ul li.col_first,.content-gallery>ul li.col_first{clear:left}.float_left,.media--left>figure{float:left}.float_right,.media--right>figure{float:right}.block{overflow:hidden}.media{display:flow-root}.clear,#clear{height:.1px;font-size:.1px;line-height:.1px;clear:both}.invisible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.custom{display:block}#container:after,.custom:after{content:"";display:table;clear:both}
@media (max-width:767px){#wrapper{margin:0;width:auto}#container{padding-left:0;padding-right:0}#main,#left,#right{float:none;width:auto}#left{right:0;margin-left:0}#right{margin-right:0}}img{max-width:100%;height:auto}.audio_container audio{max-width:100%}.video_container video{max-width:100%;height:auto}.aspect,.responsive{position:relative;height:0}.aspect iframe,.responsive iframe{position:absolute;top:0;left:0;width:100%;height:100%}.aspect--16\:9,.responsive.ratio-169{padding-bottom:56.25%}.aspect--16\:10,.responsive.ratio-1610{padding-bottom:62.5%}.aspect--21\:9,.responsive.ratio-219{padding-bottom:42.8571%}.aspect--4\:3,.responsive.ratio-43{padding-bottom:75%}.aspect--3\:2,.responsive.ratio-32{padding-bottom:66.6666%}.aspect--9\:16,.responsive.ratio-916{padding-bottom:177.7777%}.aspect--1\:1,.responsive.ratio-11{padding-bottom:100%}
/*
 * Stratum Client Portal — Frontend Styles
 *
 * Dark theme with sidebar layout, hero banner, card-based content.
 * Inspired by modern SaaS portal designs.
 *
 * All classes prefixed with "sp-" to avoid collisions with the
 * site's theme or Contao core classes.
 */

/* ── Custom properties ──────────────────────────────────────── */

.stratum-portal,
.stratum-portal-message {
    --sp-bg: #0d0f14;
    --sp-surface: #151821;
    --sp-surface-2: #1c2030;
    --sp-border: #2a2e3d;
    --sp-text: #eef0f6;
    --sp-text-muted: #8b92a5;
    --sp-accent: #6366f1;
    --sp-accent-hover: #818cf8;
    --sp-accent-glow: rgba(99, 102, 241, 0.15);
    --sp-radius: 10px;
    --sp-radius-sm: 6px;
    --sp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --sp-sidebar-width: 280px;

    font-family: var(--sp-font);
    color: var(--sp-text);
    line-height: 1.55;
    background: var(--sp-bg);
}

/* ── Light theme overrides ────────────────────────────────────── */

.stratum-portal.sp-light,
.stratum-portal-message.sp-light {
    --sp-bg: #f4f5f7;
    --sp-surface: #ffffff;
    --sp-surface-2: #eef0f4;
    --sp-border: #d8dce6;
    --sp-text: #1a1d26;
    --sp-text-muted: #6b7189;
    --sp-accent: #6366f1;
    --sp-accent-hover: #4f46e5;
    --sp-accent-glow: rgba(99, 102, 241, 0.10);
}

.sp-light .sp-hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.45) 0%,
        rgba(139, 92, 246, 0.25) 40%,
        rgba(255, 255, 255, 0.65) 100%
    );
}

.sp-light .sp-task {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.sp-light .sp-modal-overlay {
    background: rgba(0, 0, 0, 0.35);
}

.sp-light .sp-modal {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Theme toggle button */
.sp-theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    background: none;
    border: none;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
    transition: color 0.15s, background 0.15s;
}

.sp-theme-toggle:hover {
    color: var(--sp-text);
    background: var(--sp-surface-2);
}

.sp-theme-toggle svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.sp-theme-toggle:hover svg {
    opacity: 1;
}

/* ── Layout: sidebar + main ─────────────────────────────────── */

.stratum-portal {
    display: grid;
    grid-template-columns: var(--sp-sidebar-width) 1fr;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   LOGGED-OUT / LOGIN PAGE
   ══════════════════════════════════════════════════════════════ */

/* Full-page dark background when not logged in */
body:has(.mod_login) #wrapper {
    --sp-bg: #0d0f14;
    --sp-surface: #151821;
    --sp-surface-2: #1c2030;
    --sp-border: #2a2e3d;
    --sp-text: #eef0f6;
    --sp-text-muted: #8b92a5;
    --sp-accent: #6366f1;
    --sp-accent-hover: #818cf8;
    --sp-radius: 10px;
    --sp-radius-sm: 6px;
    --sp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;

    background: var(--sp-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sp-font);
}

body:has(.mod_login) #container,
body:has(.mod_login) #main,
body:has(.mod_login) #main > .inside,
body:has(.mod_login) .mod_article {
    display: contents;
}

/* Hide the "please log in" messages from our modules */
body:has(.mod_login) .stratum-portal-message,
body:has(.mod_login) .stratum-message {
    display: none;
}

/* Login card.

   Selectors target .mod_login — what Contao actually renders. They previously
   hung off a .content-login wrapper that does not exist, so the whole block
   was dead even once the stylesheet reached the page.

   Structure below follows the house framework's forms.css conventions
   (.formbody > .widget, .widget-submit button, span.mandatory), since that is
   what Contao's form markup actually looks like. */
.mod_login {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 40px 36px 36px;
    width: 400px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.mod_login .formbody {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mod_login .widget {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mod_login label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sp-text);
    font-family: var(--sp-font);
}

.mod_login input.text {
    padding: 11px 14px;
    font-size: 0.9rem;
    font-family: var(--sp-font);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    background: var(--sp-surface-2);
    color: var(--sp-text);
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.mod_login input.text:focus {
    border-color: var(--sp-accent);
    outline: none;
}

.mod_login input.text::placeholder {
    color: var(--sp-text-muted);
}

/* Required-field marker and per-widget error state — both borrowed from the
   framework's forms.css, which the portal block had no equivalent for. */
.mod_login span.mandatory {
    color: var(--sp-accent);
    margin-left: 2px;
}

.mod_login .widget.error input.text {
    border-color: #e5484d;
}

/* Checkbox */
.mod_login .widget-checkbox fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.mod_login .widget-checkbox label {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--sp-text-muted);
    cursor: pointer;
}

.mod_login .widget-checkbox input[type="checkbox"] {
    accent-color: var(--sp-accent);
    margin-right: 4px;
}

/* Submit button */
.mod_login .widget-submit {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.mod_login button.submit {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--sp-font);
    background: var(--sp-accent);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    width: 100%;
}

.mod_login button.submit:hover {
    background: var(--sp-accent-hover);
}

.mod_login button.submit:active {
    transform: scale(0.98);
}

/* Passkey button */
.mod_login .passkey-login {
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--sp-font);
    background: var(--sp-surface-2);
    color: var(--sp-text-muted);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    width: 100%;
}

.mod_login .passkey-login:hover {
    color: var(--sp-text);
    border-color: var(--sp-text-muted);
}

/* Error messages */
.mod_login .error {
    font-size: 0.82rem;
    color: #f87171;
    margin: 0;
}

/* ── Message / error state (logged in, no client) ─────────── */

.stratum-portal-message {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
}

.stratum-portal-message .sp-greeting {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.stratum-portal-message p {
    font-size: 0.95rem;
    color: var(--sp-text-muted);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════ */

.sp-sidebar {
    background: var(--sp-surface);
    border-right: 1px solid var(--sp-border);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Logo */
.sp-sidebar-logo {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sp-border);
}

.sp-sidebar-logo img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sp-sidebar-logo--text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sp-text);
}

/* Navigation */
.sp-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.sp-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    text-decoration: none;
    border: none;
    border-radius: var(--sp-radius-sm);
    background: none;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.sp-nav-link:hover {
    color: var(--sp-text);
    background: var(--sp-surface-2);
}

.sp-nav-link svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.sp-nav-link:hover svg {
    opacity: 1;
}

.sp-nav-link--cta {
    color: var(--sp-accent);
    font-weight: 600;
}

.sp-nav-link--cta:hover {
    color: var(--sp-accent-hover);
    background: var(--sp-accent-glow);
}

.sp-nav-link--cta svg {
    opacity: 1;
    color: var(--sp-accent);
}

.sp-nav-link--logout {
    color: var(--sp-text-muted);
    opacity: 0.7;
}

.sp-nav-link--logout:hover {
    opacity: 1;
    color: #f87171;
}

/* Sidebar sections */
.sp-sidebar-section {
    padding-top: 20px;
    margin-top: 4px;
    border-top: 1px solid var(--sp-border);
}

.sp-sidebar-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sp-text-muted);
    margin: 0 0 12px;
}

/* Contacts */
.sp-contact {
    margin-bottom: 14px;
}

.sp-contact-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sp-text);
    margin-bottom: 2px;
}

.sp-contact-link {
    display: block;
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    text-decoration: none;
    line-height: 1.6;
}

.sp-contact-link:hover {
    color: var(--sp-accent);
}

/* Booking link */
.sp-booking-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    text-decoration: none;
    border-radius: var(--sp-radius-sm);
    transition: color 0.15s, background 0.15s;
}

.sp-booking-link:hover {
    color: var(--sp-text);
    background: var(--sp-surface-2);
}

/* Sidebar footer */
.sp-sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--sp-border);
}

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════ */

.sp-main {
    padding: 0;
    overflow-y: auto;
}

/* ── Hero banner ──────────────────────────────────────────── */

.sp-hero {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    padding: 40px 48px;
    background-color: #1a1040;
    background-size: cover;
    background-position: center;
}

.sp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.55) 0%,
        rgba(139, 92, 246, 0.35) 40%,
        rgba(15, 15, 25, 0.85) 100%
    );
}

.sp-hero-content {
    position: relative;
    z-index: 1;
}

.sp-hero-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sp-hero-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    max-width: 500px;
}

/* ── Section layout ───────────────────────────────────────── */

.sp-section {
    padding: 32px 48px;
}

.sp-section + .sp-section {
    border-top: 1px solid var(--sp-border);
}

.sp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.sp-section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--sp-text);
    letter-spacing: -0.01em;
}

/* ── Button ───────────────────────────────────────────────── */

.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.sp-btn:active {
    transform: scale(0.97);
}

.sp-btn--accent {
    background: var(--sp-accent);
    color: #fff;
}

.sp-btn--accent:hover {
    background: var(--sp-accent-hover);
}

/* ── Cards ────────────────────────────────────────────────── */

.sp-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    overflow: hidden;
}

.sp-card--flat {
    padding: 16px 20px;
}

.sp-card-summary {
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
}

.sp-card-summary::-webkit-details-marker {
    display: none;
}

.sp-card-summary::marker {
    content: '';
}

.sp-card[open] > .sp-card-summary {
    border-bottom: 1px solid var(--sp-border);
}

.sp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.sp-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sp-text);
}

.sp-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--sp-text-muted);
}

.sp-card-body {
    padding: 16px 20px;
}

/* ── Request body ─────────────────────────────────────────── */
/* Bodies come from email, so the markup inside is whatever the sender's mail
   client produced. Everything here is defensive: constrain it rather than
   trust it to lay itself out. */
.sp-request-body {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--sp-border);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--sp-text-muted);
    max-height: 420px;
    overflow-y: auto;
    overflow-wrap: anywhere;   /* long unbroken URLs must not widen the card */
}
.sp-request-body > :first-child { margin-top: 0; }
.sp-request-body > :last-child { margin-bottom: 0; }
.sp-request-body p { margin: 0 0 0.7em; }
.sp-request-body a { color: var(--sp-accent-hover); }
.sp-request-body img { max-width: 100%; height: auto; }
.sp-request-body table { max-width: 100%; border-collapse: collapse; }
.sp-request-body blockquote {
    margin: 0 0 0.7em;
    padding-left: 10px;
    border-left: 2px solid var(--sp-border);
}

/* Emergency marker on a client's own request. */
.sp-emergency {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 3px;
    background: #e5484d;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ── Badge ────────────────────────────────────────────────── */

.sp-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 99px;
    color: #fff;
    white-space: nowrap;
    line-height: 1.3;
}

.sp-badge--sm {
    font-size: 0.62rem;
    padding: 2px 8px;
}

/* Request status colors */
.sp-badge--open { background: #3b82f6; }
.sp-badge--new { background: #8b5cf6; }
.sp-badge--assigned { background: #f59e0b; }
.sp-badge--in_progress { background: #6366f1; }
.sp-badge--done { background: #22c55e; }
.sp-badge--closed { background: #6b7280; }

/* ── Milestones ───────────────────────────────────────────── */

.sp-milestone {
    border-bottom: 1px solid var(--sp-border);
}

.sp-milestone:last-child {
    border-bottom: none;
}

.sp-milestone-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
}

.sp-milestone-summary::-webkit-details-marker { display: none; }
.sp-milestone-summary::marker { content: ''; }

.sp-milestone-name {
    font-weight: 600;
    color: var(--sp-text);
}

.sp-milestone-pct {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    margin-left: auto;
}

/* ── Tasks ────────────────────────────────────────────────── */

.sp-tasks {
    padding: 0 0 8px 20px;
}

.sp-task {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.83rem;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.06);
}

.sp-task:last-child {
    border-bottom: none;
}

.sp-task-name {
    flex: 1;
    color: var(--sp-text);
}

/* Owner + date range, kept together so they wrap as one unit. */
.sp-task-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sp-task-owner,
.sp-task-due {
    font-size: 0.75rem;
    color: var(--sp-text-muted);
    white-space: nowrap;
}

/* ── Project files link ───────────────────────────────────── */
/* Folded in from the retired project board module, where it was an
   unstyled "View Files" anchor. */
.sp-files-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    padding: 7px 11px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--sp-text-muted);
    text-decoration: none;
    background: var(--sp-surface-2);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    transition: color 0.15s, border-color 0.15s;
}

.sp-files-link:hover {
    color: var(--sp-accent-hover);
    border-color: var(--sp-accent);
}

/* ── Empty states ─────────────────────────────────────────── */

.sp-empty {
    font-size: 0.9rem;
    color: var(--sp-text-muted);
    text-align: center;
    padding: 24px 0;
}

.sp-empty-sm {
    font-size: 0.82rem;
    color: var(--sp-text-muted);
    padding: 8px 0;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */

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

.sp-modal-overlay.is-open {
    display: flex;
}

.sp-modal {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    width: 520px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.sp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--sp-border);
}

.sp-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sp-text);
}

.sp-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--sp-text-muted);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.sp-modal-close:hover {
    color: var(--sp-text);
}

.sp-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Style the Contao form inside the modal */
.sp-modal-body .formbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-modal-body .widget {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-modal-body label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sp-text);
}

.sp-modal-body input[type="text"],
.sp-modal-body textarea {
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    background: var(--sp-surface-2);
    color: var(--sp-text);
    transition: border-color 0.15s;
}

.sp-modal-body input[type="text"]:focus,
.sp-modal-body textarea:focus {
    border-color: var(--sp-accent);
    outline: none;
}

.sp-modal-body textarea {
    min-height: 100px;
    resize: vertical;
}

.sp-modal-body .submit_container {
    display: flex;
    justify-content: flex-end;
}

.sp-modal-body button[type="submit"],
.sp-modal-body input[type="submit"] {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--sp-accent);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.sp-modal-body button[type="submit"]:hover,
.sp-modal-body input[type="submit"]:hover {
    background: var(--sp-accent-hover);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .stratum-portal {
        grid-template-columns: 1fr;
    }

    .sp-sidebar {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
    }

    .sp-sidebar-logo {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        margin-right: auto;
    }

    .sp-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 0;
    }

    .sp-nav-link {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .sp-sidebar-section,
    .sp-sidebar-footer {
        display: none;
    }

    .sp-hero {
        min-height: 200px;
        padding: 28px 24px;
    }

    .sp-hero-content h1 {
        font-size: 1.6rem;
    }

    .sp-section {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .sp-hero {
        min-height: 160px;
        padding: 20px 16px;
    }

    .sp-hero-content h1 {
        font-size: 1.3rem;
    }

    .sp-section {
        padding: 16px;
    }

    .sp-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sp-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Task rows carry a name, a status badge, an owner and a date range —
       too much for one line on a phone, so let them stack. */
    .sp-task {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .sp-task-name {
        flex: 1 1 100%;
    }
}

