:root{--bg:#070912;--panel:#101426;--panel2:#171c33;--text:#f7f8ff;--muted:#9ba5c6;--primary:#7c5cff;--cyan:#36d7ff}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:radial-gradient(circle at 20% 0%,rgba(124,92,255,.22),transparent 35%),radial-gradient(circle at 100% 10%,rgba(54,215,255,.14),transparent 30%),var(--bg);color:var(--text);min-height:100vh}a{color:inherit;text-decoration:none}.muted{color:var(--muted)}.brand{font-size:30px;font-weight:900;letter-spacing:.04em}.brand span{color:var(--cyan)}.layout{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{padding:26px 18px;border-right:1px solid rgba(255,255,255,.07);background:rgba(7,9,18,.82)}.nav{margin-top:30px;display:grid;gap:8px}.nav a{padding:13px 14px;border-radius:12px;color:#c4cbe2}.nav a.active,.nav a:hover{background:var(--panel2);color:#fff}.main{padding:32px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px}.topbar h1{margin:0}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:28px}.card,.detail,.profile-card{background:rgba(16,20,38,.86);border:1px solid rgba(255,255,255,.08)}.card{border-radius:20px;padding:22px}.card strong{display:block;font-size:23px;margin-top:8px}.actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:20px}.action{background:var(--panel2);padding:18px;border-radius:16px;text-align:center;border:1px solid rgba(255,255,255,.06)}.logout{padding:10px 14px;background:var(--panel2);border-radius:11px}.profile-card{display:flex;align-items:center;gap:18px;margin-top:28px;padding:24px;border-radius:20px}.profile-card h2{margin:0 0 8px}.avatar{width:68px;height:68px;border-radius:18px;display:grid;place-items:center;font-size:30px;font-weight:900;background:linear-gradient(135deg,var(--primary),var(--cyan))}.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:rgba(124,92,255,.18);color:#d9d0ff;font-size:13px}.details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}.detail{padding:20px;border-radius:17px}.detail span{display:block;color:var(--muted);font-size:14px;margin-bottom:8px}.detail strong{font-size:18px;overflow-wrap:anywhere}@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{display:none}.main{padding:22px}.grid,.details-grid{grid-template-columns:1fr}.actions{grid-template-columns:1fr 1fr}}
.form-card{max-width:760px;margin-top:28px;padding:26px;border-radius:20px;background:rgba(16,20,38,.86);border:1px solid rgba(255,255,255,.08)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:grid;gap:9px;margin-bottom:20px}.field label{font-weight:700}.field select,.field input{width:100%;padding:14px 15px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:#0b0f1d;color:#fff;font:inherit}.field small{color:var(--muted)}.price-box{display:flex;justify-content:space-between;align-items:center;margin:4px 0 22px;padding:19px;border-radius:15px;background:linear-gradient(135deg,rgba(124,92,255,.18),rgba(54,215,255,.12));border:1px solid rgba(124,92,255,.35)}.price-box strong{font-size:30px}.primary-button{display:inline-flex;justify-content:center;align-items:center;width:100%;padding:14px 18px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--primary),#4aaeff);color:#fff;font:inherit;font-weight:800;cursor:pointer}.inline-button{width:auto}.notice{margin-top:22px;padding:15px 17px;border-radius:13px;border:1px solid}.notice-success{background:rgba(47,193,128,.12);border-color:rgba(47,193,128,.35)}.notice-error{background:rgba(255,83,112,.12);border-color:rgba(255,83,112,.35)}.history-list{display:grid;gap:14px;margin-top:28px}.history-item,.empty-state{padding:22px;border-radius:18px;background:rgba(16,20,38,.86);border:1px solid rgba(255,255,255,.08)}.history-item{display:flex;justify-content:space-between;align-items:center;gap:20px}.history-item h2{margin:10px 0 6px;font-size:19px}.history-price{font-size:24px;white-space:nowrap}.status{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800}.status-pendiente{background:rgba(255,191,71,.15);color:#ffd58b}.status-aprobada{background:rgba(47,193,128,.15);color:#8ff0c1}.status-rechazada{background:rgba(255,83,112,.15);color:#ff9aac}.empty-state{text-align:center;padding:40px 22px}.empty-state p{margin:8px 0 20px}@media(max-width:900px){.form-grid{grid-template-columns:1fr}.history-item{align-items:flex-start}.history-price{font-size:20px}}

/* PORTAL PÚBLICO */

.public-body{
  overflow-x:hidden;
}

.public-shell{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
  padding-bottom:60px;
}

.public-header{
  min-height:90px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.header-login{
  padding:12px 20px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:12px;
  color:#fff;
  font-weight:700;
  background:rgba(255,255,255,.04);
}

.hero{
  min-height:590px;
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:70px;
  align-items:center;
}

.hero-label{
  color:var(--cyan);
  font-size:13px;
  font-weight:900;
  letter-spacing:.18em;
}

.hero-copy h1{
  max-width:720px;
  margin:18px 0;
  font-size:clamp(42px,6vw,76px);
  line-height:1.02;
  letter-spacing:-.045em;
}

.hero-copy>p{
  max-width:630px;
  color:var(--muted);
  font-size:19px;
  line-height:1.7;
}

.hero-actions{
  display:flex;
  gap:14px;
  margin-top:32px;
}

.public-primary,
.public-secondary{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:52px;
  padding:0 25px;
  border-radius:13px;
  font-weight:800;
}

.public-primary{
  background:linear-gradient(135deg,var(--primary),#4aaeff);
  box-shadow:0 16px 50px rgba(91,106,255,.25);
}

.public-secondary{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
}

.hero-features{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  margin-top:28px;
  color:#cdd3e8;
  font-size:14px;
}

.portal-preview{
  position:relative;
  display:grid;
  place-items:center;
}

.preview-glow{
  position:absolute;
  width:350px;
  height:350px;
  border-radius:50%;
  background:rgba(80,87,255,.28);
  filter:blur(80px);
}

.preview-card{
  position:relative;
  width:min(100%,390px);
  padding:35px;
  border-radius:27px;
  background:linear-gradient(
    145deg,
    rgba(24,30,60,.95),
    rgba(11,14,28,.94)
  );
  border:1px solid rgba(255,255,255,.13);
  box-shadow:0 40px 100px rgba(0,0,0,.38);
}

.preview-card>span{
  display:block;
  color:var(--cyan);
  font-size:13px;
  font-weight:900;
  letter-spacing:.15em;
}

.preview-card>strong{
  display:block;
  margin-top:10px;
  font-size:29px;
}

.preview-card>p{
  color:var(--muted);
  line-height:1.6;
}

.preview-icon{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  margin-bottom:28px;
  border-radius:20px;
  background:linear-gradient(135deg,var(--primary),var(--cyan));
  font-size:26px;
}

.preview-row{
  display:flex;
  justify-content:space-between;
  margin-top:14px;
  padding:16px;
  border-radius:13px;
  background:rgba(255,255,255,.05);
}

.preview-row span{
  color:var(--muted);
}

.preview-row b{
  color:#75edbd;
}

.public-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.public-option{
  padding:30px;
  border-radius:22px;
  background:rgba(16,20,38,.82);
  border:1px solid rgba(255,255,255,.08);
}

.public-option.highlighted{
  background:linear-gradient(
    135deg,
    rgba(124,92,255,.18),
    rgba(54,215,255,.08)
  );
  border-color:rgba(124,92,255,.32);
}

.public-option h2{
  margin:17px 0 8px;
}

.public-option p{
  color:var(--muted);
  line-height:1.6;
}

.public-option a{
  color:var(--cyan);
  font-weight:800;
}

.option-icon{
  font-size:28px;
}

/* AUTENTICACIÓN */

.auth-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
}

.auth-card{
  width:min(100%,480px);
  padding:34px;
  border-radius:25px;
  background:rgba(16,20,38,.92);
  border:1px solid rgba(255,255,255,.09);
  box-shadow:0 35px 100px rgba(0,0,0,.36);
}

.auth-heading{
  margin:32px 0 24px;
}

.auth-heading h1{
  margin:0 0 10px;
  font-size:34px;
}

.auth-heading p{
  color:var(--muted);
  line-height:1.6;
}

.back-link{
  display:inline-block;
  margin-bottom:25px;
  color:var(--muted);
}

.auth-footer{
  margin-top:24px;
  text-align:center;
  color:var(--muted);
}

.auth-footer a,
.secondary-text-link{
  color:var(--cyan);
  font-weight:800;
}

.success-card{
  text-align:center;
}

.success-icon{
  width:80px;
  height:80px;
  display:grid;
  place-items:center;
  margin:0 auto 25px;
  border-radius:50%;
  background:rgba(47,193,128,.16);
  border:1px solid rgba(47,193,128,.38);
  color:#8ff0c1;
  font-size:38px;
  font-weight:900;
}

.pending-box{
  display:grid;
  gap:9px;
  margin:25px 0;
  padding:20px;
  border-radius:16px;
  background:rgba(255,191,71,.10);
  border:1px solid rgba(255,191,71,.28);
}

.pending-box span{
  color:var(--muted);
  line-height:1.5;
}

.secondary-text-link{
  display:block;
  margin-top:20px;
}

/* REGISTRO */

.register-page{
  width:min(1200px,calc(100% - 40px));
  margin:0 auto;
  padding-bottom:60px;
}

.register-header{
  min-height:95px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.register-layout{
  display:grid;
  grid-template-columns:.72fr 1.28fr;
  gap:55px;
  align-items:start;
}

.register-info{
  position:sticky;
  top:30px;
  padding:40px 0;
}

.register-info h1{
  margin:17px 0;
  font-size:clamp(38px,5vw,60px);
  line-height:1.05;
}

.register-info>p{
  color:var(--muted);
  font-size:17px;
  line-height:1.7;
}

.steps-list{
  display:grid;
  gap:15px;
  margin-top:35px;
}

.steps-list div{
  display:flex;
  align-items:center;
  gap:14px;
}

.steps-list b{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:rgba(124,92,255,.18);
  color:#d8d0ff;
}

.steps-list span{
  color:#dfe3f3;
}

.register-card{
  padding:34px;
  border-radius:25px;
  background:rgba(16,20,38,.91);
  border:1px solid rgba(255,255,255,.09);
}

.register-card h2{
  margin:0 0 22px;
}

.register-card h2:not(:first-of-type){
  margin-top:18px;
}

.register-notice{
  margin-top:0;
  margin-bottom:24px;
}

.plan-selector{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:13px;
  margin-bottom:22px;
}

.plan-choice{
  cursor:pointer;
}

.plan-choice input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.plan-choice span{
  display:grid;
  gap:7px;
  min-height:105px;
  padding:20px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.11);
  background:#0b0f1d;
}

.plan-choice small{
  color:var(--muted);
}

.plan-choice input:checked+span{
  border-color:var(--primary);
  background:rgba(124,92,255,.14);
  box-shadow:inset 0 0 0 1px rgba(124,92,255,.35);
}

.duration-field{
  max-width:300px;
}

.register-summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin:10px 0 24px;
  padding:22px;
  border-radius:17px;
  background:linear-gradient(
    135deg,
    rgba(124,92,255,.18),
    rgba(54,215,255,.10)
  );
  border:1px solid rgba(124,92,255,.30);
}

.register-summary span{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
}

.summary-price{
  text-align:right;
}

.summary-price strong{
  font-size:32px;
}

.payment-info{
  margin-bottom:22px;
  padding:18px;
  border-radius:15px;
  background:rgba(255,255,255,.04);
}

.payment-info p{
  margin:7px 0 0;
  color:var(--muted);
  line-height:1.5;
}

.legal-text{
  margin:17px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
  text-align:center;
}

@media(max-width:900px){
  .hero{
    grid-template-columns:1fr;
    gap:25px;
    padding:55px 0;
  }

  .portal-preview{
    display:none;
  }

  .public-options{
    grid-template-columns:1fr;
  }

  .register-layout{
    grid-template-columns:1fr;
    gap:20px;
  }

  .register-info{
    position:static;
    padding:20px 0;
  }

  .plan-selector{
    grid-template-columns:1fr;
  }
}

@media(max-width:600px){
  .public-shell,
  .register-page{
    width:min(100% - 24px,1180px);
  }

  .public-header,
  .register-header{
    min-height:75px;
  }

  .hero{
    min-height:auto;
    padding:45px 0;
  }

  .hero-copy h1{
    font-size:42px;
  }

  .hero-actions{
    display:grid;
  }

  .hero-features{
    display:grid;
  }

  .auth-page{
    padding:14px;
  }

  .auth-card,
  .register-card{
    padding:24px 18px;
  }

  .register-summary{
    align-items:flex-start;
    flex-direction:column;
  }

  .summary-price{
    text-align:left;
  }
}

/* MDPRIME_BACK_BUTTON */
.back-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin-bottom:22px;
    padding:12px 18px;
    border-radius:12px;
    background:#20273d;
    color:#fff;
    text-decoration:none;
    font-weight:700;
    transition:.2s;
    border:1px solid rgba(255,255,255,.08);
}

.back-button:hover{
    background:#2b3552;
}

@media (max-width:900px){
    .back-button{
        width:100%;
        margin-bottom:20px;
        box-sizing:border-box;
    }
}

/* ===== MDPRIME PREMIUM UI V1: START ===== */

/*
 * MDPRIME WEB
 * Capa visual premium global.
 * No modifica lógica, rutas, formularios ni permisos.
 */

:root {
    --md-bg: #050811;
    --md-bg-soft: #09101f;
    --md-surface: rgba(17, 25, 43, 0.82);
    --md-surface-solid: #11192b;
    --md-surface-hover: rgba(26, 38, 64, 0.96);
    --md-border: rgba(255, 255, 255, 0.09);
    --md-border-strong: rgba(111, 146, 255, 0.30);

    --md-primary: #5f7cff;
    --md-primary-light: #8ba0ff;
    --md-secondary: #8c5cff;
    --md-accent: #16d9e3;
    --md-success: #2ad58f;
    --md-warning: #ffbc4c;
    --md-danger: #ff5f78;

    --md-text: #f7f9ff;
    --md-text-soft: #b3bdd3;
    --md-text-muted: #7e8aa6;

    --md-radius-sm: 12px;
    --md-radius: 18px;
    --md-radius-lg: 24px;
    --md-radius-xl: 32px;

    --md-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.20);
    --md-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
    --md-shadow-glow: 0 18px 60px rgba(67, 96, 255, 0.18);

    --md-transition: 180ms cubic-bezier(.2, .8, .2, 1);
    --md-sidebar-width: 270px;
}

