:root {
    --haidar-navy: #061525;
    --haidar-navy-2: #0A1E31;
    --haidar-surface: #0E263B;
    --haidar-surface-2: #12314B;

    --haidar-blue: #1686C9;
    --haidar-blue-bright: #2AA8F2;

    --haidar-teal: #16B8A6;
    --haidar-teal-bright: #38D6C4;

    --haidar-white: #F7FBFF;
    --haidar-text: #DCE8F3;
    --haidar-muted: #8FA8BD;

    --haidar-border: rgba(85, 153, 194, 0.22);

    --success: #39D98A;
    --warning: #F5C451;
    --danger: #FF6B78;

    --radius: 18px;
    --shadow: 0 20px 55px rgba(0,0,0,.30);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at 85% 0%,
            rgba(22,134,201,.17),
            transparent 30%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(22,184,166,.10),
            transparent 28%
        ),
        var(--haidar-navy);

    color: var(--haidar-text);
}

a {
    color: inherit;
    text-decoration: none;
}

.haidar-header {
    height: 76px;
    border-bottom: 1px solid var(--haidar-border);
    background: rgba(6, 21, 37, .88);
    backdrop-filter: blur(15px);

    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    width: min(1380px, calc(100% - 40px));
    height: 100%;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-symbol {
    width: 42px;
    height: 42px;
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--haidar-blue),
            var(--haidar-teal)
        );

    display: grid;
    place-items: center;

    font-size: 22px;
    font-weight: 900;

    color: white;

    box-shadow:
        0 8px 25px rgba(22,134,201,.25);
}

.brand-name {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .7px;
}

.brand-name span {
    color: var(--haidar-teal-bright);
}

.brand-product {
    color: var(--haidar-muted);
    font-size: 11px;
    margin-top: 2px;
    letter-spacing: .4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-meta {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
}

.user-role {
    font-size: 11px;
    color: var(--haidar-muted);
    margin-top: 3px;
}

.logout-link {
    border: 1px solid var(--haidar-border);
    padding: 9px 15px;
    border-radius: 10px;
    color: var(--haidar-muted);
    font-size: 13px;
    transition: .2s ease;
}

.logout-link:hover {
    color: white;
    border-color: var(--haidar-blue);
    background: rgba(22,134,201,.12);
}

.page {
    width: min(1380px, calc(100% - 40px));
    margin: auto;
    padding: 46px 0 70px;
}

.eyebrow {
    color: var(--haidar-teal-bright);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.hero-title {
    margin: 10px 0 8px;
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.05;
    color: var(--haidar-white);
}

.hero-text {
    max-width: 730px;
    color: var(--haidar-muted);
    line-height: 1.7;
    font-size: 16px;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    border: 1px solid rgba(57,217,138,.23);
    color: #87F5B5;
    background: rgba(57,217,138,.08);

    padding: 9px 14px;
    border-radius: 100px;

    font-size: 12px;
    font-weight: 700;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 100%;
    background: var(--success);

    box-shadow:
        0 0 12px rgba(57,217,138,.8);
}

.section-heading {
    margin: 42px 0 18px;
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 0;
    color: var(--haidar-white);
    font-size: 22px;
}

.section-heading p {
    margin: 4px 0 0;
    color: var(--haidar-muted);
    font-size: 13px;
}

.module-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}

.module-card {
    position: relative;
    overflow: hidden;

    min-height: 210px;

    background:
        linear-gradient(
            145deg,
            rgba(18,49,75,.94),
            rgba(9,29,47,.94)
        );

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

    padding: 25px;

    box-shadow: 0 12px 35px rgba(0,0,0,.16);

    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.module-card::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -55px;
    top: -55px;

    border-radius: 100%;

    background:
        radial-gradient(
            circle,
            rgba(42,168,242,.19),
            transparent 70%
        );
}

.module-card:hover {
    transform: translateY(-4px);
    border-color: rgba(42,168,242,.45);

    box-shadow:
        0 20px 50px rgba(0,0,0,.24);
}

.module-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;

    display: grid;
    place-items: center;

    margin-bottom: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(22,134,201,.22),
            rgba(22,184,166,.20)
        );

    color: var(--haidar-teal-bright);
    font-weight: 900;
}

.module-status {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--haidar-teal-bright);
    text-transform: uppercase;
}

