/* ==========================================================
   FADI MAIL SYSTEM
   CYBER INFRASTRUCTURE PORTAL
========================================================== */

:root {
    --bg-0: #02060b;
    --bg-1: #07101a;
    --bg-2: #0b1827;

    --panel: rgba(5, 15, 26, 0.94);

    --cyan: #38bdf8;
    --cyan-soft: #7dd3fc;
    --cyan-dark: #0369a1;

    --green: #22c55e;

    --white: #f8fafc;
    --text: #cbd5e1;
    --muted: #64748b;

    --border: rgba(125, 211, 252, 0.14);
    --soft-border: rgba(255, 255, 255, 0.055);

    --input-height: 50px;
    --button-height: 52px;
}


/* ==========================================================
   GLOBAL
========================================================== */

* {
    box-sizing: border-box;
}

html,
body,
body.task-login,
body.task-login #layout {
    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
}

body.task-login {
    font-family:
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text);

    background: var(--bg-0);
}

body.task-login #layout {
    background: transparent !important;
}


/* ==========================================================
   PAGE
========================================================== */

.secure-mail-page {
    position: fixed;

    inset: 0;

    width: 100vw;

    height: 100vh;
    height: 100dvh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 16px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 72% 18%,
            rgba(14,165,233,0.11),
            transparent 30%
        ),
        radial-gradient(
            circle at 16% 80%,
            rgba(2,132,199,0.07),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #02060b,
            #06101b 55%,
            #02070d
        );
}


/* ==========================================================
   BACKGROUND LAYERS
========================================================== */

.tech-grid {
    position: absolute;

    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(56,189,248,0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(56,189,248,0.018) 1px,
            transparent 1px
        );

    background-size: 54px 54px;

    opacity: 0.55;
}

.tech-noise {
    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 50%,
            transparent 50%,
            rgba(0,0,0,0.20) 100%
        );
}


/* ==========================================================
   SHELL
========================================================== */

.secure-shell {
    position: relative;

    z-index: 5;

    width:
        min(
            1260px,
            calc(100vw - 32px)
        );

    height:
        min(
            730px,
            calc(100dvh - 32px)
        );

    display: grid;

    grid-template-rows:
        64px
        minmax(0,1fr)
        44px;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 22px;

    background:
        rgba(3, 10, 18, 0.89);

    box-shadow:
        0 45px 120px rgba(0,0,0,0.60),
        0 0 80px rgba(14,165,233,0.045);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    animation:
        shellIn .65s ease-out both;
}

@keyframes shellIn {
    from {
        opacity: 0;
        transform:
            translateY(18px)
            scale(.988);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}


/* ==========================================================
   HEADER
========================================================== */

.secure-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    border-bottom:
        1px solid var(--soft-border);

    background:
        rgba(255,255,255,.012);
}

.secure-brand {
    display: flex;

    align-items: center;

    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;

    display: grid;

    place-items: center;

    border:
        1px solid rgba(56,189,248,.20);

    border-radius: 9px;

    background:
        rgba(56,189,248,.055);

    color: var(--cyan-soft);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1px;
}

