:root {
  --bg: #ffffff;
  --bg-sidebar: #f9fafb;
  --text: #1f1f1f;
  --muted: #6b7280;
  --brand: #0b57d0;
  --brand-hover: #0842a0;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}
.wrap {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.logo { height: 32px; }

/* Tabs */
.site-nav ul.tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}
.site-nav .tabs li {
  display: inline;
}
.site-nav .tabs a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 10px;
  color: var(--text);
  border-bottom: 2px solid transparent;
}
.site-nav .tabs a.active {
  color: var(--brand);
  border-color: var(--brand);
}

/* Layout */
.site-main {
  min-height: calc(100vh - 80px);
}
.tab-content { display: none; }
.tab-content.active { display: grid; grid-template-columns: 280px 1fr; }

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 16px;
  background: var(--bg-sidebar);
}

/* Map section */
.map-section {
  position: relative;
  background: #fff;
}

/* Toolbar */
.toolbar {
  position: absolute;
  z-index: 1000;
  bottom: 12px;  /* 👈 posición abajo */
  right: 12px;   /* 👈 en la esquina derecha */
  background: #fff;
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 8px;
}


.btn {
  border: none;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { background: var(--brand-hover); }

.btn-outline {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--brand);
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Card */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.card h2 {
  margin-top: 0;
  font-size: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.filters label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  cursor: pointer;
}
.filters input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  font-size: 14px;
  margin-top: 6px;
}

/* Map */
.map-container {
  height: calc(100vh - 80px);
  width: 100%;
}

/* Popup */
.leaflet-popup-content {
  font-size: 13px;
  line-height: 1.4;
}
.popup-station strong {
  font-size: 15px;
  color: var(--brand);
}
.popup-station a {
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--radius);
  background: #f8f9fb;
  font-size: 12px;
  margin-right: 6px;
}
.popup-station a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
  .tab-content.active { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .map-container { height: calc(100vh - 160px); }
}




/* =========================
   HEADER
========================= */

.glass-header{
    background:rgba(255,255,255,0.9);
    backdrop-filter:blur(12px);
    border-bottom:1px solid #e5e7eb;
    position:sticky;
    top:0;
    z-index:999;
}

.brand-logo{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
}

.brand-text{
    display:flex;
    flex-direction:column;
}

.brand-text strong{
    color:#111827;
    font-size:16px;
}

.brand-text small{
    color:#6b7280;
    font-size:12px;
}

/* =========================
   TABS
========================= */

.modern-tabs{
    display:flex;
    gap:10px;
}

.modern-tabs a{
    background:#f3f4f6;
    padding:10px 16px;
    border-radius:12px;
    transition:0.2s;
    font-weight:600;
}

.modern-tabs a.active{
    background:#0b57d0;
    color:white;
}

/* =========================
   SIDEBAR
========================= */

.modern-sidebar{
    background:white;
    border-right:1px solid #e5e7eb;
    padding:20px;
}

.card{
    background:white;
    border:none;
    border-radius:18px;
    box-shadow:0 2px 12px rgba(0,0,0,0.06);
    padding:20px;
}

/* =========================
   TOOLBAR
========================= */

.modern-toolbar{
    display:flex;
    gap:12px;
    margin-bottom:15px;
}

/* =========================
   BOTONES
========================= */

.btn-primary-custom{
    background:#0b57d0;
    color:white;
    border:none;
}

.btn-primary-custom:hover{
    background:#0847aa;
}

.btn-secondary-custom{
    background:#f3f4f6;
    border:none;
}

.btn-clear{
    width:100%;
    background:#ef4444;
    color:white;
    border:none;
}

.btn-clear:hover{
    background:#dc2626;
}

/* =========================
   INPUTS
========================= */

.modern-input{
    width:100%;
    padding:12px;
    border-radius:12px;
    border:1px solid #d1d5db;
    outline:none;
    transition:0.2s;
}

.modern-input:focus{
    border-color:#0b57d0;
    box-shadow:0 0 0 3px rgba(11,87,208,0.1);
}

/* =========================
   MAPA
========================= */

.map-container{
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 2px 12px rgba(0,0,0,0.08);
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

    .site-header .wrap{
        flex-direction:column;
        gap:15px;
    }

    .modern-toolbar{
        flex-direction:column;
    }

}



/* =========================
POPUP PROFESIONAL
========================= */

.popup-card{

    width:280px;

    font-family:Arial, Helvetica, sans-serif;

}

.popup-image{

    width:100%;

    height:140px;

    object-fit:cover;

    border-radius:14px;

    margin-bottom:12px;

}

.popup-title{

    font-size:20px;

    font-weight:700;

    color:#111827;

    margin-bottom:8px;

}

.popup-brand{

    display:inline-block;

    background:#eff6ff;

    color:#2563eb;

    padding:4px 10px;

    border-radius:999px;

    font-size:12px;

    font-weight:700;

    margin-bottom:10px;

}

.popup-info{

    display:flex;

    flex-direction:column;

    gap:8px;

    font-size:13px;

    color:#374151;

    margin-bottom:14px;

}

.popup-service{

    display:flex;

    align-items:center;

    gap:6px;

    padding:8px 14px;

    border-radius:999px;

    font-size:14px;

    font-weight:700;

    color:white;

}

/*
DIESEL
*/

.popup-service.diesel{

    background:#2f2f2f;

    color:#ffffff;

}

/*
REGULAR
*/

.popup-service.regular{

    background:#16a34a;

    color:#ffffff;

}

