/* MiEstacionamiento Admin Panel - Custom Styles */

:root {
    --color-primary: #001B28;
    --color-primary-soft: #06293C;
    --color-accent: #1EB15C;
    --color-accent-dark: #0C7E3F;
    --color-bg-light: #F4F6F8;
    --color-border: #D0D7DE;
    --color-text-main: #111827;
    --color-text-muted: #6B7280;
    --sidebar-bg-start: #023154;
    --sidebar-bg-mid: #001B28;
    --sidebar-bg-end: #000910;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
}

/* Auth / login background */
.auth-wrapper {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #023154 0, #001B28 40%, #000B12 100%);
}

.card-auth {
    border-radius: 18px;
    border: none;
    box-shadow: 0 16px 45px rgba(0,0,0,0.35);
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    backdrop-filter: blur(14px);
}

.logo-badge {
    width: 64px;
    height: 64px;
    border-radius: 24px;
    background: radial-gradient(circle at 30% 20%, #3AE68B 0, #1EB15C 40%, #0C7E3F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 32px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.brand-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Buttons */
.btn-green {
    background: linear-gradient(135deg, #1EB15C, #19a050);
    color: #ffffff;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    padding-inline: 1.75rem;
    box-shadow: 0 8px 16px rgba(30,177,92,0.35);
}

.btn-green:hover {
    background: linear-gradient(135deg, #19a050, #0C7E3F);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(12,126,63,0.45);
}

.btn-outline-green {
    border-radius: 999px;
    border-color: var(--color-accent);
    color: var(--color-accent);
    font-weight: 500;
}

.btn-outline-green:hover {
    background-color: rgba(30, 177, 92, 0.06);
    color: var(--color-accent-dark);
}

/* Inputs */
.form-control,
.form-select {
    border-radius: 12px;
    border-color: var(--color-border);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 .2rem rgba(30,177,92,0.25);
}

/* Layout */
.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    min-width: 260px;
    max-width: 260px;
    background: radial-gradient(circle at 0 0, var(--sidebar-bg-start) 0, var(--sidebar-bg-mid) 45%, var(--sidebar-bg-end) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.25rem;
}

.sidebar-logo-pin {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 15%, #3AE68B 0, #1EB15C 40%, #0C7E3F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    opacity: 0.65;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}

.sidebar-nav {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.75rem;
}

.sidebar-nav-item {
    margin-bottom: 0.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: all .18s ease-out;
}

.sidebar-link span.icon {
    width: 20px;
    display: inline-flex;
    justify-content: center;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: rgba(30,177,92,0.16);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(30,177,92,0.6);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Main content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-header {
    height: 64px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    box-shadow: 0 6px 16px rgba(15,23,42,0.05);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.app-header-subtitle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User pill */
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background-color: var(--color-bg-light);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1EB15C, #0C7E3F);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Content area */
.app-content {
    padding: 1.5rem 1.75rem 2rem;
}

/* Dashboard cards */
.card-kpi {
    border-radius: 18px;
    border: none;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}

.card-kpi-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.card-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.card-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(30,177,92,0.1);
    color: var(--color-accent-dark);
}

/* Generic cards */
.card-soft {
    border-radius: 18px;
    border: none;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}

.card-soft-header {
    padding: 1rem 1.25rem 0.5rem;
}

.card-soft-body {
    padding: 0.75rem 1.25rem 1.1rem;
}

/* Tables */
.table-modern {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.table-modern thead {
    background-color: var(--color-bg-light);
}

.table-modern thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(15,23,42,0.06);
}

.table-modern tbody tr {
    transition: background-color .15s ease-out;
}

.table-modern tbody tr:hover {
    background-color: rgba(15,23,42,0.02);
}

.table-modern td, 
.table-modern th {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

/* Status pills */
.badge-status {
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.28rem 0.7rem;
}

.badge-status-success {
    background-color: rgba(30,177,92,0.12);
    color: var(--color-accent-dark);
}

.badge-status-warning {
    background-color: rgba(251,191,36,0.14);
    color: #92400e;
}

.badge-status-danger {
    background-color: rgba(248,113,113,0.16);
    color: #b91c1c;
}

/* Utility */
.text-muted-soft {
    color: var(--color-text-muted);
}

.fs-xs {
    font-size: 0.75rem;
}

.fs-sm {
    font-size: 0.875rem;
}

.rounded-xl {
    border-radius: 1rem;
}

/* ============================================================
   SIDEBAR RESPONSIVO REAL PARA TU LAYOUT (.sidebar moderno)
   ============================================================ */

@media (max-width: 768px) {

    /* Oculta sidebar en móvil */
    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 260px;
        height: 100%;
        background: radial-gradient(circle at 0 0, var(--sidebar-bg-start) 0, var(--sidebar-bg-mid) 45%, var(--sidebar-bg-end) 100%);
        color: #ffffff;
        z-index: 9999;
        padding: 1.25rem 1.25rem 1.5rem;
        box-shadow: 2px 0 8px rgba(0,0,0,.35);
        transition: all .3s ease-in-out;
        overflow-y: auto;
        overscroll-behavior: contain;
    }


        /* Sidebar visible */
        .sidebar.active {
            left: 0;
        }

    /* El contenido se oscurece cuando el sidebar está activo */
    .app-main.overlay::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.3);
        z-index: 900;
    }

    /* El contenido no debe moverse */
    .app-main {
        position: relative;
    }
    
    .sidebar-nav-item {
        margin-bottom: 0.6rem;
    }
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.15);
    border-radius: 6px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255,255,255,0.25);
}
