/* ═══════════════════════════════════════════════════
   LOGIN PAGE CSS — mainindex.css
   Design: Full-page chalkboard + glossy glass login card
   Include: <link href="css/mainindex.css" rel="stylesheet">
═══════════════════════════════════════════════════ */

:root {
    --chalk-dark:    #013b37;
    --chalk-mid:     #03574d;
    --chalk-bright:  #0c725f;
    --chalk-deep:    #022e2b;

    --orange:        #E8650A;
    --orange-lt:     #F07830;

    /* Glass card surfaces */
    --card-bg:       rgba(255, 255, 255, 0.18);
    --card-glass:    rgba(255, 255, 255, 0.12);
    --input-bg:      rgba(255, 255, 255, 0.55);
    --input-border:  rgba(255, 255, 255, 0.35);
    --input-focus:   #03574d;

    /* Text — high contrast so it's sharp over glass */
    --text-dark:     #ffffff;
    --text-mid:      rgba(255, 255, 255, 0.88);
    --text-label:    rgba(255, 255, 255, 0.95);
    --text-light:    rgba(255, 255, 255, 0.60);
    --text-input:    #0d2420;       /* dark text inside white input boxes */
    --text-placeholder: rgba(30, 60, 55, 0.55);

    --tab-active-bg: rgba(3, 87, 77, 0.85);
    --tab-hover-bg:  rgba(255, 255, 255, 0.20);
}

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

html, body {
    height: 100%;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    overflow: hidden;
    background-image: url('../images/pdea1img.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--chalk-deep);
}

/* ── Page Layout ── */
.erp-page {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
}

/* Subtle darkening overlay across full page */
.erp-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(160deg,
        rgba(1, 42, 38, 0.32) 0%,
        rgba(2, 55, 48, 0.14) 50%,
        rgba(1, 38, 34, 0.28) 100%);
    pointer-events: none;
}

/* ── Main Area ── */
.erp-main {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    background: transparent;
}

.bg-overlay { display: none; }

/* ══════════════════════════════════════════
   GLOSSY GLASS LOGIN CARD
══════════════════════════════════════════ */
.login-card {
    position: relative;
    z-index: 10;
    /* Frosted glass base */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(18px) saturate(1.6) brightness(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.6) brightness(1.08);
    border-radius: 20px;
    width: 420px;
    max-width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Gloss border — bright top edge, fade to subtle bottom */
    border: 1px solid rgba(255, 255, 255, 0.40);
    box-shadow:
        0 2px 0 0 rgba(255, 255, 255, 0.55) inset,   /* top gloss line */
        0 -1px 0 0 rgba(255, 255, 255, 0.10) inset,  /* bottom inner */
        1px 0 0 0 rgba(255, 255, 255, 0.20) inset,   /* left gloss */
        0 28px 60px rgba(1, 42, 38, 0.55),
        0 6px 20px rgba(1, 42, 38, 0.35);
    animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Gloss sheen — top highlight sweep */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    border-radius: 20px 20px 60% 60% / 20px 20px 30px 30px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.00) 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card::-webkit-scrollbar { width: 4px; }
.login-card::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
}

.card-inner {
    padding: 28px 32px 24px;
    position: relative;
    z-index: 1;   /* above the ::before gloss layer */
}

/* ── Card Header ── */
.card-hd { text-align: center; margin-bottom: 22px; }

.card-welcome {
    font-size: 14px;
    color: var(--text-mid);
    font-weight: 500;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.30);
}

.card-hd h3 {
    font-family: 'Merriweather', serif;
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(1, 42, 38, 0.55);
}

.card-underline {
    width: 60px;
    height: 3px;
    background: var(--orange);
    border-radius: 2px;
    margin: 0 auto;
    box-shadow: 0 0 8px rgba(232, 101, 10, 0.60);
}

/* ── Alerts ── */
.erp-alert {
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    margin-bottom: 14px;
    line-height: 1.4;
    animation: fadeDn 0.3s ease both;
}
@keyframes fadeDn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.erp-alert-danger  { background: rgba(255,241,240,0.85); color: #7B1C1C; border: 1px solid rgba(252,165,165,0.70); }
.erp-alert-success { background: rgba(240,253,244,0.85); color: #145214; border: 1px solid rgba(134,239,172,0.70); }
.erp-alert-warning { background: rgba(255,251,235,0.85); color: #6B3500; border: 1px solid rgba(252,211,77,0.70); }

/* ── Role Tabs ── */
.role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.role-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
}
/* mini gloss on tabs */
.role-tab::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}

.role-tab:hover {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(1, 42, 38, 0.30);
}

.tab-check {
    display: none;
    position: absolute;
    top: 6px; right: 8px;
    font-size: 11px; color: #fff;
    width: 18px; height: 18px;
    background: var(--orange);
    border-radius: 50%;
    align-items: center; justify-content: center;
    font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 8px rgba(232,101,10,0.60);
}
.role-tab.active .tab-check { display: flex; }

.r-ico {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.22s;
}
.r-ico svg {
    width: 20px; height: 20px;
    stroke: rgba(255,255,255,0.80);
    fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    transition: stroke 0.22s;
}

.role-tab span {
    font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,0.90);
    text-align: center; line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
    transition: color 0.22s;
}