.brand-copy {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.brand-copy strong {
    color: var(--white);

    font-size: 10px;

    letter-spacing: 1.8px;
}

.brand-copy span {
    color: var(--muted);

    font-size: 7px;

    letter-spacing: 1.5px;
}

.secure-status {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #86efac;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.4px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 12px rgba(34,197,94,.82);

    animation:
        statusPulse 1.8s ease-in-out infinite;
}

@keyframes statusPulse {
    0%,
    100% {
        opacity: .45;
    }

    50% {
        opacity: 1;
    }
}


/* ==========================================================
   MAIN GRID
========================================================== */

.secure-main {
    min-height: 0;

    display: grid;

    grid-template-columns:
        1.08fr
        .92fr;

    overflow: hidden;
}


/* ==========================================================
   SHOWCASE
========================================================== */

.system-showcase {
    position: relative;

    min-width: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding:
        50px 58px;

    overflow: hidden;

    border-right:
        1px solid var(--soft-border);
}

.system-showcase::before {
    content: "";

    position: absolute;

    width: 390px;
    height: 390px;

    right: -190px;
    top: 70px;

    border-radius: 50%;

    border:
        1px solid rgba(56,189,248,.055);

    box-shadow:
        0 0 0 55px rgba(56,189,248,.012),
        0 0 0 110px rgba(56,189,248,.006);
}

.showcase-label {
    margin-bottom: 14px;

    color: var(--cyan);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 2.5px;
}

.system-showcase h1 {
    margin: 0;

    max-width: 620px;

    color: var(--white);

    font-size:
        clamp(
            44px,
            4.3vw,
            64px
        );

    font-weight: 500;

    line-height: 1.02;

    letter-spacing: -2.2px;
}

.system-showcase h1 span {
    color: var(--cyan-soft);
}

.showcase-text {
    max-width: 520px;

    margin:
        20px 0
        28px;

    color:
        rgba(203,213,225,.62);

    font-size: 12px;

    line-height: 1.7;
}


/* ==========================================================
   NETWORK FLOW
========================================================== */

.network-map {
    display: flex;

    align-items: center;

    width: 100%;

    max-width: 560px;

    margin-bottom: 24px;
}

.map-node {
    min-width: 120px;

    display: flex;

    align-items: center;

    gap: 9px;
}

.node-dot {
    width: 9px;
    height: 9px;

    flex: 0 0 9px;

    border-radius: 50%;

    background:
        rgba(56,189,248,.55);

    box-shadow:
        0 0 10px rgba(56,189,248,.18);
}

.node-dot.active {
    background:
        var(--green);

    box-shadow:
        0 0 12px rgba(34,197,94,.65);
}

.map-node div {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.map-node strong {
    color:
        rgba(226,232,240,.80);

    font-size: 7px;

    letter-spacing: 1px;
}

.map-node small {
    color:
        rgba(148,163,184,.42);

    font-size: 7px;
}

.map-line {
    flex: 1;

    height: 1px;

    min-width: 22px;

    margin:
        0 10px;

    background:
        linear-gradient(
            90deg,
            rgba(56,189,248,.04),
            rgba(56,189,248,.23),
            rgba(56,189,248,.04)
        );
}


/* ==========================================================
   STATS
========================================================== */

.system-stats {
    width: 100%;

    max-width: 540px;

    display: grid;

    grid-template-columns:
        repeat(3,1fr);

    gap: 10px;

    margin-bottom: 24px;
}

.stat-card {
    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        12px;

    border:
        1px solid rgba(255,255,255,.05);

    border-radius: 11px;

    background:
        rgba(255,255,255,.018);
}

.stat-card > span {
    color: var(--cyan-soft);

    font-family:
        Consolas,
        monospace;

    font-size: 12px;
}

.green-indicator {
    width: 8px !important;
    height: 8px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 10px rgba(34,197,94,.62);
}

.stat-card div {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.stat-card strong {
    color:
        rgba(226,232,240,.82);

    font-size: 8px;
}

.stat-card small {
    color:
        rgba(148,163,184,.44);

    font-size: 7px;
}


/* ==========================================================
   OWNER
========================================================== */

.owner-block {
    display: flex;

    align-items: center;

    gap: 12px;
}

.owner-block span {
    color:
        rgba(56,189,248,.55);

    font-size: 7px;

    letter-spacing: 1.5px;
}

.owner-block strong {
    color: var(--white);

    font-size: 9px;

    letter-spacing: 1.2px;
}

.owner-block small {
    color:
        rgba(148,163,184,.48);

    font-size: 8px;
}


/* ==========================================================
   LOGIN ZONE
========================================================== */

.login-zone {
    min-width: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 34px;

    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(14,165,233,.055),
            transparent 38%
        );
}


/* ==========================================================
   LOGIN PANEL
========================================================== */

.login-panel {
    position: relative;

    width: 100%;

    max-width: 430px;

    padding:
        31px 34px;

    overflow: hidden;

    border:
        1px solid rgba(125,211,252,.15);

    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            rgba(7,20,34,.93),
            rgba(3,10,18,.98)
        );

    box-shadow:
        0 28px 72px rgba(0,0,0,.43),
        0 0 42px rgba(14,165,233,.055),
        inset 0 1px 0 rgba(255,255,255,.035);
}

.login-panel::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 58%;
    height: 1px;

    transform: translateX(-50%);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(56,189,248,.78),
            transparent
        );
}


