@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ================================================================
   FOREVER IKS - PHASE 1 DESIGN SYSTEM
   Dark engineering / manufacturer renewal platform
   Shared visual foundation only. Core renewal behavior is untouched.
   ================================================================ */

:root {
    --fx-bg-0: #070a0d;
    --fx-bg-1: #0b1015;
    --fx-bg-2: #10171d;
    --fx-panel: #11191f;
    --fx-panel-2: #151f26;
    --fx-panel-3: #19242c;
    --fx-line: #26323a;
    --fx-line-soft: rgba(151, 169, 181, .12);
    --fx-line-strong: #394a55;
    --fx-red: #f21f2b;
    --fx-red-hover: #ff3440;
    --fx-red-soft: rgba(242, 31, 43, .10);
    --fx-silver: #b7c1c8;
    --fx-text: #edf2f5;
    --fx-text-soft: #b7c1c8;
    --fx-text-muted: #7f8e98;
    --fx-green: #35c98a;
    --fx-amber: #e7a83d;
    --fx-danger: #ff4f5a;
    --fx-info: #7aa9c8;
    --fx-radius-xs: 4px;
    --fx-radius-sm: 6px;
    --fx-radius: 8px;
    --fx-radius-lg: 10px;
    --fx-shadow: 0 18px 45px rgba(0, 0, 0, .26);
    --fx-shadow-soft: 0 10px 28px rgba(0, 0, 0, .18);
    --fx-container: 1240px;
    --fx-font: "IBM Plex Sans", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    --fx-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
    --fx-transition: 160ms ease;
}

html {
    color-scheme: dark;
    background: var(--fx-bg-0);
}

body,
button,
input,
select,
textarea {
    font-family: var(--fx-font) !important;
}

body {
    background:
        radial-gradient(circle at 82% 0%, rgba(242, 31, 43, .055), transparent 28rem),
        linear-gradient(180deg, #080c10 0%, #070a0d 100%);
    color: var(--fx-text);
    font-size: 12px;
    line-height: 1.55;
    font-weight: 400;
}

/* User-approved compact type scale. No UI text in this layer exceeds 14px. */
.home-page h1,
.home-page h2,
.home-page h3,
.auth-body h1,
.auth-body h2,
.auth-body h3,
.support-page h1,
.support-page h2,
.support-page h3,
.nf-page h1,
.nf-page h2,
.nf-page h3,
.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell h4 {
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    letter-spacing: -.01em;
}

.home-page p,
.auth-body p,
.support-page p,
.nf-page p,
.app-shell p,
.home-page a,
.auth-body a,
.support-page a,
.app-shell a,
.home-page button,
.auth-body button,
.support-page button,
.app-shell button,
.home-page input,
.auth-body input,
.support-page input,
.app-shell input,
.home-page select,
.app-shell select,
.home-page textarea,
.app-shell textarea {
    font-size: 12px !important;
}

small,
.home-page small,
.auth-body small,
.support-page small,
.app-shell small {
    font-size: 10px !important;
}

::selection {
    background: rgba(242, 31, 43, .28);
    color: #fff;
}

:focus-visible {
    outline: 2px solid rgba(242, 31, 43, .75);
    outline-offset: 2px;
}

/* ----------------------------------------------------------------
   Generic shared manufacturer components
   ---------------------------------------------------------------- */
.ds-panel {
    background: linear-gradient(180deg, rgba(20, 29, 36, .98), rgba(13, 20, 25, .98));
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius);
    box-shadow: var(--fx-shadow-soft);
}

.ds-label {
    font-family: var(--fx-mono);
    color: var(--fx-text-muted);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ds-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-xs);
    background: rgba(255, 255, 255, .025);
    color: var(--fx-text-soft);
    font-size: 10px;
    font-weight: 500;
}

.ds-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fx-text-muted);
    box-shadow: 0 0 0 3px rgba(127, 142, 152, .09);
}

.ds-status.is-active::before { background: var(--fx-green); box-shadow: 0 0 0 3px rgba(53, 201, 138, .10); }
.ds-status.is-warning::before { background: var(--fx-amber); box-shadow: 0 0 0 3px rgba(231, 168, 61, .10); }
.ds-status.is-danger::before { background: var(--fx-danger); box-shadow: 0 0 0 3px rgba(255, 79, 90, .10); }

.ds-btn,
button.ds-btn,
a.ds-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-sm);
    background: var(--fx-panel-2);
    color: var(--fx-text);
    font-size: 11px !important;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--fx-transition), border-color var(--fx-transition), color var(--fx-transition), transform var(--fx-transition);
}

