/* ============================================================
   MedixHub – Global Stylesheet  (Phase 1)
   Color palette sourced from brand identity
   ============================================================ */

/* --- Variables --- */
:root {
    --bg-dark:        #0a1128;
    --bg-mid:         #0d1a38;
    --bg-card:        #101f42;
    --text-main:      #ffffff;
    --text-muted:     #8fa0dd;
    --text-dark:      #1a3068;
    --primary:        #00f2fe;
    --primary-alt:    #4facfe;
    --deep-blue:      #0544f2;
    --gradient-h:     linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --gradient-v:     linear-gradient(180deg, #00f2fe 0%, #0544f2 100%);
    --glow:           rgba(0, 242, 254, 0.15);
    --card-white:     #ffffff;
    --card-shadow:    0 8px 32px rgba(5, 20, 60, 0.22);
    --card-hover-shadow: 0 16px 48px rgba(0, 242, 254, 0.18);
    --border-faint:   rgba(255, 255, 255, 0.06);
    --radius-card:    20px;
    --radius-btn:     50px;
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* --- Layout helpers --- */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
    width: 100%;
    padding: 14px 0;
    position: fixed;
    top: 0;
    z-index: 900;
    background: rgba(10, 17, 40, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-faint);
}

.site-header .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wrap { display: flex; align-items: center; }
.logo-wrap svg { height: 52px; width: auto; display: block; }

/* ============================================================
   PORTAL SELECTION PAGE  (index.php / page-1)
   ============================================================ */
.portal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
    background:
        radial-gradient(ellipse 700px 500px at 50% 30%, rgba(0, 180, 254, 0.09) 0%, transparent 70%),
        var(--bg-dark);
}

.portal-tagline {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
    opacity: 0.85;
}

.portal-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 48px;
    text-align: center;
}

/* Two portal cards */
.portal-cards {
    display: flex;
    gap: 32px;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.portal-card {
    background: var(--card-white);
    border-radius: var(--radius-card);
    padding: 44px 40px 36px;
    width: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    border: 2px solid transparent;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-h);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: inherit;
    z-index: 0;
}

.portal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary);
}

.portal-card:hover::before { opacity: 0.06; }

.portal-card .card-label {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.35;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.portal-card .card-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.portal-card .card-icon svg {
    width: 72px;
    height: 72px;
}

/* Support button */
.btn-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: var(--radius-btn);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-support:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--glow);
    color: var(--primary);
}

/* ============================================================
   LOGIN PAGE  (login.php)
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
    background:
        radial-gradient(ellipse 600px 400px at 50% 20%, rgba(0, 180, 254, 0.08) 0%, transparent 70%),
        var(--bg-dark);
}

.login-card {
    background: var(--card-white);
    border-radius: var(--radius-card);
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--card-shadow);
}

.login-card .login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .login-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: linear-gradient(135deg, rgba(0,242,254,0.12) 0%, rgba(79,172,254,0.12) 100%);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--deep-blue);
    margin-bottom: 14px;
}

.login-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.login-card .login-sub {
    font-size: 13px;
    color: #6b82b0;
}

/* Form elements */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #4a6080;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #f4f7fc;
    border: 1.5px solid #dce6f5;
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
    background: #fff;
}

.form-group input::placeholder { color: #b0c0d8; }

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
    opacity: 0.92;
    box-shadow: 0 6px 20px rgba(0, 91, 234, 0.35);
}

.login-footer-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #7890b2;
}

.login-footer-links a {
    color: var(--deep-blue);
    font-weight: 600;
    text-decoration: underline;
}

.alert {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.alert-error {
    background: rgba(220, 50, 50, 0.08);
    border: 1px solid rgba(220, 50, 50, 0.3);
    color: #c0392b;
}

.alert-success {
    background: rgba(0, 200, 100, 0.08);
    border: 1px solid rgba(0, 200, 100, 0.3);
    color: #1a8a50;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    transition: color 0.2s;
}

.back-link:hover { color: var(--primary); }

/* ============================================================
   DASHBOARD STUB
   ============================================================ */
.dashboard-page { padding-top: 90px; min-height: 100vh; }
.dashboard-page .page-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}
.dashboard-page .page-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 40px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-faint);
    text-align: center;
    font-size: 13px;
    color: #536493;
    background: rgba(5, 10, 25, 0.5);
    margin-top: auto;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.divider {
    height: 1px;
    background: var(--border-faint);
    margin: 24px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .logo-wrap svg { height: 36px; }
    .portal-cards { gap: 20px; }
    .portal-card  { width: 160px; padding: 32px 22px 28px; }
    .portal-card .card-label { font-size: 14px; }
    .portal-card .card-icon  { width: 60px; height: 60px; }
    .portal-card .card-icon svg { width: 54px; height: 54px; }
    .login-card { padding: 36px 24px; }
    .portal-heading { font-size: 22px; }
}