.role-tab.active {
    background: var(--tab-active-bg);
    border-color: rgba(255,255,255,0.45);
    box-shadow: 0 4px 20px rgba(3, 87, 77, 0.55),
                0 1px 0 rgba(255,255,255,0.40) inset;
    transform: translateY(-2px);
}
.role-tab.active .r-ico { background: rgba(255,255,255,0.22); }
.role-tab.active .r-ico svg { stroke: #ffffff; }
.role-tab.active > span { color: #ffffff; }

/* ── Form Panels ── */
.form-panel { display: none; }
.form-panel.active { display: block; animation: panIn 0.22s ease both; }
@keyframes panIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Section Label ── */
.sec-lbl { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-line { flex: 1; height: 1.5px; background: rgba(232,101,10,0.70); border-radius: 1px; }
.sec-txt {
    font-size: 11px; font-weight: 800;
    letter-spacing: 2px; text-transform: uppercase;
    color: #ffb380;            /* warm orange-cream — pops on glass */
    text-shadow: 0 0 10px rgba(232,101,10,0.50);
    white-space: nowrap;
}

/* ── Form Fields ── */
.fg { margin-bottom: 12px; }
.fg label {
    display: block; font-size: 11px; font-weight: 800;
    letter-spacing: 0.9px; text-transform: uppercase;
    color: var(--text-label);
    text-shadow: 0 1px 4px rgba(0,0,0,0.40);
    margin-bottom: 5px;
}

.fw { position: relative; }
.fw .fi {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px;
    stroke: rgba(3,87,77,0.65); fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none; transition: stroke 0.2s; z-index: 2;
}
.fw input, .fw select {
    width: 100%; padding: 10px 12px 10px 38px;
    /* Inputs stay mostly opaque white for max readability */
    background: rgba(255, 255, 255, 0.82);
    border: 1.5px solid rgba(255, 255, 255, 0.60);
    border-radius: 8px;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 14px; font-weight: 500;
    color: var(--text-input);
    outline: none; transition: all 0.2s; appearance: none;
    box-shadow: 0 2px 8px rgba(1,42,38,0.12),
                0 1px 0 rgba(255,255,255,0.90) inset;
}
.fw input:focus, .fw select:focus {
    background: rgba(255,255,255,0.94);
    border-color: var(--chalk-mid);
    box-shadow: 0 0 0 3px rgba(3, 87, 77, 0.22),
                0 1px 0 rgba(255,255,255,0.90) inset;
}
.fw input:focus ~ .fi { stroke: var(--chalk-mid); }
.fw input::placeholder { color: var(--text-placeholder); font-size: 13px; }
.fw select option { background: #fff; color: #0d2420; }

.sel-wr::after {
    content: '▾'; position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%); color: rgba(3,87,77,0.65);
    font-size: 12px; pointer-events: none; z-index: 2;
}

/* ── Password Toggle ── */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px !important; }
.pw-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 0;
    display: flex; align-items: center; z-index: 3; opacity: 0.55; transition: opacity 0.2s;
}
.pw-toggle:hover { opacity: 0.90; }
.pw-toggle svg {
    width: 17px; height: 17px; stroke: var(--chalk-mid);
    fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Captcha ── */
.cap-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.cap-box {
    flex: 0 0 110px; padding: 9px 10px;
    background: rgba(3, 87, 77, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: 8px;
    text-align: center; font-family: 'Courier New', monospace;
    font-size: 17px; font-weight: 900; color: #ffffff; letter-spacing: 4px;
    cursor: pointer; user-select: none;
    box-shadow: 0 3px 12px rgba(3, 87, 77, 0.45),
                0 1px 0 rgba(255,255,255,0.30) inset;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cap-box:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 18px rgba(3, 87, 77, 0.55),
                0 1px 0 rgba(255,255,255,0.30) inset;
}
.cap-refresh { font-size: 14px; color: rgba(255,255,255,0.75); letter-spacing: 0; flex-shrink: 0; }
.cap-in-wrap { position: relative; flex: 1; min-width: 0; }
.cap-in-wrap .cap-in { width: 100% !important; }
.cap-in {
    flex: 1; padding: 10px 12px !important;
    background: rgba(255,255,255,0.82) !important;
    border: 1.5px solid rgba(255,255,255,0.60) !important;
    border-radius: 8px !important;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif !important;
    font-size: 14px !important; font-weight: 500 !important;
    color: var(--text-input) !important;
    outline: none !important; transition: all 0.2s !important;
    box-shadow: 0 2px 8px rgba(1,42,38,0.10) !important;
}
.cap-in::placeholder { color: var(--text-placeholder) !important; }
.cap-in:focus {
    background: rgba(255,255,255,0.94) !important;
    border-color: var(--chalk-mid) !important;
    box-shadow: 0 0 0 3px rgba(3,87,77,0.22) !important;
}
.cap-in.cap-error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.22) !important;
    animation: capShake 0.35s ease both;
}
@keyframes capShake {
    0%,100% { transform: translateX(0); }
    20%,60%  { transform: translateX(-6px); }
    40%,80%  { transform: translateX(6px); }
}
.cap-error-msg {
    display: none; font-size: 11.5px; color: #ffcccc; font-weight: 700;
    margin-top: 5px; padding: 4px 8px;
    background: rgba(180,30,30,0.35);
    border: 1px solid rgba(252,165,165,0.45);
    border-radius: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.40);
}
.cap-error-msg.show { display: block; }