/* Normalización segura */

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    background: var(--md-bg);
}

body:not(.public-body) {
    min-height: 100vh;
    color: var(--md-text);
    background:
        radial-gradient(circle at 8% 5%, rgba(74, 99, 255, 0.18), transparent 30%),
        radial-gradient(circle at 92% 15%, rgba(139, 76, 255, 0.14), transparent 28%),
        radial-gradient(circle at 60% 100%, rgba(14, 204, 214, 0.08), transparent 35%),
        linear-gradient(145deg, #050811 0%, #080d19 45%, #050811 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body:not(.public-body)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

body:not(.public-body) *,
body:not(.public-body) *::before,
body:not(.public-body) *::after {
    box-sizing: border-box;
}

body:not(.public-body) a,
body:not(.public-body) button,
body:not(.public-body) input,
body:not(.public-body) select,
body:not(.public-body) textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Selección */

body:not(.public-body) ::selection {
    color: white;
    background: rgba(95, 124, 255, 0.65);
}

/* Barra de desplazamiento */

body:not(.public-body) {
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 143, 220, 0.35) transparent;
}

body:not(.public-body)::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

body:not(.public-body)::-webkit-scrollbar-track {
    background: transparent;
}

body:not(.public-body)::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(120, 143, 220, 0.32);
    background-clip: padding-box;
}

/* Sidebar premium */

body:not(.public-body) .sidebar {
    width: var(--md-sidebar-width);
    border-right: 1px solid var(--md-border) !important;
    background:
        linear-gradient(180deg, rgba(14, 21, 38, 0.96), rgba(8, 13, 25, 0.96)) !important;
    box-shadow: 16px 0 44px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

body:not(.public-body) .sidebar .brand {
    position: relative;
    color: var(--md-text);
    letter-spacing: 0.02em;
}

body:not(.public-body) .sidebar .brand::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 13px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--md-primary),
        var(--md-secondary),
        var(--md-accent)
    );
    box-shadow: 0 0 18px rgba(95, 124, 255, 0.55);
}

