/* Ported verbatim from the production /portal gateway, plus module-page additions. */
:root {
    --brand-navy: #0f1e32;
    --brand-teal: #21377c;
    --bg-light: #f4f7f9;
    --text-main: #212529;
}

body {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8fbff 100%);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.gateway-header {
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--brand-teal);
}

.main-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    width: 100%;
}

@media (max-width: 992px) {
    .module-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .module-grid { grid-template-columns: 1fr; }
    .gateway-header { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
}

.module-card {
    background: white;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eaeaea;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* ACTIVE MODULE STYLING */
.module-card.active-module { cursor: pointer; color: var(--text-main); }
.module-card.active-module:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(2, 119, 189, 0.15);
    border-color: var(--brand-teal);
}
.module-card.active-module .icon-wrapper {
    background: rgba(2, 119, 189, 0.1);
    color: var(--brand-teal);
}

/* LOCKED MODULE STYLING */
.module-card.locked-module {
    background: #f8f9fa;
    opacity: 0.65;
    cursor: not-allowed;
    filter: grayscale(100%);
}
.module-card.locked-module .icon-wrapper { background: #e9ecef; color: #6c757d; }

.lock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #dc3545;
    font-size: 1.2rem;
}

.icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.module-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin-bottom: 10px;
}

.module-desc { font-size: 0.85rem; color: #6c757d; line-height: 1.4; }

/* ---- Module pages (new; no production counterpart seen) ---- */
.module-body { flex-grow: 1; padding: 32px 40px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid #eaeaea;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(2, 119, 189, 0.1);
    color: var(--brand-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--brand-navy); line-height: 1.1; }
.stat-label { font-size: 0.8rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; }

.data-panel {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eaeaea;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.data-panel-head {
    padding: 16px 22px;
    border-bottom: 1px solid #eef2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-panel-head h5 { margin: 0; color: var(--brand-navy); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.table thead th {
    background: var(--bg-light);
    color: var(--brand-navy);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.table tbody td { font-size: .88rem; vertical-align: middle; }
.empty-state { padding: 48px 20px; text-align: center; color: #6c757d; }

/* ---- Login ---- */
.login-wrap { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid #eaeaea;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand i { font-size: 2.6rem; color: var(--brand-teal); }
.login-brand h4 { color: var(--brand-navy); font-weight: 700; margin-top: 12px; }