/* ── Submit Button — gloss pill ── */
.btn-sub {
    width: 100%; padding: 13px 20px; margin-top: 8px;
    background: linear-gradient(180deg,
        rgba(7, 110, 96, 0.95) 0%,
        rgba(3, 75, 66, 0.98) 100%);
    color: #fff; border: none; border-radius: 10px;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 13.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.22s;
    border-top: 1px solid rgba(255,255,255,0.35);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.30) inset,
        0 6px 20px rgba(3, 87, 77, 0.50);
    text-shadow: 0 1px 4px rgba(0,0,0,0.30);
}
.btn-sub svg {
    width: 16px; height: 16px; stroke: #ffffff; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.22s;
}
.btn-sub:hover {
    background: linear-gradient(180deg,
        rgba(10, 130, 112, 0.98) 0%,
        rgba(3, 87, 77, 1.00) 100%);
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.30) inset,
                0 10px 28px rgba(3, 87, 77, 0.60);
}
.btn-sub:hover svg { transform: translateX(3px); }
.btn-sub:active { transform: scale(0.99); }

/* ── Footer Links ── */
.fl { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.fl a {
    font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,0.90);
    text-decoration: none; display: flex; align-items: center; gap: 4px;
    transition: color 0.2s;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.fl a:hover { color: #ffb380; }
.fl-back { color: rgba(255,255,255,0.60) !important; font-weight: 500 !important; }
.fl-back:hover { color: rgba(255,255,255,0.90) !important; }
.secure-badge { font-size: 11.5px; color: rgba(255,255,255,0.60); text-shadow: 0 1px 3px rgba(0,0,0,0.30); }

/* ── Register Link ── */
.register-link { text-align: center; margin-top: 10px; }
.register-link a {
    font-size: 12.5px; color: rgba(255,255,255,0.80);
    text-decoration: none; transition: color 0.2s;
    text-shadow: 0 1px 4px rgba(0,0,0,0.30);
}
.register-link a:hover { color: #ffb380; }
.register-link strong { color: #ffffff; font-weight: 800; }

/* ── Card Footer ── */
.card-ft {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.ft-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); display: inline-block; box-shadow: 0 0 6px rgba(232,101,10,0.60); }
.card-ft span {
    font-size: 10.5px; color: rgba(255,255,255,0.75);
    letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    html, body { overflow: auto; }
    .erp-page  { flex-direction: column; height: auto; min-height: 100vh; }
    .erp-main  { width: 100%; min-height: 100vh; padding: 70px 16px 24px; }
    .login-card { width: 100%; max-width: 460px; max-height: none; }
    .card-inner { padding: 22px 20px 18px; }
}
@media (max-width: 480px) {
    .card-inner { padding: 18px 15px 15px; }
    .card-hd h3 { font-size: 19px; }
    .role-tab   { padding: 10px 4px; }
    .r-ico      { width: 36px; height: 36px; }
    .role-tab span { font-size: 11px; }
}