/* ==========================================================================
   Conmat5 Dashboard — Modern SaaS Glassmorphic Login Stylesheet
   ========================================================================== */

:root {
    --bg-dark: #001529;
    --bg-card: rgba(15, 23, 42, 0.75);
    --border-card: rgba(255, 255, 255, 0.12);
    --color-primary: #127C6E;
    --color-primary-hover: #179383;
    --color-text-main: #ffffff;
    --color-text-muted: #94a3b8;
    --color-error: #FD6B3A;
    --font-primary: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--color-text-main);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.login-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 20%, #002244 0%, #001529 70%, #000c18 100%);
}

/* Ambient Radial Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    opacity: 0.35;
    z-index: 1;
}

.glow-1 {
    width: 450px;
    height: 450px;
    background: #127C6E;
    top: 10%;
    left: 15%;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: #F39F26;
    bottom: 10%;
    right: 15%;
}

/* Login Glassmorphic Card */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #127C6E 0%, #F39F26 50%, #FD6B3A 100%);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(18, 124, 110, 0.35);
    margin-bottom: 16px;
}

.brand-icon {
    font-size: 26px;
    color: #ffffff;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 6px;
}

.brand-subtitle {
    font-size: 13.5px;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Alert Box */
.login-alert {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 20px;
    animation: alertSlideDown 0.25s ease-out;
}

.login-alert.show {
    display: flex;
}

@keyframes alertSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-alert .alert-icon {
    font-size: 16px;
    color: #ef4444;
    flex-shrink: 0;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 15px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s;
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.2);
}

.form-input:focus + .input-icon,
.input-group:focus-within .input-icon {
    color: var(--color-primary);
}

.btn-toggle-pw {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-toggle-pw:hover {
    color: #cbd5e1;
}

/* Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -2px;
}

.remember-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox input {
    display: none;
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(148, 163, 184, 0.4);
    border-radius: 4px;
    background: rgba(30, 41, 59, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remember-checkbox input:checked + .custom-checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.remember-checkbox input:checked + .custom-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #ffffff;
    font-size: 10px;
}

.checkbox-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Submit Button */
.btn-submit {
    margin-top: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0e5e54 0%, #127C6E 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(18, 124, 110, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #127C6E 0%, #179383 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(18, 124, 110, 0.45);
}

.btn-submit:active {
    transform: scale(0.96);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
}

.btn-submit.is-loading .btn-text,
.btn-submit.is-loading .btn-arrow {
    display: none;
}

.btn-submit.is-loading .btn-spinner {
    display: inline-block;
    font-size: 16px;
}

/* Footer */
.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 11.5px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 22px 24px;
        border-radius: 16px;
    }
}