/*
PREMIUM
*/

.popup-service.premium{

    background:#2563eb;

    color:#ffffff;

}

/*
GLP
*/

.popup-service.glp{

    background:#ea580c;

    color:#ffffff;

}

/*
GNV
*/

.popup-service.gnv{

    background:#0f766e;

    color:#ffffff;

}

/*
TIENDA
*/

.popup-service.tienda{

    background:#7c3aed;

    color:#ffffff;

}

.popup-btn{

    display:block;

    width:100%;

    background:#2563eb;

    color:white !important;

    text-align:center;

    padding:12px;

    border-radius:12px;

    text-decoration:none;

    font-weight:700;

    transition:0.2s;

}

.popup-btn:hover{

    background:#1d4ed8;

}

.leaflet-popup-content-wrapper{

    border-radius:20px;

    padding:8px;

}

.leaflet-popup-content{

    margin:12px;

}


.popup-navigation{

    display:flex;

    gap:8px;

    margin-top:14px;

}

.popup-nav-btn{

    flex:1;

    text-align:center;

    padding:10px;

    border-radius:10px;

    text-decoration:none;

    font-size:12px;

    font-weight:700;

    color:white !important;

    transition:0.2s;

}

.popup-nav-btn:hover{

    transform:translateY(-2px);

}

.popup-nav-btn.google{

    background:#4285F4;

}

.popup-nav-btn.waze{

    background:#33CCFF;

}

.popup-nav-btn.apple{

    background:#111827;

}


/* =========================================================
RESPONSIVE MOBILE
========================================================= */

@media(max-width:1200px){

    .modern-modal-dialog{

        max-width:95vw !important;

    }

}

/* =========================================================
TABLET
========================================================= */

@media(max-width:992px){

    /*
    SIDEBAR
    */

    .sidebar{

        width:80px;

        overflow:hidden;

    }

    .sidebar .logo{

        font-size:18px;

        text-align:center;

    }

    .sidebar a{

        text-align:center;

        padding:14px 10px;

    }

    .sidebar a i{

        margin-right:0;

        font-size:18px;

    }

    .sidebar a span{

        display:none;

    }

    /*
    CONTENT
    */

    .main-content{

        padding:20px !important;

    }

    /*
    MODAL
    */

    .modern-modal-dialog{

        max-width:96vw !important;

    }

    .modal-body{

        padding:20px !important;

    }

}

/* =========================================================
MOBILE
========================================================= */

@media(max-width:768px){

    /*
    BODY
    */

    body{

        overflow-x:hidden;

    }

    /*
    LAYOUT
    */

    .d-flex{

        flex-direction:column;

    }

    /*
    SIDEBAR
    */

    .sidebar{

        width:100%;

        min-height:auto;

        display:flex;

        align-items:center;

        justify-content:space-between;

        padding:15px;

    }

    .sidebar .logo{

        font-size:24px;

        margin-bottom:0 !important;

    }

    .sidebar a{

        display:inline-flex;

        align-items:center;

        justify-content:center;

        padding:10px;

        margin-bottom:0;

    }

    .sidebar a span{

        display:none;

    }

    /*
    CONTENT
    */

    .main-content{

        width:100%;

        padding:15px !important;

    }

    /*
    TOPBAR
    */

    .topbar{

        flex-direction:column;

        align-items:flex-start !important;

        gap:10px;

    }

    /*
    CARDS
    */

    .card-dashboard{

        border-radius:16px;

    }

    /*
    TABLE
    */

    .table-responsive{

        overflow-x:auto;

    }

    /*
    MODAL
    */

    .modern-modal-dialog{

        max-width:100vw !important;

        margin:0 !important;

        height:100vh;

    }

    .modern-modal{

        border-radius:0 !important;

        height:100vh;

    }

    .modern-modal-header{

        padding:18px 20px;

    }

    .modal-body{

        padding:18px !important;

        overflow-y:auto;

    }

    /*
    GRID
    */

    .modal-grid{

        grid-template-columns:1fr !important;

    }

    /*
    SERVICIOS
    */

    .services-grid{

        grid-template-columns:1fr 1fr;

    }

    /*
    INPUTS
    */

    .modern-input{

        min-height:52px;

        font-size:16px;

    }

    /*
    BOTONES
    */

    .modal-footer{

        padding:16px 18px !important;

        position:sticky;

        bottom:0;

        background:white;

        z-index:10;

    }

    .modal-footer .btn{

        min-height:48px;

        font-size:15px;

        padding:12px 16px;

    }

    /*
    POPUP MAPA
    */

    .popup-card{

        width:min(280px, 72vw);

    }

    .popup-title{

        font-size:18px;

    }

    .popup-info{

        font-size:13px;

    }

    .popup-navigation{

        flex-direction:column;

    }

    .popup-nav-btn{

        min-height:46px;

        display:flex;

        align-items:center;

        justify-content:center;

        font-size:14px;

    }

}

/* =========================================================
CELULARES PEQUEÑOS
========================================================= */

@media(max-width:480px){

    /*
    LOGO
    */

    .sidebar .logo{

        font-size:20px;

    }

    /*
    TITULOS
    */

    h3{

        font-size:24px;

    }

    /*
    MODAL
    */

    .modern-modal-header h5{

        font-size:22px;

    }

    /*
    SERVICIOS
    */

    .services-grid{

        grid-template-columns:1fr;

    }

    /*
    POPUP
    */

    .popup-card{

        width:min(260px, 78vw);

    }

}