/* Navegación lateral */

body:not(.public-body) .sidebar .nav {
    gap: 8px;
}

body:not(.public-body) .sidebar .nav a {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px !important;
    overflow: hidden;
    color: var(--md-text-soft) !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    text-decoration: none;
    transition:
        transform var(--md-transition),
        color var(--md-transition),
        border-color var(--md-transition),
        background var(--md-transition),
        box-shadow var(--md-transition);
}

body:not(.public-body) .sidebar .nav a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 0;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(var(--md-primary), var(--md-secondary));
    transform: translateY(-50%);
    transition: height var(--md-transition);
}

body:not(.public-body) .sidebar .nav a:hover {
    color: var(--md-text) !important;
    border-color: var(--md-border) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    transform: translateX(3px);
}

body:not(.public-body) .sidebar .nav a.active {
    color: white !important;
    border-color: rgba(111, 139, 255, 0.22) !important;
    background:
        linear-gradient(
            135deg,
            rgba(95, 124, 255, 0.23),
            rgba(140, 92, 255, 0.13)
        ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(50, 70, 170, 0.16);
}

body:not(.public-body) .sidebar .nav a.active::before {
    height: 58%;
}

body:not(.public-body) .sidebar .logout,
body:not(.public-body) a.logout {
    color: #ff9eae !important;
    border-color: rgba(255, 95, 120, 0.12) !important;
    transition: all var(--md-transition);
}

body:not(.public-body) .sidebar .logout:hover,
body:not(.public-body) a.logout:hover {
    color: #ffd5dc !important;
    background: rgba(255, 95, 120, 0.10) !important;
    border-color: rgba(255, 95, 120, 0.24) !important;
}

/* Área principal */

body:not(.public-body) .main {
    min-width: 0;
    animation: mdPageEnter 420ms cubic-bezier(.2, .8, .2, 1) both;
}

body:not(.public-body) .topbar {
    position: relative;
    gap: 18px;
    margin-bottom: 24px;
}

body:not(.public-body) .topbar h1,
body:not(.public-body) .topbar h2 {
    margin-top: 0;
    color: var(--md-text);
    letter-spacing: -0.035em;
    text-wrap: balance;
}

body:not(.public-body) .topbar p,
body:not(.public-body) .subtitle,
body:not(.public-body) .muted {
    color: var(--md-text-soft);
}

/* Tarjetas y paneles */

body:not(.public-body) .card,
body:not(.public-body) .panel,
body:not(.public-body) .box,
body:not(.public-body) .action,
body:not(.public-body) .stat,
body:not(.public-body) .summary,
body:not(.public-body) .account-card,
body:not(.public-body) .history-card,
body:not(.public-body) .referral-card,
body:not(.public-body) .renew-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--md-border) !important;
    border-radius: var(--md-radius) !important;
    background:
        linear-gradient(
            145deg,
            rgba(23, 33, 55, 0.86),
            rgba(12, 19, 34, 0.88)
        ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        var(--md-shadow-sm);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        transform var(--md-transition),
        border-color var(--md-transition),
        box-shadow var(--md-transition),
        background var(--md-transition);
}

body:not(.public-body) .card::before,
body:not(.public-body) .panel::before,
body:not(.public-body) .box::before,
body:not(.public-body) .action::before,
body:not(.public-body) .stat::before,
body:not(.public-body) .summary::before,
body:not(.public-body) .account-card::before,
body:not(.public-body) .history-card::before,
body:not(.public-body) .referral-card::before,
body:not(.public-body) .renew-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(
            circle at top right,
            rgba(111, 139, 255, 0.16),
            transparent 48%
        );
    transition: opacity var(--md-transition);
}

body:not(.public-body) .card > *,
body:not(.public-body) .panel > *,
body:not(.public-body) .box > *,
body:not(.public-body) .action > *,
body:not(.public-body) .stat > *,
body:not(.public-body) .summary > *,
body:not(.public-body) .account-card > *,
body:not(.public-body) .history-card > *,
body:not(.public-body) .referral-card > *,
body:not(.public-body) .renew-card > * {
    position: relative;
    z-index: 1;
}

@media (hover: hover) {
    body:not(.public-body) .card:hover,
    body:not(.public-body) .panel:hover,
    body:not(.public-body) .box:hover,
    body:not(.public-body) .action:hover,
    body:not(.public-body) .stat:hover,
    body:not(.public-body) .summary:hover,
    body:not(.public-body) .account-card:hover,
    body:not(.public-body) .history-card:hover,
    body:not(.public-body) .referral-card:hover,
    body:not(.public-body) .renew-card:hover {
        border-color: var(--md-border-strong) !important;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.075),
            var(--md-shadow-glow);
        transform: translateY(-3px);
    }

    body:not(.public-body) .card:hover::before,
    body:not(.public-body) .panel:hover::before,
    body:not(.public-body) .box:hover::before,
    body:not(.public-body) .action:hover::before,
    body:not(.public-body) .stat:hover::before,
    body:not(.public-body) .summary:hover::before,
    body:not(.public-body) .account-card:hover::before,
    body:not(.public-body) .history-card:hover::before,
    body:not(.public-body) .referral-card:hover::before,
    body:not(.public-body) .renew-card:hover::before {
        opacity: 1;
    }
}

/* Acciones del dashboard */

body:not(.public-body) a.action {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--md-text) !important;
    text-decoration: none;
}

body:not(.public-body) a.action:active {
    transform: scale(0.985);
}

/* Botones */

body:not(.public-body) button,
body:not(.public-body) .button,
body:not(.public-body) .btn,
body:not(.public-body) .primary-button,
body:not(.public-body) .back-button,
body:not(.public-body) input[type="submit"] {
    min-height: 46px;
    border: 1px solid rgba(134, 157, 255, 0.24);
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform var(--md-transition),
        box-shadow var(--md-transition),
        filter var(--md-transition),
        border-color var(--md-transition);
}

