/* ============================================
   ORKANA - Login Page Styles
   Mobile-first design
   ============================================ */

:root {
    --bg-dark: #1C2118;
    --bg-dark-rgb: 28, 33, 24;
    --bg-card: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-dark: #1C2118;
    --accent-green: #A8C636;
    --accent-green-rgb: 168, 198, 54;
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/fondo.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Login Container ---------- */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 24px;
}

/* ---------- Logo ---------- */
.login-logo {
    margin-bottom: 16px;
}

.login-logo img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* ---------- Title ---------- */
.login-title {
    font-size: 2.4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-green);
    letter-spacing: 0.04em;
    margin-bottom: 40px;
    min-height: 1.2em;
}

/* ---------- Form ---------- */
.login-form {
    width: 100%;
    max-width: 380px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--accent-green);
    background: rgba(255, 255, 255, 0.12);
}

/* Date input styling */
.form-input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* ---------- Error ---------- */
.form-error {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 8px;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.form-error.visible {
    min-height: 1.4em;
    max-height: 60px;
    opacity: 1;
    margin-bottom: 16px;
}

/* ---------- Button ---------- */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--accent-green);
    border: none;
    border-radius: 50px;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-login:active {
    transform: scale(0.97);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.btn-login.loading .btn-text {
    visibility: hidden;
}

.btn-login.loading .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
}

/* ---------- Admin Link ---------- */
.admin-link {
    display: inline-block;
    margin-top: 32px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.admin-link:hover,
.admin-link:active {
    color: var(--text-primary);
}

/* ---------- Responsive ---------- */
@media screen and (min-width: 414px) {
    .login-title {
        font-size: 2.8rem;
    }

    .login-logo img {
        width: 120px;
        height: 120px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
