﻿
:root {
    --slate: #3f4d5e; /* dark button / headings */
    --slate-dark: #33404f;
    --gold: #d4a437; /* accents */
    --ink: #2d3748;
    --muted: #8a94a3;
    --line: #e6e9ee;
    --field: #f2f4f7;
}

* {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    min-height: 100%;
}

body {
    background: #ffffff;
    margin: 0;
    padding: 0;
    color: var(--ink);
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 90px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}
/*.auth-card {
    background: rgba(255,255,255,0.8) ;*/
/* background-color:lightgrey;
*/    /*border-radius: 31px ;
    box-shadow: 0 24px 60px rgba(7, 19,36, 0.42) ;
    padding: 50px;
    max-width: 570px ;
    padding: 32px;
    border: 7px solid rgba(60,76,99,0.92) ;
    width: min(570px, 100%) ;
    animation: fadeInUp 0.6s ease-out;
    
    backdrop-filter: blur(10px);
}*/

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- header ---------- */
.ministry-header {
    text-align: center;
    margin-bottom: 35px;
}

.ministry-emblem {
    width: 120px; /* was 84px — the circle */
    height: 120px;
    margin: -60px auto 16px; /* half the height, so it still overlaps the band */
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--gold);
    box-shadow: 0 8px 20px rgba(63,77,94,.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ministry-emblem i {
        font-size: 56px; /* the icon */
        color: var(--gold);
    }
.ministry-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate);
    letter-spacing: .5px;
    margin-bottom: 14px;
}

.ministry-title {
    font-size: 27px;
    font-weight: 800;
    color: var(--slate);
    margin: 0 0 8px;
    line-height: 1.3;
}

.ministry-subtitle {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

/* ---------- form ---------- */
.form-label {
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .form-label i {
        color: var(--gold);
        font-size: 17px;
    }

.req::after {
    content: " *";
    color: #c0392b;
    font-weight: 700;
}

.field-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--field);
    overflow: hidden;
    transition: all .25s ease;
}

    .field-group:focus-within {
        border-color: var(--slate);
        box-shadow: 0 0 0 4px rgba(63, 77, 94, .08);
        background: #fff;
    }

    .field-group .field-icon {
        width: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        border-left: 1px solid var(--line);
        background: #fff;
    }

    .field-group .form-control {
        border: none;
        background: transparent;
        box-shadow: none;
        padding: 14px 16px;
        font-size: 15px;
        letter-spacing: 1px;
    }

        .field-group .form-control:focus {
            box-shadow: none;
            background: transparent;
        }

        .field-group .form-control::placeholder {
            color: #b3bac4;
            letter-spacing: normal;
        }

.btn-auth {
    background: var(--slate);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    width: 100%;
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all .25s ease;
}

    .btn-auth i {
        color: var(--gold);
    }

    .btn-auth:hover:not(:disabled) {
        background: var(--slate-dark);
        color: #fff;
    }

    .btn-auth:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

.hint-line {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.7;
}

    .hint-line i {
        color: var(--gold);
        margin-top: 3px;
    }

/* ---------- status ---------- */
.status-alert {
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14.5px;
    margin-top: 20px;
    display: none;
    animation: slideDown .35s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-info {
    background: #eef1f5;
    color: var(--slate);
    border: 1px solid #dfe4ea;
}

.alert-success {
    background: #e8f5ec;
    color: #1e6b3a;
    border: 1px solid #cbe6d5;
}

.alert-warning {
    background: #fdf6e3;
    color: #8a6d1f;
    border: 1px solid #f2e3b8;
}

.alert-danger {
    background: #fdecea;
    color: #9b2c22;
    border: 1px solid #f5cdc8;
}

.spinner-border-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ---------- footer ---------- */
.site-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 12px 24px;
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- waiting overlay ---------- */
.countdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 55, 72, .62);
    backdrop-filter: blur(3px);
    z-index: 10000;
    justify-content: center;
  
    padding: 20px;
    
    overflow-y: hidden;
    align-items: center;

}

    .countdown-overlay.show {
        display: flex;
    }

body.modal-open {
    overflow: hidden;
}

.countdown-container {
    background: #fff;
    border-radius: 14px;
    border-top: 4px solid var(--gold);
    padding: 36px 34px 30px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    animation: fadeInUp .35s ease-out;
}

.countdown-icon {
    font-size: 40px;
    color: var(--gold);
    margin-bottom: 14px;
    animation: pulse 2s infinite;
}

.countdown-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--slate);
    margin-bottom: 8px;
}

.countdown-message {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.countdown-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
}

    .countdown-circle svg {
        transform: rotate(-90deg);
        width: 120px;
        height: 120px;
    }

    .countdown-circle .bg-circle {
        fill: none;
        stroke: var(--line);
        stroke-width: 8;
    }

    .countdown-circle .progress-circle {
        fill: none;
        stroke: var(--gold);
        stroke-width: 8;
        stroke-linecap: round;
        stroke-dashoffset: 0;
        transition: stroke-dashoffset 1s linear;
    }

.countdown-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 27px;
    font-weight: 800;
    color: var(--slate);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: .85;
    }
}
.status-message {
    font-size: 13.5px;
    color: var(--muted);
    min-height: 20px;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 30px 22px;
    }

    .ministry-title {
        font-size: 22px;
    }

    .site-footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}


/* ---------- embed mode (inside the ministry iframe) ---------- */
body.fc-embed {
    background: transparent;
}

    body.fc-embed .auth-container {
        min-height: 0;
        align-items: flex-start;
        padding: 40px 12px 20px;
    }

    body.fc-embed .auth-card {
        box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
        border: 1px solid var(--line);
        animation: none;
    }

    body.fc-embed .site-footer {
        display: none;
    }