:root{
    --primario:#00A9B7;
    --primario-oscuro:#047A85;
    --fondo:#F4F8FA;
    --card:#FFFFFF;
    --texto:#111827;
    --muted:#6B7280;
    --border:#E5E7EB;
    --soft:#F8FAFC;
    --danger:#EF4444;
    --warning:#F59E0B;
    --success:#10B981;
    --blue:#3B82F6;
    --shadow:0 18px 45px rgba(15,23,42,.08);
    --shadow-sm:0 10px 28px rgba(15,23,42,.06);
    --radius:22px;
    --radius-sm:14px;
    --sidebar:286px;
  }
  
  *{
    box-sizing:border-box;
  }
  
  html{
    scroll-behavior:smooth;
  }
  
  body{
    margin:0;
    background:var(--fondo);
    color:var(--texto);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    font-size:14px;
    line-height:1.45;
  }
  
  a{
    color:inherit;
    text-decoration:none;
  }
  
  button,
  input,
  select,
  textarea{
    font:inherit;
  }
  
  img{
    max-width:100%;
    display:block;
  }
  
  /* ==========================================================
     LAYOUT GENERAL
  ========================================================== */
  
  .app-shell{
    min-height:100vh;
    display:flex;
    background:
      radial-gradient(circle at top left,rgba(0,169,183,.16),transparent 34%),
      var(--fondo);
  }
  
  .sidebar{
    width:var(--sidebar);
    position:fixed;
    inset:0 auto 0 0;
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(22px);
    border-right:1px solid rgba(229,231,235,.85);
    padding:22px;
    display:flex;
    flex-direction:column;
    z-index:30;
    box-shadow:10px 0 30px rgba(15,23,42,.04);
  }
  
  .main-panel{
    margin-left:var(--sidebar);
    width:calc(100% - var(--sidebar));
    padding:24px 28px 34px;
    min-height:100vh;
  }
  
  /* ==========================================================
     SIDEBAR
  ========================================================== */
  
  .brand-card{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px;
    border-radius:20px;
    background:linear-gradient(135deg,rgba(0,169,183,.12),rgba(255,255,255,.8));
    border:1px solid rgba(0,169,183,.16);
  }
  
  .brand-logo{
    width:48px;
    height:48px;
    border-radius:16px;
    background:linear-gradient(135deg,var(--primario),#54d6df);
    display:grid;
    place-items:center;
    color:white;
    font-weight:900;
    box-shadow:0 12px 25px rgba(0,169,183,.25);
  }
  
  .brand-title{
    font-weight:900;
    letter-spacing:-.02em;
  }
  
  .brand-subtitle,
  .mini-label,
  .page-kicker{
    font-size:12px;
    color:var(--muted);
  }
  
  .side-nav{
    display:grid;
    gap:7px;
    margin-top:22px;
  }
  
  .side-link{
    display:flex;
    align-items:center;
    gap:11px;
    padding:12px 13px;
    border-radius:16px;
    color:#334155;
    font-weight:700;
    transition:.2s ease;
  }
  
  .side-link:hover,
  .side-link.is-active{
    background:var(--texto);
    color:#fff;
    transform:translateX(2px);
    box-shadow:0 12px 30px rgba(17,24,39,.12);
  }
  
  .side-icon{
    width:25px;
    text-align:center;
    opacity:.9;
  }
  
  .side-footer-card{
    margin-top:auto;
    background:#0f172a;
    color:#fff;
    border-radius:20px;
    padding:16px;
    display:grid;
    gap:3px;
  }
  
  .side-footer-card .mini-label,
  .side-footer-card span{
    color:#cbd5e1;
    font-size:12px;
  }
  
  /* ==========================================================
     TOPBAR
  ========================================================== */
  
  .topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
  }
  
  .topbar h1{
    font-size:30px;
    line-height:1.1;
    margin:2px 0 0;
    letter-spacing:-.04em;
  }
  
  .topbar-actions{
    display:flex;
    align-items:center;
    gap:10px;
  }
  
  .icon-button,
  .notification-pill,
  .user-pill{
    border:1px solid var(--border);
    background:rgba(255,255,255,.82);
    backdrop-filter:blur(10px);
    border-radius:999px;
    min-height:44px;
  }
  
  .icon-button{
    width:44px;
    display:grid;
    place-items:center;
    cursor:pointer;
  }
  
  .notification-pill{
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 14px;
  }
  
  .notification-pill strong{
    display:grid;
    place-items:center;
    min-width:22px;
    height:22px;
    border-radius:999px;
    background:var(--primario);
    color:#fff;
    font-size:12px;
  }
  
  .user-pill{
    display:flex;
    align-items:center;
    gap:10px;
    padding:5px 12px 5px 5px;
  }
  
  .avatar{
    width:34px;
    height:34px;
    border-radius:999px;
    background:#E6FAFC;
    color:var(--primario-oscuro);
    display:grid;
    place-items:center;
    font-weight:900;
  }
  
  .user-text{
    display:grid;
  }
  
  .user-text span{
    font-size:11px;
    color:var(--muted);
  }
  
  /* ==========================================================
     GRID / CARDS
  ========================================================== */
  
  .content-grid{
    display:grid;
    gap:18px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-auto{
    display:grid;
    gap:18px;
  }
  
  .grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  
  .grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  
  .grid-4{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  
  .grid-auto{
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  }
  
  .card{
    background:rgba(255,255,255,.9);
    border:1px solid rgba(229,231,235,.86);
    border-radius:var(--radius);
    box-shadow:var(--shadow-sm);
    padding:20px;
  }
  
  .card-premium{
    background:linear-gradient(135deg,#fff,rgba(255,255,255,.76));
    box-shadow:var(--shadow);
  }
  
  .section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    margin-bottom:16px;
  }
  
  .section-head h2,
  .section-head h3{
    margin:0;
    font-size:20px;
    letter-spacing:-.03em;
  }
  
  .section-head p{
    margin:4px 0 0;
    color:var(--muted);
  }
  
  /* ==========================================================
     KPI BASE
  ========================================================== */
  
  .kpi{
    position:relative;
    overflow:hidden;
  }
  
  .kpi::after{
    content:"";
    position:absolute;
    right:-24px;
    top:-24px;
    width:92px;
    height:92px;
    border-radius:999px;
    background:rgba(0,169,183,.1);
  }
  
  .kpi span{
    display:block;
    color:var(--muted);
    font-weight:700;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
  }
  
  .kpi strong{
    display:block;
    font-size:30px;
    letter-spacing:-.04em;
    margin-top:8px;
  }
  
  .kpi small{
    color:var(--muted);
  }
  
  /* ==========================================================
     BUTTONS
  ========================================================== */
  
  .btn{
    border:0;
    border-radius:14px;
    min-height:42px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-weight:800;
    cursor:pointer;
    transition:.2s ease;
    white-space:nowrap;
  }
  
  .btn:hover{
    transform:translateY(-1px);
  }
  
  .btn-primary{
    background:linear-gradient(135deg,var(--primario),#25c4d0);
    color:#fff;
    box-shadow:0 12px 25px rgba(0,169,183,.22);
  }
  
  .btn-dark{
    background:#111827;
    color:#fff;
  }
  
  .btn-ghost{
    background:#fff;
    border:1px solid var(--border);
    color:#334155;
  }
  
  .btn-danger{
    background:#fee2e2;
    color:#b91c1c;
  }
  
  .btn-success{
    background:#dcfce7;
    color:#166534;
  }
  
  .btn-small{
    min-height:34px;
    padding:0 12px;
    border-radius:12px;
    font-size:12px;
  }
  
  .btn-full{
    width:100%;
  }
  
  /* ==========================================================
     FORMS / TABLES
  ========================================================== */
  
  .table-toolbar{
    display:flex;
    gap:10px;
    justify-content:space-between;
    align-items:center;
    margin-bottom:14px;
  }
  
  .search-input{
    position:relative;
    flex:1;
  }
  
  .search-input input,
  .form-control,
  input,
  select,
  textarea{
    width:100%;
    border:1px solid var(--border);
    background:#fff;
    border-radius:14px;
    min-height:44px;
    padding:10px 13px;
    outline:none;
    color:#111827;
  }
  
  .search-input input{
    padding-left:38px;
  }
  
  .search-input::before{
    content:"⌕";
    position:absolute;
    left:14px;
    top:10px;
    color:var(--muted);
  }
  
  textarea{
    min-height:100px;
    resize:vertical;
  }
  
  .form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
  }
  
  .form-grid-3{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
  }
  
  label{
    display:grid;
    gap:6px;
    color:#334155;
    font-weight:800;
    font-size:12px;
  }
  
  .form-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:16px;
  }
  
  .data-table-wrap{
    overflow:auto;
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
  }
  
  .data-table{
    width:100%;
    border-collapse:collapse;
    min-width:860px;
  }
  
  .data-table th{
    background:#F8FAFC;
    color:#475569;
    text-align:left;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
  }
  
  .data-table th,
  .data-table td{
    padding:14px;
    border-bottom:1px solid #eef2f7;
    vertical-align:middle;
  }
  
  .data-table tr:last-child td{
    border-bottom:0;
  }
  
  .data-table tbody tr:hover{
    background:#fbfdff;
  }
  
  .row-title{
    font-weight:900;
  }
  
  .row-sub{
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-top:2px;
  }
  
  .actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
  }
  
  /* ==========================================================
     BADGES / ALERTS
  ========================================================== */
  
  .badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
  }
  
  .estado-pendiente{
    background:#FEF3C7;
    color:#92400E;
  }
  
  .estado-confirmada{
    background:#D1FAE5;
    color:#065F46;
  }
  
  .estado-atendida{
    background:#DBEAFE;
    color:#1D4ED8;
  }
  
  .estado-cancelada{
    background:#FEE2E2;
    color:#B91C1C;
  }
  
  .estado-no-asistio{
    background:#E5E7EB;
    color:#374151;
  }
  
  .badge-soft{
    background:#F1F5F9;
    color:#334155;
  }
  
  .empty-state{
    text-align:center;
    padding:30px;
    color:var(--muted);
  }
  
  .alert{
    border-radius:16px;
    padding:13px 15px;
    margin-bottom:16px;
    font-weight:700;
  }
  
  .alert-ok{
    background:#D1FAE5;
    color:#065F46;
    border:1px solid #A7F3D0;
  }
  
  .alert-error{
    background:#FEE2E2;
    color:#991B1B;
    border:1px solid #FECACA;
  }
  
  .alert-info{
    background:#E0F2FE;
    color:#075985;
    border:1px solid #BAE6FD;
  }
  
  /* ==========================================================
     MODALS
  ========================================================== */
  
  .modal-backdrop{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.44);
    backdrop-filter:blur(8px);
    z-index:80;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
  }
  
  .modal-backdrop.show{
    display:flex;
  }
  
  .modal{
    width:min(760px,100%);
    max-height:92vh;
    overflow:auto;
    background:#fff;
    border-radius:26px;
    box-shadow:0 28px 80px rgba(15,23,42,.22);
    padding:22px;
  }
  
  .modal-lg{
    width:min(980px,100%);
  }
  
  .modal-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
  }
  
  .modal-head h3{
    margin:0;
    font-size:22px;
    letter-spacing:-.04em;
  }
  
  .modal-head p{
    margin:4px 0 0;
    color:var(--muted);
  }
  
  .modal-close{
    width:38px;
    height:38px;
    border:0;
    border-radius:999px;
    background:#F1F5F9;
    cursor:pointer;
    font-size:20px;
  }
  
  /* ==========================================================
     APPOINTMENTS BASE
  ========================================================== */
  
  .agenda-list{
    display:grid;
    gap:10px;
  }
  
  .appointment-card{
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:12px;
    padding:13px;
    border-radius:18px;
    background:#fff;
    border:1px solid var(--border);
  }
  
  .time-dot{
    width:54px;
    height:54px;
    border-radius:18px;
    background:#E6FAFC;
    color:var(--primario-oscuro);
    display:grid;
    place-items:center;
    font-weight:900;
  }
  
  .appointment-card h4{
    margin:0;
    font-size:15px;
  }
  
  .appointment-card p{
    margin:3px 0 0;
    color:var(--muted);
    font-size:12px;
  }
  
  /* ==========================================================
     CALENDAR
  ========================================================== */
  
  .calendar-board{
    display:grid;
    grid-template-columns:repeat(7,minmax(160px,1fr));
    gap:12px;
    overflow:auto;
    padding-bottom:4px;
  }
  
  .day-column{
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    min-height:520px;
    padding:12px;
  }
  
  .day-column.today{
    box-shadow:inset 0 0 0 2px rgba(0,169,183,.28);
  }
  
  .day-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding-bottom:10px;
    margin-bottom:10px;
    border-bottom:1px solid #eef2f7;
  }
  
  .day-name{
    font-weight:900;
  }
  
  .day-date{
    color:var(--muted);
    font-size:12px;
  }
  
  .cal-event{
    display:block;
    border-radius:15px;
    padding:10px;
    margin-bottom:8px;
    color:#fff;
    background:var(--primario);
    box-shadow:0 10px 18px rgba(0,169,183,.16);
  }
  
  .cal-event strong{
    display:block;
    font-size:13px;
  }
  
  .cal-event span{
    display:block;
    font-size:11px;
    opacity:.9;
    margin-top:2px;
  }
  
  .cal-event.estado-pendiente{
    background:#F59E0B;
    color:#fff;
  }
  
  .cal-event.estado-confirmada{
    background:#10B981;
    color:#fff;
  }
  
  .cal-event.estado-atendida{
    background:#3B82F6;
    color:#fff;
  }
  
  .cal-event.estado-cancelada{
    background:#EF4444;
    color:#fff;
  }
  
  .cal-event.estado-no-asistio{
    background:#6B7280;
    color:#fff;
  }
  
  /* ==========================================================
     TIMELINE / PROFILE
  ========================================================== */
  
  .timeline{
    display:grid;
    gap:12px;
  }
  
  .timeline-item{
    position:relative;
    padding:15px 15px 15px 48px;
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
  }
  
  .timeline-item::before{
    content:"";
    position:absolute;
    left:18px;
    top:19px;
    width:14px;
    height:14px;
    border-radius:999px;
    background:var(--primario);
    box-shadow:0 0 0 6px rgba(0,169,183,.1);
  }
  
  .timeline-item h4{
    margin:0;
  }
  
  .timeline-item p{
    margin:6px 0 0;
    color:#475569;
  }
  
  .timeline-meta{
    font-size:12px;
    color:var(--muted);
    font-weight:800;
  }
  
  .profile-head{
    display:flex;
    align-items:center;
    gap:16px;
  }
  
  .profile-avatar{
    width:72px;
    height:72px;
    border-radius:24px;
    background:linear-gradient(135deg,var(--primario),#53d7df);
    color:white;
    display:grid;
    place-items:center;
    font-size:24px;
    font-weight:900;
  }
  
  .stat-strip{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
  }
  
  .stat-strip .badge{
    background:#F8FAFC;
    color:#334155;
  }
  
  /* ==========================================================
     DASHBOARD PREMIUM
  ========================================================== */
  
  .dashboard-page{
    display:grid;
    gap:20px;
  }
  
  .dashboard-page .grid-2,
  .dashboard-page .grid-3,
  .dashboard-page .grid-4,
  .dashboard-page .grid-auto{
    display:grid !important;
    gap:18px;
  }
  
  .dashboard-page .grid-4{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
  
  .dashboard-page .grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  
  .dashboard-eyebrow{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-bottom:6px;
    color:var(--primario-oscuro);
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
  }
  
  .card.dashboard-hero,
  .dashboard-hero{
    position:relative;
    overflow:hidden;
    display:grid !important;
    grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr) !important;
    gap:22px;
    padding:28px !important;
    border:0 !important;
    color:#fff !important;
    background:
      radial-gradient(circle at 8% 15%,rgba(255,255,255,.18),transparent 28%),
      radial-gradient(circle at 85% 18%,rgba(0,169,183,.38),transparent 30%),
      linear-gradient(135deg,#0f172a 0%,#123f47 54%,#00A9B7 100%) !important;
    box-shadow:0 28px 70px rgba(15,23,42,.18) !important;
  }
  
  .dashboard-hero::after{
    content:"";
    position:absolute;
    right:-90px;
    bottom:-120px;
    width:280px;
    height:280px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.14);
  }
  
  .dashboard-hero-main,
  .dashboard-hero-card{
    position:relative;
    z-index:1;
  }
  
  .dashboard-hero .dashboard-eyebrow{
    color:rgba(255,255,255,.72);
  }
  
  .dashboard-hero h2{
    margin:0;
    max-width:650px;
    font-size:34px;
    line-height:1.05;
    letter-spacing:-.05em;
    color:#fff;
  }
  
  .dashboard-hero p{
    max-width:620px;
    margin:10px 0 0;
    color:rgba(255,255,255,.78);
    font-size:14px;
  }
  
  .hero-metrics{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:10px;
    margin-top:24px;
  }
  
  .hero-metrics div{
    padding:14px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:20px;
    background:rgba(255,255,255,.1);
    backdrop-filter:blur(14px);
  }
  
  .hero-metrics strong{
    display:block;
    font-size:24px;
    line-height:1;
    letter-spacing:-.04em;
    color:#fff;
  }
  
  .hero-metrics span{
    display:block;
    margin-top:6px;
    color:rgba(255,255,255,.72);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.05em;
  }
  
  .dashboard-hero-card{
    align-self:stretch;
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-height:190px;
    padding:20px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:24px;
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.14);
  }
  
  .dashboard-hero-card .mini-label{
    color:rgba(255,255,255,.72);
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
  }
  
  .dashboard-hero-card h3{
    margin:9px 0 0;
    font-size:23px;
    letter-spacing:-.04em;
    color:#fff;
  }
  
  .dashboard-hero-card p{
    margin:7px 0 13px;
    color:rgba(255,255,255,.76);
  }
  
  .dashboard-hero-card .badge{
    align-self:flex-start;
    background:rgba(255,255,255,.16);
    color:#fff;
    border:1px solid rgba(255,255,255,.18);
  }
  
  .hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:16px;
  }
  
  .hero-actions .btn-ghost{
    background:rgba(255,255,255,.1);
    color:#fff;
    border-color:rgba(255,255,255,.2);
  }
  
  .hero-actions .btn-dark{
    background:#fff;
    color:#0f172a;
  }
  
  .dashboard-kpis .card{
    min-height:156px;
  }
  
  .dash-kpi{
    position:relative;
    overflow:hidden;
    display:grid !important;
    align-content:space-between;
    gap:10px;
    transition:.22s ease;
  }
  
  .dash-kpi:hover{
    transform:translateY(-3px);
    box-shadow:var(--shadow);
  }
  
  .dash-kpi::after{
    content:"";
    position:absolute;
    right:-34px;
    top:-34px;
    width:115px;
    height:115px;
    border-radius:999px;
    background:rgba(0,169,183,.09);
  }
  
  .dash-kpi-top{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  
  .dash-kpi-top span{
    color:var(--muted);
    font-size:12px;
    font-weight:900;
    letter-spacing:.05em;
    text-transform:uppercase;
  }
  
  .dash-kpi-icon{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:15px;
    color:var(--primario-oscuro);
    background:#E6FAFC;
    font-size:11px;
    font-weight:1000;
    letter-spacing:-.02em;
  }
  
  .dash-kpi strong{
    position:relative;
    z-index:1;
    display:block;
    font-size:36px;
    line-height:1;
    letter-spacing:-.06em;
  }
  
  .dash-kpi small{
    position:relative;
    z-index:1;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
  }
  
  .dash-kpi-success .dash-kpi-icon{
    color:#047857;
    background:#D1FAE5;
  }
  
  .metric-line{
    position:relative;
    z-index:1;
    overflow:hidden;
    width:100%;
    height:8px;
    border-radius:999px;
    background:#E5E7EB;
  }
  
  .metric-line span{
    display:block;
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg,var(--success),#6EE7B7);
  }
  
  .dashboard-shortcuts{
    display:grid !important;
    grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr) !important;
    gap:18px;
    align-items:center;
  }
  
  .shortcut-copy h2{
    margin:0;
    font-size:22px;
    letter-spacing:-.04em;
  }
  
  .shortcut-copy p{
    margin:5px 0 0;
    color:var(--muted);
  }
  
  .shortcut-actions{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:12px;
  }
  
  .shortcut-card{
    position:relative;
    overflow:hidden;
    display:grid;
    gap:4px;
    min-height:92px;
    padding:16px;
    border:1px solid var(--border);
    border-radius:20px;
    background:linear-gradient(135deg,#fff,#F8FAFC);
    transition:.22s ease;
  }
  
  .shortcut-card::after{
    content:"";
    position:absolute;
    right:-26px;
    bottom:-26px;
    width:74px;
    height:74px;
    border-radius:999px;
    background:rgba(0,169,183,.08);
  }
  
  .shortcut-card:hover{
    transform:translateY(-2px);
    border-color:rgba(0,169,183,.28);
    box-shadow:var(--shadow-sm);
  }
  
  .shortcut-card strong{
    position:relative;
    z-index:1;
    font-size:14px;
    letter-spacing:-.02em;
  }
  
  .shortcut-card span{
    position:relative;
    z-index:1;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
  }
  
  .dashboard-layout{
    display:grid !important;
    grid-template-columns:minmax(0,1.18fr) minmax(360px,.82fr) !important;
    gap:18px;
    align-items:start;
  }
  
  .agenda-panel{
    min-height:100%;
  }
  
  .agenda-summary{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:10px;
    margin-bottom:16px;
  }
  
  .agenda-summary div{
    padding:12px;
    border:1px solid var(--border);
    border-radius:18px;
    background:#F8FAFC;
  }
  
  .agenda-summary strong{
    display:block;
    font-size:22px;
    line-height:1;
    letter-spacing:-.04em;
  }
  
  .agenda-summary span{
    display:block;
    margin-top:5px;
    color:var(--muted);
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.05em;
  }
  
  .appointment-card-pro{
    position:relative;
    display:grid !important;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:14px;
    border-radius:20px;
    background:linear-gradient(135deg,#fff,#FBFDFF);
    transition:.2s ease;
  }
  
  .appointment-card-pro:hover{
    transform:translateY(-1px);
    border-color:rgba(0,169,183,.26);
    box-shadow:0 14px 34px rgba(15,23,42,.07);
  }
  
  .appointment-card-pro.is-next{
    border-color:rgba(0,169,183,.45);
    box-shadow:0 16px 36px rgba(0,169,183,.12);
  }
  
  .appointment-card-pro.is-next::before{
    content:"";
    position:absolute;
    left:0;
    top:16px;
    bottom:16px;
    width:4px;
    border-radius:999px;
    background:var(--primario);
  }
  
  .time-dot-stack{
    width:62px;
    height:62px;
    display:grid !important;
    place-items:center;
    align-content:center;
    gap:2px;
  }
  
  .time-dot-stack strong{
    display:block;
    font-size:14px;
    line-height:1;
  }
  
  .time-dot-stack span{
    display:block;
    color:var(--primario-oscuro);
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
  }
  
  .appointment-main{
    min-width:0;
  }
  
  .appointment-title-row{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
  }
  
  .appointment-main h4{
    margin:0;
    font-size:15px;
    letter-spacing:-.02em;
  }
  
  .appointment-main p{
    margin:4px 0 0;
    color:var(--muted);
    font-size:12px;
  }
  
  .appointment-tags{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:9px;
  }
  
  .next-chip,
  .contact-pill{
    display:inline-flex;
    align-items:center;
    min-height:26px;
    padding:0 9px;
    border-radius:999px;
    font-size:11px;
    font-weight:900;
  }
  
  .next-chip{
    color:var(--primario-oscuro);
    background:#E6FAFC;
  }
  
  .contact-pill{
    color:#166534;
    background:#DCFCE7;
  }
  
  .agenda-list-compact .appointment-card-pro{
    grid-template-columns:auto 1fr auto;
  }
  
  .empty-state-dash{
    display:grid;
    gap:4px;
    padding:34px 20px;
    border:1px dashed #CBD5E1;
    border-radius:20px;
    background:#F8FAFC;
  }
  
  .empty-state-dash strong{
    color:#334155;
    font-size:14px;
  }
  
  .empty-state-dash span{
    color:var(--muted);
    font-size:12px;
  }
  
  .patients-card .data-table-wrap{
    border-radius:22px;
  }
  
  .patient-cell{
    display:flex;
    align-items:center;
    gap:11px;
  }
  
  .patient-avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
    display:grid;
    place-items:center;
    border-radius:15px;
    color:var(--primario-oscuro);
    background:#E6FAFC;
    font-size:12px;
    font-weight:1000;
  }
  
  .whatsapp-link{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:0 10px;
    border-radius:999px;
    color:#166534;
    background:#DCFCE7;
    font-size:12px;
    font-weight:900;
  }
  
  /* ==========================================================
     MOBILE
  ========================================================== */
  
  .mobile-only{
    display:none;
  }
  
  .mobile-tabbar{
    display:none;
  }
  
  @media (max-width:1200px){
    .dashboard-hero,
    .dashboard-layout,
    .dashboard-shortcuts{
      grid-template-columns:1fr !important;
    }
  
    .shortcut-actions{
      grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
  
    .dashboard-page .grid-4{
      grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
  }
  
  @media (max-width:1100px){
    .grid-4{
      grid-template-columns:repeat(2,minmax(0,1fr));
    }
  
    .grid-3{
      grid-template-columns:repeat(2,minmax(0,1fr));
    }
  }
  
  @media (max-width:860px){
    .mobile-only{
      display:grid;
    }
  
    .desktop-only{
      display:none!important;
    }
  
    .sidebar{
      transform:translateX(-105%);
      transition:.25s ease;
    }
  
    .sidebar-open .sidebar{
      transform:translateX(0);
    }
  
    .main-panel{
      margin-left:0;
      width:100%;
      padding:18px 14px 92px;
    }
  
    .topbar{
      align-items:flex-start;
    }
  
    .topbar h1{
      font-size:24px;
    }
  
    .grid-2,
    .grid-3,
    .grid-4{
      grid-template-columns:1fr;
    }
  
    .form-grid,
    .form-grid-3{
      grid-template-columns:1fr;
    }
  
    .table-toolbar{
      align-items:stretch;
      flex-direction:column;
    }
  
    .appointment-card{
      grid-template-columns:auto 1fr;
    }
  
    .appointment-card .actions{
      grid-column:1/-1;
    }
  
    .calendar-board{
      grid-template-columns:repeat(7,210px);
    }
  
    .modal{
      padding:18px;
      border-radius:22px;
    }
  
    .card.dashboard-hero,
    .dashboard-hero{
      grid-template-columns:1fr !important;
      padding:22px !important;
      border-radius:22px;
    }
  
    .dashboard-hero h2{
      font-size:27px;
    }
  
    .hero-metrics{
      grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
  
    .dashboard-hero-card{
      min-height:auto;
    }
  
    .shortcut-actions,
    .agenda-summary{
      grid-template-columns:1fr 1fr !important;
    }
  
    .agenda-list-compact .appointment-card-pro,
    .appointment-card-pro{
      grid-template-columns:auto 1fr !important;
    }
  
    .appointment-card-pro .actions{
      grid-column:1 / -1;
    }
  
    .section-head{
      align-items:stretch;
      flex-direction:column;
    }
  
    .section-head .btn{
      width:100%;
    }
  
    .mobile-tabbar{
      position:fixed;
      left:10px;
      right:10px;
      bottom:10px;
      z-index:70;
      background:rgba(255,255,255,.92);
      backdrop-filter:blur(18px);
      border:1px solid var(--border);
      border-radius:24px;
      box-shadow:0 20px 50px rgba(15,23,42,.16);
      display:grid;
      grid-template-columns:repeat(4,1fr);
      padding:8px;
    }
  
    .mobile-tabbar a{
      display:grid;
      place-items:center;
      gap:2px;
      font-size:11px;
      color:var(--muted);
      font-weight:900;
    }
  
    .mobile-tabbar a span{
      font-size:18px;
    }
  
    .mobile-tabbar a.is-active{
      color:var(--primario-oscuro);
    }
  }
  
  @media (max-width:520px){
    .hero-metrics,
    .shortcut-actions,
    .agenda-summary,
    .dashboard-page .grid-4{
      grid-template-columns:1fr !important;
    }
  
    .dashboard-hero h2{
      font-size:24px;
    }
  
    .dash-kpi strong{
      font-size:32px;
    }
  }
  
  /* ==========================================================
     PRINT
  ========================================================== */
  
  @media print{
    .sidebar,
    .topbar,
    .mobile-tabbar,
    .btn,
    .table-toolbar{
      display:none!important;
    }
  
    .main-panel{
      margin:0;
      width:100%;
      padding:0;
    }
  
    .card{
      box-shadow:none;
      border:1px solid #ddd;
    }
  }