:root {
    --primary-color: #c62828; /* BNI Red */
    --primary-hover: #b71c1c;
    --bg-gradient-start: #fdfbfb;
    --bg-gradient-end: #ebedee;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-color: #333;
    --text-muted: #666;
    --radius: 16px;
    --transition: 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}

.login-page, .form-page {
    padding: 20px;
}

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    transition: transform var(--transition);
}

.glass-container:hover {
    transform: translateY(-2px);
}

/* Typography */
h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

h3, h4 {
    margin: 10px 0;
    font-weight: 500;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Logo */
.logo-container {
    margin-bottom: 20px;
}
.logo {
    max-width: 250px;
    width: 80%;
    height: auto;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

/* File Input Styling */
input[type="file"] {
    padding: 10px;
    background: white;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.2);
}

.btn-secondary {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-text {
    display: block;
    margin-top: 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.btn-text:hover {
    color: var(--primary-color);
}

/* Alerts */
.alert-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid #c62828;
}

/* Utility */
.small-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.footer-links {
    margin-top: 30px;
}

/* Checkbox/Radio wrapper */
.radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

/* Factura Box */
#datos_factura {
    background: rgba(255,255,255,0.5);
    border: 1px dashed rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}
#datos_factura p {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .glass-container {
        padding: 25px;
        width: 95%;
    }
    input, select, button {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
