/* ═══════════════════════════════════════════════════════════════════════
   Devlyn Analytics — Global Styles
   Paleta: #169EAC (verde), #3D403E (gris), #C4EAF0 (celeste), #FFF
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
    background: #FFFFFF;
    color: #3D403E;
}

/* ── LOGIN PAGE ────────────────────────────────────────────────────── */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1.3;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0.05) 0%, transparent 70%),
        linear-gradient(160deg, #1ab5c4 0%, #169EAC 30%, #0e7680 70%, #0a5960 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}
/* Decorative geometric shapes */
.login-left::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 50%;
}
.login-left::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -60px;
    width: 400px;
    height: 400px;
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 50%;
}
.login-left img {
    max-width: 220px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}
.login-left p {
    font-size: 15px;
    opacity: 0.85;
    text-align: center;
    max-width: 320px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.login-right {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    background: #FFFFFF;
}
.login-form {
    width: 100%;
    max-width: 380px;
}
.login-auth-form {
    margin: 0;
}
.login-form h2 {
    font-size: 26px;
    font-weight: 700;
    color: #3D403E;
    margin: 0 0 8px;
}
.login-form .login-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0 0 32px;
}

.login-field {
    margin-bottom: 20px;
}
.login-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #3D403E;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.login-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    color: #3D403E;
    transition: border-color 0.2s;
    outline: none;
}
.login-field input:focus {
    border-color: #169EAC;
    box-shadow: 0 0 0 3px rgba(22, 158, 172, 0.12);
}

.login-btn {
    width: 100%;
    padding: 13px;
    background: #169EAC;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.login-btn:hover {
    background: #128a96;
}
.login-btn:active {
    background: #0e7680;
}
.login-btn:disabled,
.login-btn:disabled:hover,
.login-btn:disabled:active {
    background: #7fbfc6;
    cursor: not-allowed;
    opacity: 0.9;
}

.login-error {
    background: #fdecea;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    border-left: 3px solid #c0392b;
}
.login-error.visible {
    display: block;
}

/* Password field with toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}
/* dcc.Input creates a wrapper <div>; ensure it fills width */
.password-wrapper > div {
    width: 100%;
}
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100% !important;
    padding-right: 80px !important;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.password-toggle:hover {
    background: rgba(22, 158, 172, 0.12);
}
.password-toggle img {
    display: block;
}

/* Remember me */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}
.remember-me input[type="checkbox"] {
    accent-color: #169EAC;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ── DASHBOARD HEADER ──────────────────────────────────────────────── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 52px;
    background: #169EAC;
    color: #FFFFFF;
}
.app-header .header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.app-header .header-left img {
    height: 30px;
}
.app-header .header-left .header-app-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.9;
}
.app-header .header-left .header-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.35);
    margin: 0 4px;
}
.app-header .header-left .header-page-title {
    font-size: 14px;
    font-weight: 500;
}
.app-header .header-left .header-page-subtitle {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 8px;
    font-style: italic;
}
.app-header .header-right {
    display: flex;
    align-items: center;
    gap: 0;
}
.logout-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #FFFFFF;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.logout-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
}

/* ── FILTERS BAR ───────────────────────────────────────────────────── */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 24px;
    background: #FFFFFF;
    border-bottom: 1px solid #e0e0e0;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #3D403E;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── GRID CONTAINER ────────────────────────────────────────────────── */
.grid-container {
    padding: 0 24px 24px;
}

/* AG Grid header — default Alpine theme (sin color custom) */
.ag-theme-alpine .ag-header-cell-label,
.ag-header-cell-label,
.ag-theme-alpine .ag-header-group-cell-label,
.ag-header-group-cell-label {
    font-size: 11px !important;
    font-weight: 600 !important;
}

/* ── FOOTER ────────────────────────────────────────────────────────── */
.app-footer {
    padding: 14px 24px;
    text-align: center;
    font-size: 11px;
    color: #999;
    border-top: 1px solid #e8e8e8;
}

/* ── Responsive: mobile login ──────────────────────────────────────── */
@media (max-width: 768px) {
    .login-container { flex-direction: column; }
    .login-left { padding: 40px 24px; min-height: 200px; }
    .login-right { padding: 40px 24px; }
}
