/* ==========================================================================
   GLOBAL STYLES & THEME TOKENS
   ========================================================================== */
:root {
    --bg-primary: #0a0718;
    --bg-secondary: #0f0c1b;
    --card-bg: rgba(25, 18, 52, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-purple: #a855f7;
    --accent-indigo: #6366f1;
    --accent-blue: #3b82f6;
    --error-red: #ef4444;
    --success-green: #10b981;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 0%, #150f38 0%, var(--bg-primary) 70%);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   DYNAMIC BACKGROUND GLOWS
   ========================================================================== */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
    animation: pulse GlowAnimation 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 80%);
    top: -100px;
    left: -100px;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 80%);
    bottom: -150px;
    right: -150px;
    animation-delay: -4s;
}

.bg-glow-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 80%);
    top: 30%;
    right: 15%;
    opacity: 0.25;
    animation-delay: -8s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { transform: scale(1.1) translate(30px, -20px); opacity: 0.45; }
    100% { transform: scale(0.9) translate(-10px, 30px); opacity: 0.35; }
}

/* ==========================================================================
   CONTAINER & GLASS CARD
   ========================================================================== */
.container {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    z-index: 10;
    position: relative;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

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

.logo-area {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.shield-icon {
    width: 32px;
    height: 32px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(120deg, #ffffff, #d8b4fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   INPUT STYLING & FLOATING LABELS
   ========================================================================== */
.input-group {
    position: relative;
    margin-bottom: 26px;
}

.input-group input {
    width: 100%;
    padding: 16px 4px 8px 4px;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.input-group label {
    position: absolute;
    left: 4px;
    top: 14px;
    font-size: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition-smooth);
}

/* Float Label Animation */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 12px;
    color: var(--accent-purple);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-purple));
    transition: var(--transition-smooth);
}

.input-group input:focus ~ .input-focus-line {
    width: 100%;
    left: 0;
}

.input-group input:focus {
    border-bottom-color: transparent;
}

/* Custom styling for calendar/date picker input */
input[type="date"] {
    position: relative;
}

/* Make placeholder text (dd/mm/yyyy) transparent unless focused or populated */
input[type="date"]:not(:focus):placeholder-shown {
    color: transparent;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(50%) saturate(1000%) hue-rotate(240deg);
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert-box {
    display: flex;
    align-items: center;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.alert-icon-container {
    color: var(--error-red);
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.alert-svg {
    width: 20px;
    height: 20px;
}

.alert-text {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-size: 13px;
    font-weight: 700;
    color: #fca5a5;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.alert-desc {
    font-size: 12px;
    color: #fecaca;
    line-height: 1.4;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SUBMIT BUTTON & LOADERS
   ========================================================================== */
.submit-btn {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-purple) 100%);
    color: white;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25);
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hide {
    display: none !important;
}

/* ==========================================================================
   MODAL DIALOG (SUCCESS SCREEN)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 6, 18, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-card {
    background: rgba(30, 24, 62, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    width: 90%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(168, 85, 247, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    animation: modalPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Avatar Photo Container */
.avatar-wrapper {
    position: relative;
    width: 156px;
    height: 156px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3.5px solid transparent;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
    animation: spinSlow 15s linear infinite;
}

@keyframes spinSlow {
    to { transform: rotate(360deg); }
}

.avatar-wrapper img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Badge Container */
.badge-container {
    margin-bottom: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    color: var(--success-green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-check-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

/* User Text Style */
.modal-user-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: white;
    margin-bottom: 6px;
}

.modal-user-status {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Close Button */
.modal-close-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.modal-close-btn:active {
    transform: scale(0.99);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }
    
    .card-header h2 {
        font-size: 22px;
    }
}