/* ==========================================================
   PANEL TOP
========================================================== */

.panel-top {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 8px;

    margin-bottom: 9px;

    color: var(--cyan-soft);

    font-size: 7px;

    font-weight: 900;

    letter-spacing: 1.8px;
}

.panel-light {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 10px rgba(34,197,94,.8);
}


/* ==========================================================
   LOGO
========================================================== */

.panel-logo {
    position: relative;

    height: 66px;

    display: flex;

    align-items: center;
    justify-content: center;
}

.panel-logo-glow {
    position: absolute;

    width: 175px;
    height: 52px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(56,189,248,.15),
            transparent 70%
        );

    filter: blur(13px);
}

.panel-logo img {
    position: relative;

    z-index: 2;

    max-width: 155px;

    max-height: 56px;

    object-fit: contain;
}


/* ==========================================================
   PANEL IDENTITY
========================================================== */

.panel-identity {
    text-align: center;

    margin-bottom: 12px;
}

.panel-identity strong {
    display: block;

    color: var(--white);

    font-size: 16px;

    letter-spacing: 1.5px;
}

.panel-identity span {
    display: block;

    margin-top: 3px;

    color:
        rgba(56,189,248,.76);

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1.7px;
}


/* ==========================================================
   PANEL HEADING
========================================================== */

.panel-heading {
    text-align: center;

    margin-bottom: 16px;
}

.panel-heading h2 {
    margin: 0;

    color: var(--white);

    font-size: 24px;

    font-weight: 700;
}

.panel-heading p {
    margin:
        5px 0 0;

    color:
        rgba(148,163,184,.56);

    font-size: 10px;
}


/* ==========================================================
   FORM
========================================================== */

.sysmail-form {
    width: 100% !important;

    margin: 0 !important;
}


/* input group */

.sysmail-form .input-group {
    width: 100%;

    margin-bottom: 9px;

    border-radius: 11px;
}


/* icon */

.sysmail-form .input-group-text {
    width: 52px;
    min-width: 52px;

    height: var(--input-height);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid rgba(255,255,255,.10);

    border-radius:
        11px 0 0 11px;

    background:
        rgba(56,189,248,.045);

    color:
        var(--cyan-soft);
}


/* inputs */

.sysmail-form input[type="text"],
.sysmail-form input[type="email"],
.sysmail-form input[type="password"] {
    width: 100%;

    height:
        var(--input-height) !important;

    min-height:
        var(--input-height) !important;

    padding:
        0 14px;

    border:
        1px solid rgba(255,255,255,.10);

    border-radius:
        0 11px 11px 0;

    background:
        rgba(255,255,255,.035);

    color: var(--white);

    font-size: 14px !important;

    outline: none;

    box-shadow: none;

    transition:
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.sysmail-form input::placeholder {
    color:
        rgba(148,163,184,.48);
}

.sysmail-form input:focus {
    background:
        rgba(255,255,255,.055);

    border-color:
        rgba(56,189,248,.75);

    box-shadow:
        0 0 0 3px
        rgba(56,189,248,.07);
}


/* ==========================================================
   BUTTON
========================================================== */

.sysmail-form .formbuttons,
.sysmail-form p.formbuttons {
    margin:
        6px 0 0 !important;

    padding: 0 !important;
}

.sysmail-form button.btn-primary,
.sysmail-form input[type="submit"] {
    width:
        100% !important;

    height:
        var(--button-height) !important;

    min-height:
        var(--button-height) !important;

    margin: 0 !important;

    border:
        1px solid rgba(125,211,252,.42);

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #075985,
            #0284c7 52%,
            #0ea5e9
        );

    color: var(--white);

    font-size: 11px !important;

    font-weight: 900;

    letter-spacing: 2px;

    text-transform: uppercase;

    cursor: pointer;

    box-shadow:
        0 12px 28px rgba(2,132,199,.28),
        inset 0 1px 0 rgba(255,255,255,.17);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.sysmail-form button.btn-primary:hover,
.sysmail-form input[type="submit"]:hover {
    transform: translateY(-2px);

    filter: brightness(1.09);

    box-shadow:
        0 17px 34px
        rgba(2,132,199,.38);
}


/* ==========================================================
   PANEL FOOTER
========================================================== */

.panel-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 13px;

    color:
        rgba(148,163,184,.42);

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1px;
}

