:root {
    --erp-navy: #0b1f33;
    --erp-navy-deep: #071522;
    --erp-blue: #1256a3;
    --erp-blue-soft: #dbeafe;
    --erp-steel: #475569;
    --erp-steel-light: #e2e8f0;
    --erp-surface: #f5f7fa;
    --erp-white: #ffffff;
    --erp-charcoal: #172033;
    --erp-orange: #ef7f1a;
    --erp-orange-dark: #d76508;
    --erp-success: #17845b;
    --erp-border: #dce3eb;
    --erp-muted: #66758a;
    --erp-shadow: 0 24px 70px rgba(7, 21, 34, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--erp-surface);
    color: var(--erp-charcoal);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.erp-welcome-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        linear-gradient(rgba(71, 85, 105, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(71, 85, 105, 0.045) 1px, transparent 1px),
        var(--erp-surface);
    background-size: 32px 32px;
}

.erp-welcome-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(22px, 4vw, 68px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--erp-border);
    position: relative;
    z-index: 10;
}

.erp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.erp-brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    border: 1px solid var(--erp-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.erp-brand-name {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    color: var(--erp-navy);
    line-height: 1.15;
}

.erp-brand-subtitle {
    margin-top: 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--erp-muted);
    white-space: nowrap;
}

.erp-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.erp-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid #b7dccd;
    border-radius: 999px;
    background: #edf9f4;
    color: var(--erp-success);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.erp-clock {
    text-align: right;
    min-width: 180px;
}

.erp-clock-date {
    font-size: 0.78rem;
    color: var(--erp-muted);
}

.erp-clock-time {
    margin-top: 2px;
    font-size: 1rem;
    color: var(--erp-navy);
    font-weight: 750;
    letter-spacing: 0.03em;
}

.erp-welcome-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(460px, 0.98fr);
    min-height: calc(100vh - 134px);
}

.erp-welcome-content {
    display: flex;
    align-items: center;
    padding: clamp(42px, 6vw, 94px) clamp(28px, 6vw, 104px);
    background: rgba(255, 255, 255, 0.9);
    position: relative;
}

.erp-welcome-content::before {
    content: "";
    position: absolute;
    left: clamp(28px, 6vw, 104px);
    top: clamp(28px, 4vw, 64px);
    width: 58px;
    height: 5px;
    border-radius: 99px;
    background: var(--erp-orange);
}

.erp-content-inner {
    width: min(100%, 720px);
    animation: erpFadeUp 0.7s ease both;
}

.erp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--erp-blue);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.erp-eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
}

.erp-title {
    max-width: 690px;
    margin: 0;
    color: var(--erp-navy);
    font-size: clamp(2.35rem, 4.9vw, 4.75rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
    font-weight: 760;
}

.erp-title-accent {
    color: var(--erp-orange);
}

.erp-lead {
    max-width: 650px;
    margin: 24px 0 0;
    color: #4f6075;
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.72;
}

.erp-access-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 34px;
}

.erp-login-button {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 28px;
    border-radius: 10px;
    border: 1px solid var(--erp-blue);
    background: var(--erp-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 750;
    box-shadow: 0 14px 28px rgba(18, 86, 163, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.erp-login-button:hover {
    color: #fff;
    background: #0d488b;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(18, 86, 163, 0.28);
}

.erp-access-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--erp-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.erp-access-note i {
    color: var(--erp-success);
}

.erp-module-panel {
    margin-top: 40px;
    padding: 20px 22px 22px;
    border: 1px solid var(--erp-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.erp-module-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.erp-module-heading h2 {
    margin: 0;
    color: var(--erp-navy);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-module-heading span {
    color: var(--erp-muted);
    font-size: 0.72rem;
}

.erp-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.erp-module-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px solid #e4eaf1;
    color: #38485c;
    font-size: 0.78rem;
    font-weight: 650;
}

.erp-module-item i {
    color: var(--erp-blue);
    font-size: 0.98rem;
}

.erp-visual-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 4.5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 78% 14%, rgba(239, 127, 26, 0.18), transparent 20%),
        radial-gradient(circle at 14% 86%, rgba(18, 86, 163, 0.24), transparent 27%),
        linear-gradient(145deg, #081827 0%, #0b2239 55%, #102c49 100%);
    color: #fff;
}

.erp-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(700px) rotateX(58deg) scale(1.35);
    transform-origin: bottom center;
}

.erp-visual-panel::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: -150px;
    top: -150px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    box-shadow:
        0 0 0 52px rgba(255, 255, 255, 0.025),
        0 0 0 104px rgba(255, 255, 255, 0.018);
}

.erp-visual-card {
    width: min(100%, 650px);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    padding: clamp(24px, 3vw, 38px);
    background: rgba(9, 28, 46, 0.74);
    box-shadow: var(--erp-shadow);
    backdrop-filter: blur(10px);
    animation: erpFloat 7s ease-in-out infinite;
}

.erp-visual-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.erp-visual-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #d6e5f5;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 800;
}

.erp-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #9be4c9;
    font-size: 0.72rem;
    font-weight: 750;
}

.erp-live-indicator::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #35c991;
    box-shadow: 0 0 0 5px rgba(53, 201, 145, 0.12);
}

.erp-industrial-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.24));
}

.erp-visual-caption {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.erp-metric {
    padding: 13px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.erp-metric-label {
    color: #93a9c1;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.erp-metric-value {
    margin-top: 5px;
    color: #f5f9ff;
    font-size: 0.88rem;
    font-weight: 750;
}

.erp-welcome-footer {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px clamp(22px, 4vw, 68px);
    border-top: 1px solid var(--erp-border);
    background: #fff;
    color: var(--erp-muted);
    font-size: 0.74rem;
}

.erp-footer-brand {
    color: var(--erp-navy);
    font-weight: 750;
}

.erp-footer-version {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.erp-version-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--erp-success);
}

@keyframes erpFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes erpFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1180px) {
    .erp-welcome-main {
        grid-template-columns: minmax(0, 1fr) minmax(400px, 0.88fr);
    }

    .erp-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .erp-welcome-main {
        grid-template-columns: 1fr;
    }

    .erp-welcome-content {
        order: 1;
        padding-top: 70px;
    }

    .erp-visual-panel {
        order: 2;
        min-height: 560px;
    }

    .erp-clock {
        min-width: 150px;
    }
}

@media (max-width: 767.98px) {
    .erp-welcome-header {
        min-height: auto;
        align-items: flex-start;
        padding: 13px 18px;
    }

    .erp-brand-mark {
        width: 44px;
        height: 44px;
    }

    .erp-brand-subtitle,
    .erp-security-badge {
        display: none;
    }

    .erp-clock {
        min-width: 0;
    }

    .erp-clock-date {
        font-size: 0.68rem;
    }

    .erp-clock-time {
        font-size: 0.84rem;
    }

    .erp-welcome-content {
        padding: 64px 20px 46px;
    }

    .erp-welcome-content::before {
        left: 20px;
        top: 34px;
    }

    .erp-title {
        font-size: clamp(2.2rem, 12vw, 3.35rem);
    }

    .erp-access-row {
        align-items: stretch;
    }

    .erp-login-button {
        width: 100%;
    }

    .erp-module-grid {
        grid-template-columns: 1fr;
    }

    .erp-visual-panel {
        min-height: 460px;
        padding: 28px 18px;
    }

    .erp-visual-card {
        border-radius: 18px;
        padding: 20px 16px;
    }

    .erp-visual-caption {
        grid-template-columns: 1fr;
    }

    .erp-welcome-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }
}