.ds-btn:hover {
    border-color: var(--fx-line-strong);
    background: var(--fx-panel-3);
}

.ds-btn:active { transform: translateY(1px); }

.ds-btn-primary,
button.ds-btn-primary,
a.ds-btn-primary {
    border-color: #ff3842;
    background: linear-gradient(180deg, #f62833, #d8121d);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 7px 18px rgba(242, 31, 43, .14);
}

.ds-btn-primary:hover {
    border-color: #ff5a63;
    background: linear-gradient(180deg, #ff3440, #e51521);
}

.ds-input,
input.ds-input,
select.ds-input,
textarea.ds-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-sm);
    background: #0b1116;
    color: var(--fx-text);
    padding: 0 12px;
    font-size: 12px !important;
    outline: none;
    transition: border-color var(--fx-transition), box-shadow var(--fx-transition), background var(--fx-transition);
}

.ds-input:focus,
input.ds-input:focus,
select.ds-input:focus,
textarea.ds-input:focus {
    border-color: rgba(242, 31, 43, .72);
    background: #0d1419;
    box-shadow: 0 0 0 3px rgba(242, 31, 43, .08);
}

/* ----------------------------------------------------------------
   Public header / manufacturer navigation
   ---------------------------------------------------------------- */
.home-header {
    position: sticky;
    top: 0;
    z-index: 800;
    background: rgba(7, 11, 14, .94) !important;
    border-bottom: 1px solid #263039 !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .18);
}

.home-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(242, 31, 43, .72) 20%, rgba(242, 31, 43, .18) 52%, transparent 100%);
    pointer-events: none;
}

.home-header .home-container {
    max-width: var(--fx-container) !important;
    min-height: 62px;
    height: 62px !important;
    padding: 0 20px !important;
    gap: 22px;
}

.home-logo {
    min-width: 176px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.home-logo img {
    height: 28px !important;
    width: auto;
    object-fit: contain;
}

.home-logo-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid var(--fx-line);
}

.home-logo-copy strong {
    color: var(--fx-text);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 500;
    white-space: nowrap;
}

.home-logo-copy span {
    margin-top: 1px;
    color: var(--fx-text-muted);
    font-family: var(--fx-mono);
    font-size: 7.5px;
    line-height: 1.2;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-nav {
    flex: 1;
    justify-content: center;
    gap: 2px !important;
}

.home-nav a {
    position: relative;
    min-height: 34px;
    padding: 0 10px !important;
    border: 1px solid transparent !important;
    border-radius: var(--fx-radius-sm) !important;
    background: transparent !important;
    color: var(--fx-text-soft) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0;
}

.home-nav a svg { display: none; }

.home-nav a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .025) !important;
    border-color: var(--fx-line-soft) !important;
}

.home-nav a.active {
    color: #fff !important;
    background: rgba(242, 31, 43, .055) !important;
    border-color: rgba(242, 31, 43, .18) !important;
}

.home-nav a.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -14px;
    height: 2px;
    background: var(--fx-red);
    box-shadow: 0 0 10px rgba(242, 31, 43, .5);
}

.home-actions {
    gap: 7px !important;
}

.home-login,
.home-register {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px !important;
    border-radius: var(--fx-radius-sm) !important;
    border: 1px solid var(--fx-line) !important;
    background: rgba(255, 255, 255, .025) !important;
    color: var(--fx-text) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    transition: var(--fx-transition);
}

.home-login:hover {
    border-color: var(--fx-line-strong) !important;
    background: rgba(255, 255, 255, .045) !important;
}

.home-register {
    border-color: #ef3440 !important;
    background: linear-gradient(180deg, #f32631, #d8101b) !important;
    box-shadow: 0 6px 16px rgba(242, 31, 43, .15);
}

.home-register:hover {
    border-color: #ff5c65 !important;
    background: linear-gradient(180deg, #ff3641, #e61622) !important;
}

.home-login svg,
.home-register svg {
    width: 14px !important;
    height: 14px !important;
}

.home-menu-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--fx-radius-sm) !important;
    border: 1px solid var(--fx-line) !important;
    background: #0d1419 !important;
    color: var(--fx-text) !important;
}

.home-menu-btn svg {
    width: 17px !important;
    height: 17px !important;
}

.manufacturer-strip {
    min-height: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    background: linear-gradient(90deg, rgba(115, 9, 15, .72), rgba(71, 10, 14, .45) 48%, rgba(14, 18, 22, .75));
}

.manufacturer-strip .home-container {
    max-width: var(--fx-container) !important;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0 20px !important;
}

