/**
 * PhoneShop UI — tema gratuito moderno (Plus Jakarta Sans + variables CSS)
 * Compatible con theme-contrast.css y header.php existentes.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --ps-font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --ps-radius-lg: 16px;
    --ps-radius-xl: 22px;
    --ps-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --ps-shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --ps-shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
    --ps-gradient-brand: linear-gradient(135deg, #1e40af 0%, #0ea5e9 55%, #06b6d4 100%);
    --ps-gradient-sidebar: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

body {
    font-family: var(--ps-font) !important;
    -webkit-font-smoothing: antialiased;
}

/* ——— Sidebar ——— */
.sidebar {
    background: var(--ps-gradient-sidebar) !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, .15);
}
.sidebar-logo .logo-icon {
    background: var(--ps-gradient-brand) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .35);
}
.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, .06) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

/* ——— Topbar ——— */
.topbar {
    backdrop-filter: blur(10px);
    box-shadow: var(--ps-shadow-sm);
}

/* ——— Cards ——— */
.card,
.stat-card {
    border-radius: var(--ps-radius-lg) !important;
    box-shadow: var(--ps-shadow-md) !important;
    border-color: rgba(203, 213, 225, .7) !important;
    transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ps-shadow-lg) !important;
}
.stat-icon {
    border-radius: 14px !important;
}

/* ——— Buttons ——— */
.btn {
    font-family: var(--ps-font) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease !important;
}
.btn-primary {
    background: var(--ps-gradient-brand) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .28);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}

/* ——— Forms ——— */
.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
select,
textarea {
    border-radius: 10px !important;
    transition: border-color .15s, box-shadow .15s, background .15s !important;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

/* ——— Tables ——— */
table th {
    letter-spacing: .04em;
}
table tr {
    transition: background .12s ease;
}

/* ——— Badges ——— */
.badge {
    font-family: var(--ps-font);
}

/* ═══════════════════════════════════════
   LOGIN — pantalla dividida (marca | form)
   ═══════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    margin: 0;
    font-family: var(--ps-font);
    background: #f8fafc;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    color: #fff;
    background: var(--ps-gradient-brand);
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,.18) 0%, transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.12) 0%, transparent 40%);
    pointer-events: none;
}

.login-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-brand-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
}

.login-brand h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
}

.login-brand p {
    font-size: 1rem;
    opacity: .92;
    line-height: 1.55;
    margin-bottom: 32px;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .92rem;
    font-weight: 500;
    opacity: .95;
}

.login-features i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    background: #f8fafc;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: var(--ps-radius-xl);
    padding: 36px 32px;
    box-shadow: var(--ps-shadow-lg);
    border: 1px solid rgba(226, 232, 240, .9);
}

.login-box-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.login-box-sub {
    font-size: .875rem;
    color: #64748b;
    margin-bottom: 24px;
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo .icon {
    width: 56px;
    height: 56px;
    background: var(--ps-gradient-brand);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 12px;
    box-shadow: 0 6px 20px rgba(37, 99, 235, .3);
}

.login-logo h1 { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.login-logo p { color: #64748b; font-size: .8rem; margin-top: 4px; }

.login-page .form-group { margin-bottom: 16px; }
.login-page .form-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.login-page .input-wrap { position: relative; }
.login-page .input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}
.login-page .form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-family: var(--ps-font);
    font-size: .9rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-page .form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    background: #fff;
}
.login-page .btn-login {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    font-family: var(--ps-font);
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: var(--ps-gradient-brand);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .32);
    transition: transform .12s, box-shadow .12s, opacity .12s;
}
.login-page .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, .38);
}
.login-page .error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-page .ok-box {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-page .login-forgot {
    display: inline-block;
    margin-top: 8px;
    font-size: .82rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}
.login-page .login-forgot:hover { text-decoration: underline; }
.login-page .login-back {
    margin-top: 18px;
    text-align: center;
    font-size: .85rem;
}
.login-page .login-back a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.login-page .login-back a:hover { text-decoration: underline; }
.login-page .demo-info {
    margin-top: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 14px;
    font-size: .78rem;
    color: #1d4ed8;
    line-height: 1.5;
}
.login-page .demo-info strong { display: block; margin-bottom: 6px; }

/* Sin flechas ▲▼ en inputs number */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-brand {
        padding: 36px 28px;
        min-height: auto;
    }
    .login-brand-inner { max-width: none; }
    .login-features { display: none; }
    .login-panel { padding: 28px 20px 40px; }
}