body:not(.public-body) button:not(.secondary):not(.danger),
body:not(.public-body) .button:not(.secondary):not(.danger),
body:not(.public-body) .btn:not(.secondary):not(.danger),
body:not(.public-body) .primary-button,
body:not(.public-body) input[type="submit"] {
    color: white;
    background:
        linear-gradient(
            135deg,
            var(--md-primary),
            var(--md-secondary)
        );
    box-shadow:
        0 12px 28px rgba(74, 95, 225, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

@media (hover: hover) {
    body:not(.public-body) button:hover,
    body:not(.public-body) .button:hover,
    body:not(.public-body) .btn:hover,
    body:not(.public-body) .primary-button:hover,
    body:not(.public-body) .back-button:hover,
    body:not(.public-body) input[type="submit"]:hover {
        filter: brightness(1.08);
        transform: translateY(-2px);
        box-shadow:
            0 16px 34px rgba(74, 95, 225, 0.32),
            inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }
}

body:not(.public-body) button:active,
body:not(.public-body) .button:active,
body:not(.public-body) .btn:active,
body:not(.public-body) .primary-button:active,
body:not(.public-body) .back-button:active,
body:not(.public-body) input[type="submit"]:active {
    transform: scale(0.975);
}

/* Formularios */

body:not(.public-body) label {
    color: var(--md-text-soft);
    font-weight: 650;
}

body:not(.public-body) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body:not(.public-body) select,
body:not(.public-body) textarea {
    width: 100%;
    min-height: 48px;
    color: var(--md-text);
    border: 1px solid var(--md-border) !important;
    border-radius: 14px !important;
    outline: none;
    background: rgba(3, 8, 18, 0.62) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 8px 24px rgba(0, 0, 0, 0.10);
    transition:
        border-color var(--md-transition),
        box-shadow var(--md-transition),
        background var(--md-transition);
}

body:not(.public-body) input::placeholder,
body:not(.public-body) textarea::placeholder {
    color: var(--md-text-muted);
}

body:not(.public-body) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
body:not(.public-body) select:focus,
body:not(.public-body) textarea:focus {
    border-color: rgba(111, 139, 255, 0.72) !important;
    background: rgba(6, 12, 26, 0.82) !important;
    box-shadow:
        0 0 0 4px rgba(95, 124, 255, 0.12),
        0 14px 30px rgba(0, 0, 0, 0.16);
}

/* Tablas */

body:not(.public-body) table {
    width: 100%;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    background: rgba(10, 16, 29, 0.66);
}

body:not(.public-body) th {
    color: var(--md-text-soft);
    background: rgba(255, 255, 255, 0.035);
}

body:not(.public-body) th,
body:not(.public-body) td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

body:not(.public-body) tr:last-child td {
    border-bottom: 0;
}

body:not(.public-body) tbody tr {
    transition: background var(--md-transition);
}

body:not(.public-body) tbody tr:hover {
    background: rgba(95, 124, 255, 0.045);
}

/* Avisos */

body:not(.public-body) .alert,
body:not(.public-body) .notice,
body:not(.public-body) .message,
body:not(.public-body) .success,
body:not(.public-body) .error {
    border-radius: 14px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body:not(.public-body) .success {
    border-color: rgba(42, 213, 143, 0.26) !important;
    background: rgba(42, 213, 143, 0.09) !important;
}

body:not(.public-body) .error {
    border-color: rgba(255, 95, 120, 0.26) !important;
    background: rgba(255, 95, 120, 0.09) !important;
}

/* Badges y estados */

body:not(.public-body) .badge,
body:not(.public-body) .status,
body:not(.public-body) .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid var(--md-border);
    border-radius: 999px;
    color: var(--md-text-soft);
    background: rgba(255, 255, 255, 0.045);
}

/* Enlaces generales */

body:not(.public-body) .main a:not(.action):not(.button):not(.btn):not(.back-button) {
    text-underline-offset: 3px;
    transition:
        color var(--md-transition),
        opacity var(--md-transition);
}

/* Animaciones */

@keyframes mdPageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mdCardEnter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body:not(.public-body) .grid > *,
body:not(.public-body) .actions > *,
body:not(.public-body) .cards > * {
    animation: mdCardEnter 440ms cubic-bezier(.2, .8, .2, 1) both;
}

body:not(.public-body) .grid > *:nth-child(2),
body:not(.public-body) .actions > *:nth-child(2),
body:not(.public-body) .cards > *:nth-child(2) {
    animation-delay: 45ms;
}

body:not(.public-body) .grid > *:nth-child(3),
body:not(.public-body) .actions > *:nth-child(3),
body:not(.public-body) .cards > *:nth-child(3) {
    animation-delay: 90ms;
}

body:not(.public-body) .grid > *:nth-child(4),
body:not(.public-body) .actions > *:nth-child(4),
body:not(.public-body) .cards > *:nth-child(4) {
    animation-delay: 135ms;
}

body:not(.public-body) .grid > *:nth-child(5),
body:not(.public-body) .actions > *:nth-child(5),
body:not(.public-body) .cards > *:nth-child(5) {
    animation-delay: 180ms;
}

/* Tablet */

@media (max-width: 1024px) {
    :root {
        --md-sidebar-width: 235px;
    }

    body:not(.public-body) .main {
        padding-left: clamp(18px, 3vw, 32px);
        padding-right: clamp(18px, 3vw, 32px);
    }
}

/* Móvil */

@media (max-width: 768px) {
    html {
        scroll-padding-bottom: 92px;
    }

    body:not(.public-body) {
        overflow-x: hidden;
        background:
            radial-gradient(circle at 25% 0%, rgba(76, 99, 255, 0.20), transparent 31%),
            radial-gradient(circle at 100% 30%, rgba(140, 92, 255, 0.12), transparent 32%),
            linear-gradient(180deg, #050811, #080d19);
    }

    body:not(.public-body) .sidebar {
        border-right: 0 !important;
        border-bottom: 1px solid var(--md-border) !important;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
        background: rgba(7, 12, 24, 0.90) !important;
    }

    body:not(.public-body) .sidebar .brand::after {
        height: 2px;
        margin-top: 8px;
    }

    body:not(.public-body) .main {
        width: 100%;
        padding:
            20px
            max(16px, env(safe-area-inset-right))
            calc(30px + env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left)) !important;
    }

    body:not(.public-body) .topbar {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    body:not(.public-body) .topbar h1 {
        font-size: clamp(1.65rem, 7vw, 2.15rem);
        line-height: 1.08;
    }

    body:not(.public-body) .card,
    body:not(.public-body) .panel,
    body:not(.public-body) .box,
    body:not(.public-body) .action,
    body:not(.public-body) .stat,
    body:not(.public-body) .summary,
    body:not(.public-body) .account-card,
    body:not(.public-body) .history-card,
    body:not(.public-body) .referral-card,
    body:not(.public-body) .renew-card {
        border-radius: 17px !important;
    }

    body:not(.public-body) a.action {
        min-height: 112px;
    }

    body:not(.public-body) button,
    body:not(.public-body) .button,
    body:not(.public-body) .btn,
    body:not(.public-body) .primary-button,
    body:not(.public-body) .back-button,
    body:not(.public-body) input[type="submit"] {
        min-height: 50px;
        border-radius: 14px;
    }

    body:not(.public-body) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    body:not(.public-body) select,
    body:not(.public-body) textarea {
        min-height: 52px;
        font-size: 16px;
    }

    body:not(.public-body) .table-wrapper,
    body:not(.public-body) .table-responsive {
        margin-right: -4px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    body:not(.public-body) table {
        min-width: 620px;
    }

    body:not(.public-body) th,
    body:not(.public-body) td {
        padding: 13px 14px;
    }
}

/* Móviles pequeños */

@media (max-width: 420px) {
    body:not(.public-body) .main {
        padding-left: 13px !important;
        padding-right: 13px !important;
    }

    body:not(.public-body) .topbar h1 {
        font-size: 1.65rem;
    }

    body:not(.public-body) .card,
    body:not(.public-body) .panel,
    body:not(.public-body) .box,
    body:not(.public-body) .action {
        border-radius: 15px !important;
    }
}

/* Accesibilidad: reducir movimiento */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body:not(.public-body) *,
    body:not(.public-body) *::before,
    body:not(.public-body) *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MDPRIME PREMIUM UI V1: END ===== */

/* ===== MDPRIME BOTTOM NAV V1: START ===== */

.md-bottom-nav,
.md-more-overlay {
    display: none;
}

@media (max-width: 768px) {
    body:not(.public-body) {
        padding-bottom:
            calc(88px + env(safe-area-inset-bottom)) !important;
    }

    body:not(.public-body).md-sheet-open {
        overflow: hidden;
        touch-action: none;
    }

    /*
     * La barra sustituye al menú lateral en móvil.
     * La navegación de escritorio permanece intacta.
     */
    body:not(.public-body) .sidebar {
        display: none !important;
    }

    body:not(.public-body) .main {
        margin-left: 0 !important;
        min-height: 100vh;
        padding-bottom:
            calc(34px + env(safe-area-inset-bottom)) !important;
    }

    .md-bottom-nav {
        position: fixed;
        z-index: 9000;
        right: 10px;
        bottom: 8px;
        left: 10px;
        display: block;
        padding-bottom: env(safe-area-inset-bottom);
        pointer-events: none;
    }

    .md-bottom-nav__inner {
        width: min(100%, 620px);
        min-height: 68px;
        margin: 0 auto;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.11);
        border-radius: 22px;
        background:
            linear-gradient(
                145deg,
                rgba(20, 29, 49, 0.94),
                rgba(7, 12, 23, 0.96)
            );
        box-shadow:
            0 20px 55px rgba(0, 0, 0, 0.48),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(24px) saturate(150%);
        -webkit-backdrop-filter: blur(24px) saturate(150%);
        pointer-events: auto;
    }

    .md-bottom-nav__item {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        min-height: 56px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        margin: 0;
        padding: 5px 2px;
        overflow: hidden;
        color: #8995af !important;
        border: 0 !important;
        border-radius: 17px !important;
        outline: none;
        background: transparent !important;
        box-shadow: none !important;
        font: inherit;
        text-decoration: none !important;
        cursor: pointer;
        transition:
            color 180ms cubic-bezier(.2, .8, .2, 1),
            background 180ms cubic-bezier(.2, .8, .2, 1),
            transform 180ms cubic-bezier(.2, .8, .2, 1);
    }

    .md-bottom-nav__item::before {
        content: "";
        position: absolute;
        top: 3px;
        left: 50%;
        width: 24px;
        height: 3px;
        border-radius: 999px;
        opacity: 0;
        background:
            linear-gradient(90deg, #5f7cff, #9d63ff, #16d9e3);
        box-shadow: 0 0 15px rgba(95, 124, 255, 0.8);
        transform: translateX(-50%) scaleX(0.4);
        transition:
            opacity 180ms ease,
            transform 180ms ease;
    }

    .md-bottom-nav__item.is-active {
        color: #ffffff !important;
        background:
            linear-gradient(
                145deg,
                rgba(95, 124, 255, 0.21),
                rgba(140, 92, 255, 0.11)
            ) !important;
    }

    .md-bottom-nav__item.is-active::before {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }

    .md-bottom-nav__item:active {
        transform: scale(0.92) !important;
    }

    .md-bottom-nav__icon {
        width: 23px;
        height: 23px;
        display: grid;
        place-items: center;
        transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
    }

    .md-bottom-nav__item.is-active .md-bottom-nav__icon {
        transform: translateY(-1px) scale(1.06);
        filter: drop-shadow(0 4px 8px rgba(95, 124, 255, 0.4));
    }

    .md-bottom-nav__icon svg {
        width: 100%;
        height: 100%;
        display: block;
        fill: currentColor;
    }

    .md-bottom-nav__label {
        width: 100%;
        overflow: hidden;
        font-size: 10px;
        font-weight: 750;
        line-height: 1.15;
        letter-spacing: -0.01em;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Panel Más */

    .md-more-overlay {
        position: fixed;
        z-index: 9100;
        inset: 0;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding:
            18px
            12px
            calc(92px + env(safe-area-inset-bottom));
        visibility: hidden;
        opacity: 0;
        background: rgba(1, 4, 11, 0.68);
        backdrop-filter: blur(7px);
        -webkit-backdrop-filter: blur(7px);
        transition:
            opacity 220ms ease,
            visibility 220ms ease;
    }

    .md-more-overlay[hidden] {
        display: none;
    }

    .md-more-overlay.is-open {
        visibility: visible;
        opacity: 1;
    }

    .md-more-sheet {
        width: min(100%, 520px);
        max-height: min(70vh, 560px);
        overflow: auto;
        padding: 8px 14px 16px;
        border: 1px solid rgba(255, 255, 255, 0.11);
        border-radius: 26px;
        color: #f7f9ff;
        background:
            radial-gradient(
                circle at 85% 0%,
                rgba(106, 91, 255, 0.17),
                transparent 34%
            ),
            linear-gradient(
                145deg,
                rgba(22, 31, 52, 0.99),
                rgba(8, 13, 25, 0.99)
            );
        box-shadow:
            0 28px 80px rgba(0, 0, 0, 0.58),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        transform: translateY(28px) scale(0.98);
        transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
    }

    .md-more-overlay.is-open .md-more-sheet {
        transform: translateY(0) scale(1);
    }

    .md-more-sheet__handle {
        width: 42px;
        height: 4px;
        margin: 1px auto 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
    }

    .md-more-sheet__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 14px;
        padding: 0 3px;
    }

    .md-more-sheet__header strong {
        display: block;
        margin-bottom: 3px;
        color: #ffffff;
        font-size: 1.15rem;
        letter-spacing: -0.025em;
    }

    .md-more-sheet__header span {
        color: #909cb6;
        font-size: 0.79rem;
    }

    .md-more-sheet__close {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px !important;
        display: grid;
        place-items: center;
        margin: 0;
        padding: 10px;
        color: #c5cde0;
        border: 1px solid rgba(255, 255, 255, 0.09) !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.055) !important;
        box-shadow: none !important;
    }

    .md-more-sheet__close svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .md-more-sheet__menu {
        display: grid;
        gap: 8px;
    }

    .md-more-sheet__link {
        min-height: 58px;
        display: grid;
        grid-template-columns: 40px 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        color: #f0f3fb !important;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.045);
        text-decoration: none !important;
        transition:
            transform 170ms ease,
            border-color 170ms ease,
            background 170ms ease;
    }

    .md-more-sheet__link:active {
        transform: scale(0.98);
        background: rgba(95, 124, 255, 0.12);
    }

    .md-more-sheet__link-icon {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        padding: 9px;
        color: #aebaff;
        border-radius: 12px;
        background: rgba(95, 124, 255, 0.12);
    }

    .md-more-sheet__link-icon svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .md-more-sheet__arrow {
        color: #758099;
        font-size: 1.5rem;
        font-weight: 300;
    }

    .md-more-sheet__link.is-danger {
        color: #ffc4ce !important;
        border-color: rgba(255, 95, 120, 0.10);
        background: rgba(255, 95, 120, 0.055);
    }

    .md-more-sheet__link.is-danger .md-more-sheet__link-icon {
        color: #ff91a3;
        background: rgba(255, 95, 120, 0.10);
    }

    .md-more-sheet__empty {
        margin: 0;
        padding: 18px;
        color: #909cb6;
        text-align: center;
    }
}

@media (max-width: 370px) {
    .md-bottom-nav {
        right: 6px;
        left: 6px;
    }

    .md-bottom-nav__inner {
        padding-right: 3px;
        padding-left: 3px;
        border-radius: 19px;
    }

    .md-bottom-nav__item {
        padding-right: 1px;
        padding-left: 1px;
    }

    .md-bottom-nav__label {
        font-size: 9px;
    }

    .md-bottom-nav__icon {
        width: 21px;
        height: 21px;
    }
}

/* ===== MDPRIME BOTTOM NAV V1: END ===== */

/* ===== MDPRIME PWA INSTALL BUTTON V1: START ===== */

.md-pwa-install-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 10px;
    padding: 9px 14px;
    color: #dce4ff;
    border: 1px solid rgba(107, 126, 255, 0.28);
    border-radius: 13px;
    background:
        linear-gradient(
            145deg,
            rgba(95, 124, 255, 0.15),
            rgba(140, 92, 255, 0.09)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 8px 20px rgba(0, 0, 0, 0.15);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.md-pwa-install-button:hover,
.md-pwa-install-button.is-ready {
    color: #ffffff;
    border-color: rgba(107, 126, 255, 0.58);
    background:
        linear-gradient(
            145deg,
            rgba(95, 124, 255, 0.28),
            rgba(140, 92, 255, 0.18)
        );
    box-shadow:
        0 10px 28px rgba(64, 81, 214, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.md-pwa-install-button:active {
    transform: scale(0.96);
}

.md-pwa-install-button.is-waiting {
    opacity: 0.75;
}

.md-pwa-install-button__icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
}

.md-pwa-install-button__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.md-pwa-install-button[hidden] {
    display: none !important;
}

/* Modal de instrucciones para iPhone/iPad */

.md-pwa-ios-overlay {
    position: fixed;
    z-index: 12000;
    inset: 0;
    display: grid;
    place-items: center;
    padding:
        20px
        14px
        calc(20px + env(safe-area-inset-bottom));
    visibility: hidden;
    opacity: 0;
    background: rgba(1, 4, 11, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        opacity 200ms ease,
        visibility 200ms ease;
}

.md-pwa-ios-overlay.is-visible {
    visibility: visible;
    opacity: 1;
}

.md-pwa-ios-modal {
    position: relative;
    width: min(100%, 430px);
    padding: 30px 24px 24px;
    color: #f7f9ff;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 26px;
    background:
        radial-gradient(
            circle at 80% 5%,
            rgba(111, 91, 255, 0.20),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(20, 29, 49, 0.99),
            rgba(7, 12, 23, 0.99)
        );
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.60);
    transform: translateY(18px) scale(0.98);
    transition: transform 200ms ease;
}

.md-pwa-ios-overlay.is-visible .md-pwa-ios-modal {
    transform: translateY(0) scale(1);
}

.md-pwa-ios-close {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 10px;
    color: #bdc7dc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.md-pwa-ios-close svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.md-pwa-ios-logo {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    color: #ffffff;
    border-radius: 21px;
    background: linear-gradient(135deg, #5f7cff, #8c5cff);
    box-shadow: 0 16px 36px rgba(95, 124, 255, 0.30);
    font-size: 31px;
    font-weight: 900;
}

.md-pwa-ios-modal h2 {
    margin: 0 0 10px;
    text-align: center;
}

.md-pwa-ios-modal p {
    margin: 0 0 18px;
    color: #aeb8cd;
    text-align: center;
    line-height: 1.5;
}

.md-pwa-ios-modal ol {
    margin: 0 0 23px;
    padding-left: 24px;
    color: #d8deeb;
    line-height: 1.7;
}

.md-pwa-ios-modal li + li {
    margin-top: 7px;
}

.md-pwa-ios-understood {
    width: 100%;
    min-height: 50px;
    color: #ffffff;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #5f7cff, #8c5cff);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 768px) {
    .topbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .md-pwa-install-button {
        order: 20;
        width: 100%;
        min-height: 44px;
        margin: 4px 0 0;
    }
}

/* ===== MDPRIME PWA INSTALL BUTTON V1: END ===== */

/* =========================================================
   MDPRIME — APPS, AGENDA Y SOPORTE
   ========================================================= */

.mdp-section-page {
    min-height: 100vh;
    padding:
        max(22px, env(safe-area-inset-top))
        18px
        calc(110px + env(safe-area-inset-bottom));
    color: #f7f8ff;
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(60, 91, 255, 0.24),
            transparent 34%
        ),
        radial-gradient(
            circle at 95% 15%,
            rgba(165, 53, 255, 0.18),
            transparent 35%
        ),
        #070914;
}

.mdp-section-header,
.mdp-section-content {
    width: min(100%, 1080px);
    margin-inline: auto;
}

.mdp-section-header {
    display: grid;
    gap: 24px;
    margin-bottom: 28px;
}

.mdp-section-header h1 {
    margin: 7px 0 8px;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.05;
}

.mdp-section-header p {
    margin: 0;
    color: rgba(244, 246, 255, 0.7);
}

.mdp-eyebrow {
    display: inline-block;
    color: #9bacff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.mdp-back-button {
    width: fit-content;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
}

.mdp-section-content {
    display: grid;
    gap: 18px;
}

.mdp-grid,
.mdp-support-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}

.mdp-info-card,
.mdp-support-item,
.mdp-event-card,
.mdp-large-link {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.09),
            rgba(255, 255, 255, 0.035)
        );
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

.mdp-info-card {
    display: flex;
    gap: 16px;
    padding: 22px;
}

.mdp-info-card h2,
.mdp-event-card h2 {
    margin: 0 0 9px;
}

.mdp-info-card p {
    margin: 0;
    color: rgba(244, 246, 255, 0.72);
    line-height: 1.65;
}

.mdp-featured {
    border-color: rgba(114, 134, 255, 0.45);
}

.mdp-card-icon {
    flex: 0 0 auto;
    font-size: 2rem;
}

.mdp-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 18px;
    padding: 15px 17px;
    border-radius: 15px;
    background: rgba(5, 7, 18, 0.72);
}

.mdp-code-box span {
    color: rgba(255, 255, 255, 0.62);
}

.mdp-code-box strong {
    font-size: 1.4rem;
    letter-spacing: 0.08em;
}

.mdp-steps {
    margin: 12px 0 0;
    padding-left: 22px;
    color: rgba(244, 246, 255, 0.78);
    line-height: 1.8;
}

.mdp-agenda-list {
    display: grid;
    gap: 13px;
}

.mdp-event-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
}

.mdp-event-number {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    font-size: 1.1rem;
    font-weight: 900;
    background:
        linear-gradient(145deg, #445bff, #913cff);
}

.mdp-event-main {
    min-width: 0;
}

.mdp-event-sport {
    display: inline-block;
    margin-bottom: 6px;
    color: #aab7ff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mdp-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    color: rgba(244, 246, 255, 0.68);
    font-size: 0.9rem;
}

.mdp-support-item {
    padding: 0;
    overflow: hidden;
}

.mdp-support-item summary {
    padding: 19px;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.mdp-support-item summary::-webkit-details-marker {
    display: none;
}

.mdp-support-item > div {
    padding: 0 19px 19px;
    color: rgba(244, 246, 255, 0.72);
    line-height: 1.65;
}

.mdp-large-link {
    display: grid;
    gap: 5px;
    padding: 21px;
    color: #fff;
    text-decoration: none;
}

.mdp-large-link > span {
    font-size: 1.8rem;
}

.mdp-large-link small {
    color: rgba(244, 246, 255, 0.62);
}

.mdp-warning-card {
    border-color: rgba(255, 183, 77, 0.42);
}

@media (max-width: 640px) {
    .mdp-section-page {
        padding-inline: 14px;
    }

    .mdp-info-card {
        padding: 18px;
    }

    .mdp-event-card {
        align-items: flex-start;
    }

    .mdp-event-number {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
}


/* ===== MDPRIME LOADING OVERLAY 20260803 ===== */

.md-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        rgba(5,10,22,.88);
    backdrop-filter: blur(8px);
}

.md-loading-box {
    text-align:center;
    color:white;
    padding:30px;
}

.md-loading-spinner {
    width:55px;
    height:55px;
    margin:0 auto 20px;
    border-radius:50%;
    border:4px solid rgba(255,255,255,.15);
    border-top-color:#5f7cff;
    border-right-color:#9b5cff;
    animation: mdSpin 0.8s linear infinite;
}

.md-loading-title {
    font-size:18px;
    font-weight:800;
}

.md-loading-text {
    margin-top:8px;
    color:#aab4cc;
    font-size:14px;
}


@keyframes mdSpin {
    to {
        transform:rotate(360deg);
    }
}

/* ===== END LOADING ===== */



.public-secondary:hover {
    background: linear-gradient(135deg,#6d5cff,#3aa8ff) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
}



/* CONTABILIDAD MDPRIME */

.main .card strong{
    display:block;
    font-size:32px;
    margin-top:12px;
}


.main .card h3{
    margin-bottom:10px;
}




/* ACCIONES CONTABILIDAD */

.actions .action{
    color:white;
    text-decoration:none;
    font-weight:800;
    font-size:16px;
    transition:.2s;
}


.actions .action:hover{
    transform:translateY(-4px);
}




/* HISTORIAL CONTABILIDAD */

.history-item{
    background:rgba(16,20,38,.86);
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    padding:20px;
}


.history-item h2{
    margin:0 0 8px;
}


.history-price{
    font-size:24px;
    font-weight:900;
}




/* GRAFICOS MDPRIME */

canvas{
    background:transparent !important;
}




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


@media(max-width:768px){


body{
    padding:15px !important;
}


/* Layout principal */

.layout{
    display:block !important;
}


/* Menu lateral */

.sidebar{

    width:100% !important;
    position:relative !important;
    height:auto !important;
    margin-bottom:20px;

}


.nav{

    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:10px;

}


.nav a{

    padding:12px !important;
    font-size:14px;

}


/* Contenido */

.main{

    width:100% !important;
    padding:10px !important;

}


/* Tarjetas */

.card,
.dashboard-card{

    width:100% !important;
    margin-bottom:15px;

}


/* Grids */

.grid{

    grid-template-columns:1fr !important;

}


/* Tablas */

table{

    display:block;
    overflow-x:auto;
    white-space:nowrap;

}


/* Formularios */

input,
select,
textarea,
button{

    width:100% !important;
    box-sizing:border-box;

}


/* Botones */

button,
.action{

    min-height:45px;

}


/* Titulos */

h1{

    font-size:24px !important;

}


h2{

    font-size:20px !important;

}


/* Graficos */

canvas{

    max-width:100% !important;
    height:auto !important;

}


}


/* Telefonos pequeños */

@media(max-width:420px){


.nav{

    grid-template-columns:1fr;

}


.brand{

    text-align:center;

}


.card{

    padding:15px !important;

}


}



/* MENU MOVIL */

.mobile-menu-btn{

display:none;

}


@media(max-width:768px){


.mobile-menu-btn{

display:block;
position:fixed;
top:15px;
right:15px;
z-index:9999;

background:#2563eb;
color:white;

border:0;
border-radius:12px;

font-size:25px;
padding:10px 15px;

}


.sidebar{

display:none;

}


.sidebar.open{

display:block;

}


.layout{padding-top:0!important;}


}



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


.login-card{

background:#182338;
padding:40px;
border-radius:20px;
width:350px;
box-sizing:border-box;

}



.login-card input{

width:100%;
padding:14px;
margin:10px 0;
border-radius:10px;
border:1px solid rgba(255,255,255,.15);
background:#0b1220;
color:white;

}



.login-card button{

width:100%;
padding:15px;
background:#2563eb;
color:white;
border:0;
border-radius:10px;
font-weight:bold;
cursor:pointer;

}



@media(max-width:600px){


.login-card{

width:100%;
max-width:360px;
padding:25px;

}


.login-card h2{

text-align:center;
font-size:22px;

}


}



/* CONFIRMACION ELIMINAR */

.confirm-card{

background:#182338;
padding:30px;
border-radius:15px;
text-align:center;
}


.confirm-card a{

display:inline-block;
padding:15px 25px;
border-radius:10px;
text-decoration:none;
margin:10px;
font-weight:bold;

}


.confirm-delete{

background:#dc2626;
color:white;

}


.confirm-cancel{

background:#2563eb;
color:white;

}


@media(max-width:600px){

.confirm-card{

padding:20px;

}


.confirm-card a{

display:block;
width:100%;
box-sizing:border-box;
margin:10px 0;

}

}



/* ===============================
   MDPRIME PANEL RESPONSIVE FINAL
   =============================== */


@media(max-width:768px){


body{
    padding:10px !important;
    overflow-x:hidden;
}


/* CABECERAS */

h1{
    font-size:24px !important;
}

h2{
    font-size:20px !important;
}

h3{
    font-size:17px !important;
}



/* LAYOUT */

.layout{
    display:block !important;
}


.sidebar{

    position:relative !important;
    width:100% !important;
    margin-bottom:20px;

}


.main{

    width:100% !important;
    padding:10px !important;

}



/* TARJETAS */

.card,
.panel,
.box{

    width:100% !important;
    box-sizing:border-box;

}



/* TABLAS */

table{

    display:block;
    overflow-x:auto;
    white-space:nowrap;

}


th,
td{

    padding:10px !important;

}



/* FORMULARIOS */

input,
select,
textarea,
button{

    width:100% !important;
    box-sizing:border-box;

}


textarea{

    min-height:180px;

}



/* BOTONES */

button,
.action,
a.btn{

    display:block;
    text-align:center;
    margin:10px 0;

}



/* GRID */

.grid,
.cards,
.stats,
.public-options{

    grid-template-columns:1fr !important;

}



/* GRAFICOS */

canvas{

    max-width:100% !important;
    height:auto !important;

}



}




/* ===============================
   LOGIN MOBILE FINAL
   =============================== */


.login-page{

min-height:100vh;
display:flex;
justify-content:center;
align-items:center;
background:#0b1220;
padding:20px;

}


.login-card{

background:#182338;
padding:40px;
border-radius:20px;
width:350px;
max-width:100%;
box-sizing:border-box;
box-shadow:0 20px 60px rgba(0,0,0,.4);

}


.login-card h2{

color:white;
text-align:center;
margin-bottom:25px;

}


.login-card input{

width:100%;
padding:15px;
margin:10px 0;
border-radius:10px;
border:1px solid rgba(255,255,255,.15);
background:#0b1220;
color:white;
font-size:16px;
box-sizing:border-box;

}


.login-card button{

width:100%;
padding:15px;
margin-top:15px;
border:0;
border-radius:10px;
background:#2563eb;
color:white;
font-size:16px;
font-weight:bold;

}


@media(max-width:600px){


.login-page{

padding:15px;

}


.login-card{

width:100%;
padding:25px;

}


.login-card h2{

font-size:22px;

}


}




/* ===============================
   MENU MOBILE FUNCIONAL
   =============================== */


.mobile-menu-btn{

display:none;

}


@media(max-width:768px){


.mobile-menu-btn{

display:block;
position:fixed;
top:15px;
left:15px;
z-index:9999;

width:55px;
height:55px;

border:0;
border-radius:15px;

background:linear-gradient(135deg,#6366f1,#a855f7);

color:white;

font-size:28px;

cursor:pointer;

}



/* OCULTAR MENU */

.sidebar{

position:fixed !important;

top:0;
left:-280px;

width:260px !important;

height:100vh;

z-index:9998;

transition:.3s ease;

background:#111827;

}


/* ABRIR MENU */

.sidebar.open{

left:0 !important;

}



/* CONTENIDO */

.main{

width:100% !important;

padding-top:10px !important;

}



/* TARJETAS DASHBOARD */

.card,
.stat-card,
.dashboard-card{

padding:18px !important;

}



/* BOTONES */

.action,
button{

font-size:15px !important;

}


/* CLIENTES */

.user-card,
.card{

overflow:hidden;

}


/* EVITAR DESBORDES */

*{

max-width:100%;

}


}



/* ==================================
   MDPRIME MOBILE FINAL LIMPIO
   ================================== */


@media(max-width:768px){


body{
    margin:0 !important;
    padding:12px !important;
    overflow-x:hidden;
}



/* LAYOUT */

.layout{
    display:block !important;
}



.sidebar{

    position:relative !important;
    left:auto !important;
    width:100% !important;
    height:auto !important;
    min-height:auto !important;
    margin-bottom:20px;

    border-radius:18px;

}


.nav{

    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:10px;

}


.nav a{

    padding:14px 8px !important;
    text-align:center;
    font-size:14px;

}



/* CONTENIDO */

.main{

    width:100% !important;
    padding:0 !important;

}



/* TITULOS */

h1{

    font-size:22px !important;
}


h2{

    font-size:20px !important;

}



/* TARJETAS */

.card,
.stat-card,
.dashboard-card,
.public-option{

    width:100% !important;
    box-sizing:border-box;
    padding:18px !important;
    margin-bottom:15px;

}



/* FORMULARIOS */


input,
textarea,
select,
button{

    width:100% !important;
    box-sizing:border-box;
    font-size:16px !important;

}


textarea{

    min-height:180px;

}



/* TABLAS */

table{

    display:block;
    overflow-x:auto;
    white-space:nowrap;

}



/* LOGIN */


.login-page{

    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:15px !important;

}



.login-card{

    width:100% !important;
    max-width:330px !important;
    padding:25px !important;
    box-sizing:border-box;

}


.login-card h2{

    font-size:22px !important;
    text-align:center;

}




/* BOTONES */

button,
.action,
a.button{

    border-radius:12px !important;

}



/* VOLVER */

.back-button{

    display:block;
    margin-bottom:15px;
    width:100%;
    text-align:center;

}


}



/* ================================
   MDPRIME APP MOBILE V2
   ================================ */


@media(max-width:768px){


body{
margin:0!important;
padding:12px!important;
font-size:15px;
}



/* MENU SUPERIOR NORMAL */

.sidebar{

position:relative!important;
left:auto!important;
top:auto!important;
width:100%!important;
height:auto!important;
border-radius:20px;
margin-bottom:15px;

}


.brand{

text-align:center;
font-size:20px!important;

}


.nav{

display:grid!important;
grid-template-columns:repeat(2,1fr);
gap:8px;

}


.nav a{

font-size:13px!important;
padding:12px 5px!important;
text-align:center;

}



/* CONTENIDO */

.main{

padding:0!important;
width:100%!important;

}



/* TARJETAS */


.card,
.stat-card,
.dashboard-card,
.public-option{

border-radius:18px!important;
width:100%!important;
box-sizing:border-box;
padding:18px!important;

}



/* LOGIN */


.login-page{

padding:15px!important;

}


.login-card{

width:100%!important;
max-width:340px!important;
padding:25px!important;
margin:auto;

}


.login-card input,
.login-card button{

height:48px;

}



/* TABLAS */

table{

width:100%!important;
font-size:13px;

}


.table-container{

overflow-x:auto;

}



/* BOTONES */

button,
a{

max-width:100%;
box-sizing:border-box;

}



}



/* BOTON VOLVER */

.btn-back{

display:inline-block;
margin-bottom:15px;
padding:12px 18px;
border-radius:12px;
background:#2563eb;
color:white;
text-decoration:none;
font-weight:bold;

}


@media(max-width:768px){

.btn-back{

width:100%;
text-align:center;
box-sizing:border-box;

}

}



/* ===============================
   CABECERA MOBILE APP
   =============================== */


.mobile-header{
display:none;
}



@media(max-width:768px){


.mobile-header{

display:flex;
justify-content:center;
align-items:center;
margin-bottom:20px;
padding:15px;

background:rgba(20,25,45,.95);
border-radius:18px;

}


.mobile-brand{

font-size:18px;
font-weight:900;
text-align:center;

}


.mobile-brand span{

display:block;
font-size:12px;
color:#36d7ff;
margin-top:5px;

}


.main{

padding-top:0!important;

}



.nav a{

font-size:15px!important;
padding:14px!important;

}


}



/* ===============================
   MENU INFERIOR MOBILE
   =============================== */


.mobile-bottom-menu{
display:none;
}



@media(max-width:768px){


.mobile-bottom-menu{

display:flex;

position:fixed;

bottom:0;
left:0;
right:0;

height:65px;

background:#111827;

border-top:1px solid rgba(255,255,255,.15);

z-index:9999;

justify-content:space-around;

align-items:center;

}


.mobile-bottom-menu a{

color:white;

text-decoration:none;

font-size:11px;

text-align:center;

}


.mobile-bottom-menu span{

display:block;

font-size:22px;

}


.main{

padding-bottom:90px!important;

}


}




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


.history-list{
display:flex;
flex-direction:column;
gap:15px;
}



.history-item{

display:flex;
justify-content:space-between;
align-items:center;
gap:20px;

background:#182338;

padding:20px;

border-radius:18px;

}



.history-price{

text-align:right;
font-size:22px;
font-weight:900;

}



.inline-button{

display:inline-flex;

align-items:center;
justify-content:center;

min-width:45px;
height:40px;

border-radius:10px;

margin-top:10px;

}



@media(max-width:768px){


.history-item{

display:block;

padding:16px;

}



.history-item h2{

font-size:18px;

}



.history-price{

margin-top:15px;

text-align:left;

font-size:20px;

}



.inline-button{

width:48%;

margin-right:1%;

}



.card form{

display:flex;

flex-direction:column;

gap:10px;

}



.card input,
.card button{

width:100%;

box-sizing:border-box;

}



}




/* =================================
   MOVIMIENTOS MOBILE FINAL
   ================================= */


.history-item{

background:rgba(24,35,56,.95);
border-radius:18px;
padding:20px;
border:1px solid rgba(255,255,255,.08);

}


.history-price{

font-size:20px;
font-weight:bold;

}


.inline-button{

padding:10px 14px!important;
border-radius:10px!important;

}



@media(max-width:768px){


.history-list{

gap:12px;

}


.history-item{

display:flex;
flex-direction:column;
align-items:stretch;
padding:16px;

}


.history-item h2{

font-size:18px!important;

}


.history-price{

width:100%;
text-align:center;
margin-top:15px;

}


.inline-button{

display:inline-block;
width:45%;
margin:5px 1%;
box-sizing:border-box;
text-align:center;

}


.card form{

display:flex;
flex-direction:column;
gap:10px;

}


.card input,
.card button{

width:100%!important;
box-sizing:border-box;

}


}



/* =================================
   USUARIOS MOBILE FINAL
   ================================= */


.user-card{

background:rgba(24,35,56,.95);
border-radius:18px;
padding:18px;
margin-bottom:15px;
border:1px solid rgba(255,255,255,.08);

}


@media(max-width:768px){


.user-card{

width:100%;
box-sizing:border-box;
padding:16px;

}


.user-card h2{

font-size:18px!important;

}


.user-card a,
.user-card button{

display:block;
width:100%;
margin-top:10px;
box-sizing:border-box;
text-align:center;

}


}



/* =================================
   USUARIOS MOBILE FINAL
   ================================= */


.user-card{

background:rgba(24,35,56,.95);
border-radius:18px;
padding:18px;
margin-bottom:15px;
border:1px solid rgba(255,255,255,.08);

}


@media(max-width:768px){


.user-card{

width:100%;
box-sizing:border-box;
padding:16px;

}


.user-card h2{

font-size:18px!important;

}


.user-card a,
.user-card button{

display:block;
width:100%;
margin-top:10px;
box-sizing:border-box;
text-align:center;

}


}



/* =================================
   USUARIOS MOBILE V2 FINAL
   ================================= */


.usuario-card,
.user-card{

background:rgba(24,35,56,.95);
border-radius:18px;
padding:18px;
margin-bottom:15px;
border:1px solid rgba(255,255,255,.10);

}


@media(max-width:768px){


.usuario-card,
.user-card{

width:100%;
padding:16px;
box-sizing:border-box;

}


.usuario-card h1,
.usuario-card h2,
.user-card h1,
.user-card h2{

font-size:18px!important;

}


.usuario-card table,
.user-card table{

display:block;
overflow-x:auto;

}


.usuario-card a,
.user-card a{

display:block;
width:100%;
text-align:center;
margin-top:10px;
box-sizing:border-box;

}


}



/* =================================
   CONTABILIDAD MOBILE FINAL
   ================================= */


@media(max-width:768px){


.topbar h1{

font-size:22px!important;

}


/* FILTROS */

.actions{

display:grid!important;
grid-template-columns:repeat(2,1fr);
gap:10px!important;

}


.action{

padding:12px!important;
text-align:center;
font-size:14px!important;

}


/* TARJETAS RESUMEN */

.grid{

display:block!important;

}


.grid .card{

margin-bottom:15px;

}


.grid .card strong{

font-size:25px!important;

}


/* INFORMES */

.card .actions a{

min-height:55px;
display:flex;
align-items:center;
justify-content:center;

}


/* GRAFICOS */

canvas{

max-width:100%!important;
height:auto!important;

}


}



/* =================================
   CONTABILIDAD TABLAS MOBILE
   ================================= */


@media(max-width:768px){


table{

width:100%;
display:block;
overflow-x:auto;
white-space:nowrap;

}


table th,
table td{

padding:10px!important;
font-size:14px!important;

}


/* TOP CLIENTES */

.card table{

border-radius:12px;

}


/* GRAFICO */

#graficoContabilidad{

max-height:300px!important;

}


}




/* =================================
   ESTADISTICAS MOBILE FINAL
   ================================= */


@media(max-width:768px){


canvas{

width:100%!important;
height:auto!important;

}


.chart-container{

width:100%!important;
overflow:hidden;

}


.card h2{

font-size:20px!important;

}


.grid{

display:block!important;

}


.grid .card{

margin-bottom:15px;

}


table{

display:block;
overflow-x:auto;
white-space:nowrap;

}


}



/* =================================
   DASHBOARD MOBILE FINAL
   ================================= */


@media(max-width:768px){


.main h1{

font-size:24px!important;

}


.grid,
.stats-grid{

display:block!important;

}


.grid .card,
.stats-grid .card{

margin-bottom:15px;

}


.card strong{

font-size:26px!important;

}


.actions{

display:grid!important;
grid-template-columns:1fr!important;
gap:12px!important;

}


.action{

width:100%;
box-sizing:border-box;
text-align:center;

}


}



/* =================================
   NAVEGACION INFERIOR MOBILE
   ================================= */


.mobile-bottom-nav{

display:none;

}


@media(max-width:768px){


.mobile-bottom-nav{

display:flex;
position:fixed;
bottom:0;
left:0;
right:0;

height:70px;

background:#111827;
border-top:1px solid rgba(255,255,255,.12);

z-index:9999;

justify-content:space-around;
align-items:center;

}


.mobile-bottom-nav a{

color:white;
text-decoration:none;

font-size:12px;

display:flex;
flex-direction:column;
align-items:center;
gap:5px;

}


.mobile-bottom-nav span{

font-size:11px;

}


/* dejamos espacio para la barra */

.main{

padding-bottom:90px!important;

}


}