.manufacturer-strip span {
    position: relative;
    color: rgba(241, 245, 247, .78);
    font-family: var(--fx-mono);
    font-size: 8px;
    letter-spacing: .035em;
    white-space: nowrap;
}

.manufacturer-strip span + span::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .38);
}

.home-mobile-nav {
    position: fixed;
    top: 70px;
    right: 12px;
    left: auto;
    z-index: 790;
    width: min(310px, calc(100vw - 24px));
    margin: 0 !important;
    padding: 7px !important;
    border: 1px solid var(--fx-line) !important;
    border-radius: var(--fx-radius) !important;
    background: rgba(12, 18, 23, .985) !important;
    box-shadow: var(--fx-shadow);
    backdrop-filter: blur(16px);
}

.home-mobile-nav.show { display: block !important; }

.home-mobile-nav a {
    min-height: 38px;
    padding: 0 10px !important;
    border: 1px solid transparent !important;
    border-radius: var(--fx-radius-sm);
    color: var(--fx-text-soft) !important;
    font-size: 10.5px !important;
}

.home-mobile-nav a:hover,
.home-mobile-nav a.active {
    color: #fff !important;
    border-color: rgba(242, 31, 43, .18) !important;
    background: var(--fx-red-soft) !important;
}

.home-mobile-nav svg {
    width: 15px !important;
    height: 15px !important;
    color: var(--fx-silver);
}

.mobile-nav-divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--fx-line);
}

/* ----------------------------------------------------------------
   Public footer
   ---------------------------------------------------------------- */
.home-footer {
    position: relative;
    margin-top: auto;
    border-top: 1px solid var(--fx-line) !important;
    background:
        linear-gradient(135deg, rgba(242, 31, 43, .03), transparent 30%),
        #080d11 !important;
    color: var(--fx-text-soft);
}

.home-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 34%;
    height: 1px;
    background: linear-gradient(90deg, var(--fx-red), transparent);
}

.home-footer .home-container {
    max-width: var(--fx-container) !important;
    padding: 0 20px !important;
}

.home-footer-top {
    min-height: 92px;
    display: grid !important;
    grid-template-columns: minmax(260px, 1.25fr) minmax(220px, .9fr) minmax(240px, 1fr);
    align-items: center;
    gap: 26px;
    padding: 18px 0 !important;
}

.home-footer-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.home-footer-brand img {
    width: 42px !important;
    height: 42px !important;
    object-fit: contain;
    padding: 5px;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-sm);
    background: #0d1419;
}

.home-footer-brand strong {
    display: block;
    margin-bottom: 3px;
    color: var(--fx-text);
    font-size: 11px;
    font-weight: 600;
}

.home-footer-brand p {
    max-width: 320px;
    margin: 0;
    color: var(--fx-text-muted) !important;
    font-size: 9.5px !important;
    line-height: 1.55;
    text-align: left !important;
}

.home-footer-nav {
    display: grid !important;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 8px 22px !important;
}

.home-footer-nav a {
    position: relative;
    color: var(--fx-text-soft) !important;
    font-size: 10px !important;
    font-weight: 500;
}

.home-footer-nav a:hover { color: #fff !important; }

.footer-assurance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.footer-assurance span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border: 1px solid var(--fx-line-soft);
    border-radius: var(--fx-radius-xs);
    background: rgba(255, 255, 255, .018);
    color: var(--fx-text-muted);
    font-family: var(--fx-mono);
    font-size: 7.5px;
    letter-spacing: .02em;
}

.footer-assurance i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--fx-green);
    box-shadow: 0 0 8px rgba(53, 201, 138, .35);
}

.home-footer-bottom {
    min-height: 39px;
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 14px;
    border-top: 1px solid var(--fx-line-soft) !important;
    color: var(--fx-text-muted);
    font-size: 8.5px !important;
}

.home-footer-bottom code {
    font-family: var(--fx-mono);
    color: var(--fx-text-muted);
    font-size: 8px;
    letter-spacing: .035em;
}

/* ----------------------------------------------------------------
   Shared form/card harmonization for current pages.
   These rules intentionally do not change application logic.
   ---------------------------------------------------------------- */
.home-verify-card,
.auth-card,
.support-card,
.nf-card {
    border-color: var(--fx-line) !important;
    border-radius: var(--fx-radius) !important;
    background: linear-gradient(180deg, rgba(18, 27, 33, .98), rgba(12, 18, 23, .98)) !important;
    box-shadow: var(--fx-shadow-soft) !important;
}

.home-input-wrap,
.auth-input-wrap,
.auth-field input,
.support-contact {
    border-color: var(--fx-line) !important;
    border-radius: var(--fx-radius-sm) !important;
    background: #0b1116 !important;
}

