/* =========================================================
   TRÁMITES MX - V2 VISUAL
   ========================================================= */
:root {
    --tm-primary: #2563eb;
    --tm-primary-dark: #1d4ed8;
    --tm-secondary: #0f172a;
    --tm-accent: #06b6d4;
    --tm-bg: #f5f7fb;
    --tm-card: rgba(255,255,255,.92);
    --tm-text: #0f172a;
    --tm-muted: #64748b;
    --tm-border: #e2e8f0;
    --tm-radius: 18px;
    --tm-shadow: 0 18px 45px rgba(15,23,42,.08);
}

html { scroll-behavior: smooth; }

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--tm-text);
    background: var(--tm-bg);
}

.navbar-tm {
    background: rgba(15,23,42,.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(15,23,42,.12);
}

.navbar-tm .navbar-brand {
    font-weight: 800;
    letter-spacing: -.03em;
}

.hero-tm {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 90px 0 105px;
    background:
        radial-gradient(circle at 15% 15%, rgba(6,182,212,.30), transparent 32%),
        radial-gradient(circle at 85% 25%, rgba(99,102,241,.34), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #172554 52%, #1d4ed8 100%);
}

.hero-tm::before,
.hero-tm::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(3px);
    opacity: .55;
}

.hero-tm::before {
    width: 320px;
    height: 320px;
    right: -100px;
    bottom: -160px;
    background: rgba(6,182,212,.24);
}

.hero-tm::after {
    width: 240px;
    height: 240px;
    left: -90px;
    top: -100px;
    background: rgba(99,102,241,.24);
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.10);
    border-radius: 999px;
    font-size: .88rem;
    margin-bottom: 18px;
}

.hero-tm h1 {
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.hero-tm .lead {
    color: rgba(255,255,255,.78);
    max-width: 680px;
}

.btn-tm {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--tm-primary), var(--tm-accent));
    box-shadow: 0 12px 28px rgba(37,99,235,.28);
    transition: .2s ease;
}

.btn-tm:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(37,99,235,.35);
}

.tramite-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(226,232,240,.9);
    border-radius: var(--tm-radius);
    background: var(--tm-card);
    box-shadow: var(--tm-shadow);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.tramite-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 55px rgba(15,23,42,.13);
    border-color: rgba(37,99,235,.25);
}

.tramite-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--tm-primary);
    background: linear-gradient(135deg, #dbeafe, #cffafe);
    font-size: 1.5rem;
}

.category-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .75rem;
    font-weight: 700;
}

.section-title {
    font-weight: 850;
    letter-spacing: -.035em;
}

.section-subtitle {
    color: var(--tm-muted);
}

.feature-card {
    border: 0;
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 1.2rem;
}

.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: #0f172a;
}

.admin-sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 12px;
    margin-bottom: 5px;
    padding: 10px 12px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.10);
}

.admin-stat {
    border: 0;
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
}

.form-control, .form-select {
    border-radius: 12px;
    border-color: var(--tm-border);
    padding: .72rem .9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 .22rem rgba(37,99,235,.12);
}

.card {
    border-radius: var(--tm-radius);
}

.footer-tm {
    background: #0f172a;
    color: #94a3b8;
}

@media (max-width: 767.98px) {
    .hero-tm { padding: 65px 0 75px; }
    .hero-tm h1 { font-size: 2.35rem; }
}


/* =========================================================
   RESPONSIVE UI - ADMIN + CLIENTE
   ========================================================= */
.admin-topbar { min-height: 58px; }
.admin-menu-toggle, .client-menu-toggle { border-radius: 10px; }
.admin-mobile-menu, .client-mobile-menu { width: min(86vw, 330px); }
.admin-mobile-links .nav-link { display:flex; align-items:center; gap:12px; color:#334155; border-radius:12px; padding:11px 12px; margin-bottom:4px; }
.admin-mobile-links .nav-link i { width:22px; text-align:center; font-size:1.05rem; }
.admin-mobile-links .nav-link:hover, .admin-mobile-links .nav-link.active { color:#1d4ed8; background:#eff6ff; }
.client-mobile-links a { color:#334155; text-decoration:none; border-radius:12px; padding:12px 13px; display:flex; align-items:center; gap:12px; margin-bottom:5px; }
.client-mobile-links a:hover { background:#eff6ff; color:#1d4ed8; }
.client-mobile-links i { width:22px; text-align:center; }
.table-responsive { -webkit-overflow-scrolling:touch; }
.admin-sidebar { position:sticky; top:0; align-self:flex-start; height:calc(100vh - 58px); overflow-y:auto; }
.client-side { position:sticky; top:0; align-self:flex-start; height:calc(100vh - 72px); overflow-y:auto; }
@media (max-width: 991.98px) { .admin-sidebar { display:none !important; } main.col-lg-10 { width:100%; max-width:100%; } }
@media (max-width: 767.98px) {
  .admin-topbar .navbar-brand { font-size:1rem; } .admin-topbar .navbar-brand i { margin-right:.35rem !important; }
  main.col-lg-10, .client-main { padding:1rem !important; } .client-main { width:100%; }
  .balance-card .amount { font-size:2rem; } .client-navbar .navbar-brand { font-size:1rem; } .client-navbar .btn-light { padding:.3rem .45rem; }
  .client-avatar { width:36px; height:36px; } .card-body.p-4 { padding:1.15rem !important; }
  .d-flex.justify-content-between.align-items-center.mb-4, .d-flex.justify-content-between.align-items-start.mb-4 { gap:1rem; flex-wrap:wrap; }
  .d-flex.justify-content-between.align-items-center.mb-4 > .btn, .d-flex.justify-content-between.align-items-start.mb-4 > .btn { width:100%; }
  .service-card .card-body { padding:1.15rem !important; } .client-table { border-radius:14px; } .table { font-size:.88rem; }
  .table th, .table td { white-space:nowrap; } .table-responsive { border-radius:14px; } .modal-dialog { margin:.75rem; } .modal-content { border-radius:16px; }
  .btn { min-height:40px; }
}
@media (max-width: 575.98px) {
  .admin-topbar { padding-top:.55rem; padding-bottom:.55rem; } .admin-topbar .btn-sm { padding:.42rem .55rem; }
  .client-navbar { padding-top:.55rem !important; padding-bottom:.55rem !important; } .client-navbar .badge { font-size:.78rem; }
  .client-navbar .dropdown-toggle::after { display:none; } .client-navbar .dropdown-toggle { padding:.2rem; }
  .hero-tm { padding:50px 0 60px; } .hero-tm h1 { font-size:2rem; } .display-6 { font-size:2rem; } .display-5 { font-size:2.2rem; }
  .offcanvas { --bs-offcanvas-width:min(86vw, 330px); }
}