.panel-footer span {
    display: flex;

    align-items: center;

    gap: 6px;
}

.panel-footer i {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--green);
}


/* ==========================================================
   FOOTER
========================================================== */

.secure-footer {
    display: flex;

    align-items: center;

    gap: 24px;

    padding:
        0 22px;

    border-top:
        1px solid var(--soft-border);

    background:
        rgba(2,8,14,.90);

    color:
        rgba(148,163,184,.42);

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1px;
}

.secure-footer span {
    white-space: nowrap;
}

.secure-footer span:first-child {
    display: flex;

    align-items: center;

    gap: 7px;
}

.secure-footer i {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 9px rgba(34,197,94,.7);
}

.node-name {
    margin-left: auto;

    font-family:
        Consolas,
        monospace;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1000px) {

    .secure-shell {
        width:
            calc(100vw - 24px);

        height:
            calc(100dvh - 24px);
    }


    .secure-main {
        grid-template-columns:
            .78fr
            1.22fr;
    }


    .system-showcase {
        padding:
            36px 30px;
    }


    .system-showcase h1 {
        font-size:
            38px;
    }


    .showcase-text {
        font-size:
            11px;
    }


    .network-map {
        display: none;
    }


    .system-stats {
        grid-template-columns:
            1fr;

        max-width:
            230px;

        gap: 7px;
    }


    .stat-card {
        padding:
            8px 10px;
    }


    .login-zone {
        padding:
            22px;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 680px) {

    .secure-mail-page {
        padding: 7px;
    }


    .secure-shell {
        width:
            calc(100vw - 14px);

        height:
            calc(100dvh - 14px);

        grid-template-rows:
            54px
            minmax(0,1fr)
            38px;

        border-radius: 16px;
    }


    .secure-header {
        padding:
            0 15px;
    }


    .brand-copy strong {
        font-size:
            9px;
    }


    .brand-copy span {
        display: none;
    }


    .secure-main {
        display: block;
    }


    .system-showcase {
        display: none;
    }


    .login-zone {
        width: 100%;

        height: 100%;

        display: flex;

        align-items: center;
        justify-content: center;

        padding: 16px;
    }


    .login-panel {
        width:
            min(
                430px,
                100%
            );

        padding:
            27px 22px;

        border-radius: 16px;
    }


    .sysmail-form input[type="text"],
    .sysmail-form input[type="email"],
    .sysmail-form input[type="password"] {
        font-size:
            16px !important;
    }


    .secure-footer {
        justify-content: center;

        gap: 12px;

        padding:
            0 10px;

        font-size: 6px;
    }


    .secure-footer span:nth-child(3),
    .secure-footer span:nth-child(4),
    .node-name {
        display: none;
    }

}


/* ==========================================================
   SHORT SCREENS
========================================================== */

@media (max-height: 650px) {

    .system-showcase {
        padding-top: 28px;
        padding-bottom: 28px;
    }


    .system-showcase h1 {
        font-size: 40px;
    }


    .showcase-text {
        margin:
            12px 0
            16px;
    }


    .network-map {
        margin-bottom: 14px;
    }


    .system-stats {
        margin-bottom: 14px;
    }


    .login-panel {
        padding-top: 21px;
        padding-bottom: 21px;
    }


    .panel-top {
        display: none;
    }


    .panel-logo {
        height: 50px;
    }


    .panel-logo img {
        max-height: 44px;
    }


    .panel-identity {
        margin-bottom: 7px;
    }


    .panel-heading {
        margin-bottom: 10px;
    }


    .sysmail-form .input-group {
        margin-bottom: 6px;
    }

}


/* ==========================================================
   VERY SHORT
========================================================== */

@media (max-height: 520px) {

    .secure-footer {
        display: none;
    }


    .secure-shell {
        grid-template-rows:
            54px
            minmax(0,1fr);
    }


    .panel-logo {
        height: 42px;
    }


    .panel-logo img {
        max-height: 37px;
    }


    .panel-heading p {
        display: none;
    }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

}