.home-input-wrap:focus-within,
.auth-input-wrap:focus-within,
.auth-field input:focus {
    border-color: rgba(242, 31, 43, .66) !important;
    box-shadow: 0 0 0 3px rgba(242, 31, 43, .075) !important;
}

.home-btn,
.auth-submit,
.support-whatsapp {
    border: 1px solid #ff3742 !important;
    border-radius: var(--fx-radius-sm) !important;
    background: linear-gradient(180deg, #f52732, #d7111c) !important;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(242, 31, 43, .14) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
}

.home-btn:hover,
.auth-submit:hover,
.support-whatsapp:hover {
    background: linear-gradient(180deg, #ff3742, #e41622) !important;
}

.home-media-btn {
    border-color: var(--fx-line) !important;
    border-radius: var(--fx-radius-sm) !important;
    background: var(--fx-panel-2) !important;
    color: var(--fx-text-soft) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
}

/* ----------------------------------------------------------------
   Customer portal theme bridge.
   Phase 1 gives the existing portal the same material language without
   restructuring its business screens yet.
   ---------------------------------------------------------------- */
.app-shell {
    --bg-body: var(--fx-bg-0);
    --bg-card: var(--fx-panel);
    --bg-surface: var(--fx-bg-2);
    --border: var(--fx-line);
    --text-primary: var(--fx-text);
    --text-secondary: var(--fx-text-muted);
    --primary: var(--fx-red);
    --primary-hover: var(--fx-red-hover);
    --success: var(--fx-green);
    --warning: var(--fx-amber);
    --danger: var(--fx-danger);
    font-family: var(--fx-font) !important;
    background: var(--fx-bg-0);
}

.app-sidebar,
.app-header,
.modal-dialog,
.profile-dropdown {
    border-color: var(--fx-line) !important;
    background-color: var(--fx-bg-1) !important;
}

.sidebar-brand-logo img {
    max-height: 29px !important;
    object-fit: contain;
}

.sidebar-nav a {
    border-radius: var(--fx-radius-sm) !important;
    color: var(--fx-text-soft) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
}

.sidebar-nav a.active {
    color: #fff !important;
    background: rgba(242, 31, 43, .08) !important;
    box-shadow: inset 2px 0 0 var(--fx-red);
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, .025) !important;
    color: #fff !important;
}

.sidebar-nav svg,
.app-header svg { color: var(--fx-silver); }

.sidebar-counter,
.notify-badge {
    background: var(--fx-red) !important;
    color: #fff !important;
}

.app-header h1 {
    font-size: 13px !important;
    font-weight: 500 !important;
}

.app-page-label {
    color: var(--fx-text-muted) !important;
    font-family: var(--fx-mono) !important;
    font-size: 8px !important;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-search {
    border-color: var(--fx-line) !important;
    border-radius: var(--fx-radius-sm) !important;
    background: #0b1116 !important;
}

.app-search:focus-within {
    border-color: rgba(242, 31, 43, .55) !important;
    box-shadow: 0 0 0 3px rgba(242, 31, 43, .065) !important;
}

.modal-dialog { border-radius: var(--fx-radius-lg) !important; }
.modal-close { border-radius: var(--fx-radius-sm) !important; background: var(--fx-panel-2) !important; }
.loader { border-top-color: var(--fx-red) !important; }

/* ----------------------------------------------------------------
   Responsive shell
   ---------------------------------------------------------------- */
@media (max-width: 980px) {
    .home-logo { min-width: auto; }
    .home-logo-copy { display: none; }
    .home-nav { display: none !important; }
    .home-menu-btn { display: inline-flex !important; }
    .home-actions .home-register { display: none; }

    .home-footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-assurance {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-header .home-container {
        min-height: 56px;
        height: 56px !important;
        padding: 0 14px !important;
    }

    .home-logo img { height: 25px !important; }
    .home-actions { margin-left: auto; }
    .home-actions .home-login { min-height: 33px; padding: 0 10px !important; }
    .home-actions .home-login span { display: none; }
    .home-mobile-nav { top: 64px; }

    .manufacturer-strip .home-container {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 14px !important;
    }

    .manufacturer-strip .home-container::-webkit-scrollbar { display: none; }

    .home-footer .home-container { padding: 0 14px !important; }

    .home-footer-top {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 18px 0 !important;
    }

    .home-footer-nav {
        justify-content: start;
    }

    .footer-assurance {
        grid-column: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center !important;
        padding: 10px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.ds-anchor {
    display: block;
    position: relative;
    top: -96px;
    visibility: hidden;
    pointer-events: none;
}