.module-status.planned {
    color: var(--haidar-muted);
}

.module-card h3 {
    margin: 9px 0 9px;
    color: var(--haidar-white);
    font-size: 20px;
}

.module-card p {
    margin: 0;
    color: var(--haidar-muted);
    line-height: 1.6;
    font-size: 14px;
}

.haidar-footer {
    border-top: 1px solid var(--haidar-border);
    margin-top: 65px;
    padding: 24px 0;
    color: #607C92;
    font-size: 12px;

    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.login-page {
    min-height: 100vh;

    display: grid;
    grid-template-columns: 1.2fr .8fr;
}

.login-brand-panel {
    padding: 70px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(22,184,166,.18),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(22,134,201,.22),
            transparent 40%
        );
}

.login-brand-panel h1 {
    max-width: 700px;
    color: white;
    font-size: clamp(40px, 6vw, 70px);
    line-height: 1.03;
    margin: 0;
}

.gradient-text {
    background:
        linear-gradient(
            90deg,
            var(--haidar-blue-bright),
            var(--haidar-teal-bright)
        );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-content {
    padding: 45px;

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

    background: rgba(5,17,30,.78);
}

.login-card {
    width: 100%;
    max-width: 430px;

    background: rgba(14,38,59,.78);
    border: 1px solid var(--haidar-border);

    padding: 34px;
    border-radius: 22px;

    box-shadow: var(--shadow);
}

.login-card h2 {
    margin: 0 0 7px;
    color: white;
    font-size: 26px;
}

.login-subtitle {
    color: var(--haidar-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.field-label {
    display: block;
    color: #B9CCDA;
    font-size: 13px;
    margin-bottom: 8px;
}

.input-control {
    width: 100%;

    border:
        1px solid rgba(91,150,185,.30);

    background: #081B2C;

    color: white;

    border-radius: 11px;

    padding: 13px 14px;

    outline: none;

    font-size: 15px;

    margin-bottom: 19px;
}

.input-control:focus {
    border-color: var(--haidar-blue-bright);

    box-shadow:
        0 0 0 3px rgba(42,168,242,.09);
}

.login-options {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 2px 0 22px;

    color: var(--haidar-muted);
    font-size: 13px;
}

.primary-button {
    width: 100%;
    border: 0;

    padding: 13px 16px;

    border-radius: 11px;

    background:
        linear-gradient(
            90deg,
            var(--haidar-blue),
            var(--haidar-teal)
        );

    color: white;

    font-weight: 800;
    font-size: 14px;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(22,134,201,.22);
}

.primary-button:hover {
    filter: brightness(1.08);
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13px;
}

.alert-danger {
    color: #FFB5BE;
    background: rgba(255,107,120,.10);
    border: 1px solid rgba(255,107,120,.20);
}

.alert-info {
    color: #B7E2FF;
    background: rgba(42,168,242,.10);
    border: 1px solid rgba(42,168,242,.20);
}

@media(max-width: 850px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        padding: 35px;
        min-height: 300px;
    }

    .login-content {
        padding: 28px 20px 50px;
    }

    .user-meta {
        display: none;
    }

    .haidar-footer {
        flex-direction: column;
    }
}

/* ===== HAIDAR OFFICIAL BRAND ASSETS ===== */

.brand-mark-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
}

.brand-logo-img {
    max-width: 210px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.login-logo {
    max-width: 240px;
    margin-bottom: 25px;
}

.header-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

@media(max-width: 600px) {
    .brand-logo-img {
        max-width: 170px;
    }

    .brand-mark-img {
        width: 40px;
        height: 40px;
    }
}

/* ===== LOGIN BRAND LOCKUP ===== */

.login-brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-brand-mark {
    width: 74px;
    height: 74px;
    object-fit: contain;
    display: block;
}

.login-brand-name {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: .8px;
    color: #ffffff;
}

.login-brand-name span {
    color: var(--haidar-teal-bright);
}

@media(max-width: 600px) {
    .login-brand-mark {
        width: 58px;
        height: 58px;
    }

    .login-brand-name {
        font-size: 21px;
    }
}

/* ===== PLATFORM NAVIGATION ===== */

.platform-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 35px;
}

.platform-nav a {
    color: var(--haidar-muted);
    font-size: 13px;
    padding: 9px 12px;
    border-radius: 9px;
    transition: .2s ease;
}

.platform-nav a:hover {
    color: white;
    background: rgba(42,168,242,.10);
}

.header-left {
    display: flex;
    align-items: center;
}


/* ===== ADMIN CONSOLE ===== */

.admin-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.metric-card {
    background:
        linear-gradient(
            145deg,
            rgba(18,49,75,.94),
            rgba(9,29,47,.94)
        );

    border: 1px solid var(--haidar-border);
    border-radius: var(--radius);
    padding: 24px;
}

.metric-label {
    color: var(--haidar-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-value {
    color: white;
    font-weight: 800;
    font-size: 34px;
    margin-top: 10px;
}

.data-panel {
    margin-top: 30px;
    background: rgba(14,38,59,.72);
    border: 1px solid var(--haidar-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-panel-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--haidar-border);
}

.data-panel-header h3 {
    margin: 0;
    color: white;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(85,153,194,.10);
    font-size: 13px;
}

.data-table th {
    color: var(--haidar-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.data-table td {
    color: var(--haidar-text);
}

.status-active {
    color: var(--success);
    font-weight: 700;
}

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.admin-link {
    padding: 11px 16px;
    border-radius: 10px;
    background: rgba(22,134,201,.10);
    border: 1px solid var(--haidar-border);
    color: #BDE7FF;
}

.admin-link:hover {
    border-color: var(--haidar-blue);
}

@media(max-width: 1000px) {
    .platform-nav {
        display: none;
    }
}

/* ===== ADMINISTRATION FORMS ===== */

.form-panel {
    max-width: 760px;
    margin-top: 28px;

    background: rgba(14,38,59,.78);
    border: 1px solid var(--haidar-border);
    border-radius: var(--radius);

    padding: 28px;
}

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

.form-group {
    margin-bottom: 18px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-control {
    width: 100%;

    padding: 12px 14px;

    border-radius: 10px;

    border:
        1px solid rgba(91,150,185,.30);

    background: #081B2C;

    color: white;

    outline: none;
}

.form-control:focus {
    border-color: var(--haidar-blue-bright);

    box-shadow:
        0 0 0 3px rgba(42,168,242,.09);
}

.form-label {
    display: block;
    margin-bottom: 8px;

    font-size: 13px;
    color: #B9CCDA;
}

.form-error {
    color: #FF9EAA;
    font-size: 12px;
    margin-top: 6px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--haidar-border);
    border-radius: 10px;

    padding: 10px 15px;

    font-weight: 700;
    font-size: 13px;

    cursor: pointer;
}

.button-primary {
    color: white;

    border: 0;

    background:
        linear-gradient(
            90deg,
            var(--haidar-blue),
            var(--haidar-teal)
        );
}

.button-secondary {
    background: rgba(22,134,201,.10);
    color: #BDE7FF;
}

.button-danger {
    background: rgba(255,107,120,.10);
    color: #FFAFB8;
    border-color: rgba(255,107,120,.20);
}

.button-success {
    background: rgba(57,217,138,.10);
    color: #8DF2B6;
    border-color: rgba(57,217,138,.20);
}

.inline-form {
    display: inline;
}

.flash-wrap {
    width: min(1380px, calc(100% - 40px));
    margin: 18px auto 0;
}

@media(max-width: 700px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

}

/* ===== RECONX ===== */

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 8px 13px;
    border-radius: 100px;

    border:
        1px solid rgba(56,214,196,.24);

    background:
        rgba(22,184,166,.08);

    color: var(--haidar-teal-bright);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.rx-layout {
    display: grid;
    grid-template-columns:
        minmax(280px, .75fr)
        minmax(400px, 1.25fr);
    gap: 24px;
    margin-top: 30px;
}

.rx-form-card {
    background: rgba(14,38,59,.72);
    border: 1px solid var(--haidar-border);
    border-radius: var(--radius);
    padding: 26px;
}

.rx-form-card h3 {
    margin-top: 0;
    color: white;
}

.rx-stat-value {
    font-size: 32px;
    font-weight: 900;
    color: white;
}

.status-draft {
    color: var(--warning);
    font-weight: 700;
}

.status-ready {
    color: var(--success);
    font-weight: 700;
}

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