/* Sol del Este: phone layouts shared by the CRM, portal and Android viewer. */
@media (max-width:700px){
  :root{font-size:16px}
  html{scroll-padding-top:70px;scroll-padding-bottom:100px}
  body:has(.sidebar){padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}
  .shell,.content-shell,main,.panel,.right-stack,.detail-grid,.settings-grid,.form-grid{min-width:0;max-width:100%}
  .shell{display:block}.content-shell{margin-left:0;width:100%}
  .sidebar{position:static;width:100%;padding:10px 16px;border-right:0;border-bottom:1px solid var(--line)}
  .sidebar .brand{min-height:44px;font-size:20px}.sidebar .brand-mark,.sidebar .brand-mark img{width:36px;height:36px}
  .sidebar .brand-sub{font-size:9px;letter-spacing:1.4px}.sidebar .workspace-label,.sidebar .sidebar-bottom{display:none}
  .sidebar nav{position:fixed;inset:auto 0 0;z-index:80;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;margin:0;padding:7px 6px calc(7px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #efdfca;box-shadow:0 -4px 20px #61400c0a;overflow:visible}
  .sidebar .nav-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:58px;min-width:0;padding:7px 2px;border-radius:12px;font-size:0;white-space:normal;text-align:center}
  .sidebar .nav-link .icon{width:22px;height:22px}.sidebar .nav-link .nav-count{display:none}
  .sidebar .nav-link::after{font-size:11px;line-height:1.2;font-weight:600}
  .sidebar .nav-link[href$='#inicio']::after{content:'Inicio'}.sidebar .nav-link[href$='#proyectos']::after{content:'Proyectos'}
  .sidebar .nav-link[href$='#paquetes']::after{content:'Paquetes'}.sidebar .nav-link[href$='#configuracion']::after{content:'Ajustes'}
  .sidebar .nav-link[href='agenda.php']::after{content:'Agenda'}.sidebar .nav-link[data-agenda] span{font-size:0}
  .topbar{min-height:48px;height:auto;padding:9px 16px;gap:8px;font-size:12px;flex-wrap:wrap}
  .topbar-right{gap:8px}.topbar-right>.avatar{display:none}.topbar .prototype-pill{font-size:10px;padding:6px 8px}.topbar .btn{min-height:36px;font-size:12px;padding:8px 10px}
  main{padding:22px 16px 28px}.page-heading{display:block;margin-bottom:20px}.page-heading h1{font-size:28px;line-height:1.2;letter-spacing:-.8px;overflow-wrap:anywhere}
  .page-heading>div>p:last-child{font-size:14px;line-height:1.6;max-width:none}.eyebrow{font-size:10px;line-height:1.6;letter-spacing:1.4px}
  .heading-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:16px;width:100%}
  .btn,.page-heading .btn,.heading-actions .btn{min-height:46px;padding:11px 12px;font-size:14px;line-height:1.4;justify-content:center;white-space:normal;text-align:center}
  .heading-actions .btn:only-child{grid-column:1/-1}.heading-actions .icon{width:18px;height:18px}
  .notice{padding:13px;gap:10px;font-size:12px;line-height:1.6;margin-bottom:20px}.notice .icon{width:18px;height:18px;flex-shrink:0}
  .toolbar{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:16px}.search-field,.filters{width:100%;max-width:none}
  .search-field input,.filters select{font-size:16px;min-height:48px;width:100%;min-width:0}.search-field{padding:0 13px}
  /* Project tables become complete cards, including status, date and the open button. */
  .table-wrap{overflow:visible;max-width:100%}.table-wrap table,.table-wrap tbody{display:block;min-width:0;width:100%;border:0}
  .table-wrap thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .table-wrap tbody{display:grid;gap:12px}.table-wrap tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:16px;border:1px solid #efdfc9;border-radius:15px;background:#fff}
  .table-wrap tbody td{display:block;min-width:0;padding:0;border:0;font-size:14px;white-space:normal}
  .table-wrap tbody td:first-child,.table-wrap tbody td:nth-child(2),.table-wrap tbody td:last-child{grid-column:1/-1}
  .table-wrap tbody td:nth-child(3)::before,.table-wrap tbody td:nth-child(4)::before{display:block;font-size:11px;line-height:1.4;color:#806e5d;margin-bottom:5px}
  .table-wrap tbody td:nth-child(3)::before{content:'Entrega vigente'}.table-wrap tbody td:nth-child(4)::before{content:'Avance'}
  .project-cell{align-items:flex-start;gap:12px}.project-avatar{width:42px;height:42px;flex-shrink:0;font-size:14px}
  .project-name{font-size:16px;line-height:1.4;overflow-wrap:anywhere}.project-name small{font-size:12px;line-height:1.5;margin-top:5px}
  .project-progress{font-size:13px;gap:9px;min-width:0}.project-progress .progress{width:70px;max-width:70%;height:6px}
  .table-wrap .icon-btn{display:flex;align-items:center;justify-content:center;gap:10px;min-height:42px;width:100%;border:1px solid #f0dbb8;background:#fff9eb;border-radius:9px}
  .table-wrap .icon-btn::after{content:'Abrir proyecto';font-size:13px;order:-1}.table-wrap .icon-btn .icon{width:18px;height:18px}
  #project-results{background:transparent;border:0;box-shadow:none}.panel:has(>.table-wrap)>.table-wrap{padding:14px}
  .panel-header{padding:18px;gap:10px;flex-wrap:wrap}.panel-title{font-size:18px;line-height:1.4}.panel-subtitle{font-size:13px;line-height:1.6}
  .dashboard-grid,.detail-grid,.settings-grid,.packages-grid,.right-stack{grid-template-columns:1fr;gap:16px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{padding:16px 13px}.stat-top{font-size:12px}.stat-value{font-size:28px;overflow-wrap:anywhere}.stat-note{font-size:12px;line-height:1.5}
  .task-tabs{padding:0 16px;gap:16px}.task-tabs button{font-size:14px;min-height:44px}.task-tabs span{font-size:11px}.task-row{padding:17px 16px;gap:12px}
  .task-check{width:23px;height:23px;min-width:23px;margin-top:1px}.task-name{font-size:15px;line-height:1.5}.task-meta{font-size:12px;flex-wrap:wrap;line-height:1.5}
  .task-meta button{font-size:12px;line-height:1.7;text-align:left}.task-right{display:flex;align-items:center;justify-content:space-between;gap:10px;width:calc(100% - 35px);margin-left:35px}.task-time{font-size:12px;margin:0}
  .pill,.task-right .pill{font-size:12px;line-height:1.4;padding:5px 9px;white-space:normal}.empty{font-size:14px;line-height:1.6;padding:24px 18px}
  .detail-body{padding:0 18px 20px}.detail-data{grid-template-columns:1fr;gap:17px}.data-label,.form-hint{font-size:13px;line-height:1.6}.data-value{font-size:15px;overflow-wrap:anywhere}
  .action-card{padding:17px}.action-card p,.action-card small{font-size:13px;line-height:1.6}.action-card .btn{width:100%;margin-top:9px}
  .delivery-content{padding:0 16px 18px}.version-card{padding:15px}.version-card h3,.final-heading h3{font-size:17px;line-height:1.4}
  .version-kind,.version-date,.review-entry small,.release-checklist{font-size:12px;line-height:1.6}.delivery-message,.review-entry p{font-size:14px;line-height:1.6}.saved-url{font-size:12px;line-height:1.6}
  .delivery-actions{display:grid;grid-template-columns:1fr;gap:9px;width:100%}.delivery-actions .btn{width:100%;font-size:14px;padding:11px;min-height:44px}
  .final-heading p,.reference-tile small{font-size:13px;line-height:1.6}.brief-answers dt{font-size:13px;line-height:1.5}.brief-answers dd{font-size:15px;line-height:1.6;overflow-wrap:anywhere}
  label,.auth-panel label{font-size:14px;line-height:1.5}.form-grid{grid-template-columns:1fr;gap:17px}.full{grid-column:auto}
  input:not([type='checkbox']):not([type='radio']),select,textarea,.auth-panel input{font-size:16px;max-width:100%;min-width:0;box-sizing:border-box}
  label input,label select,.auth-panel select{min-height:48px}label textarea{min-height:105px;padding:12px}.checkbox-label{font-size:14px;line-height:1.6;align-items:flex-start}
  .inline-form{display:grid;grid-template-columns:1fr;width:100%}.inline-form label{min-width:0;width:100%}.inline-form .btn{width:100%}
  dialog{width:calc(100% - 20px);max-height:calc(100dvh - 24px);border-radius:16px;margin:auto;overflow:auto}
  .modal-head{padding:18px;gap:12px}.modal-head h2{font-size:20px;line-height:1.3}.modal-head .icon-btn{min-height:40px;min-width:40px}.modal-body{padding:18px}
  .modal-footer{position:sticky;bottom:0;background:#fff;padding:13px 18px calc(13px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:1fr 1fr;z-index:3}.modal-footer .btn{font-size:14px;min-height:46px}
  .settings-actions,.server-link-actions{display:grid;grid-template-columns:1fr;gap:9px}.settings-actions .btn,.server-link-actions .btn{width:100%}
  .setting-section h2{font-size:19px}.setting-section p,.package-desc,.package-list li,.package-meta{font-size:14px;line-height:1.6}.setting-section{padding:20px}
  .auth-page{padding:24px 14px;max-width:100%;width:100%;margin:0}.auth-panel{padding:21px 18px}.auth-panel h1{font-size:25px;line-height:1.3}.auth-panel>p{font-size:14px;line-height:1.6}.auth-panel .btn{min-height:46px;font-size:14px;max-width:100%;overflow-wrap:anywhere}.auth-panel code{font-size:12px;overflow-wrap:anywhere}
  .auth-brand{margin-bottom:22px}.auth-panel form{gap:16px}.auth-panel h2{font-size:20px;line-height:1.4}
  .client-mode{padding-bottom:0}.client-mode main{padding:16px}.portal-wrap{max-width:100%}.portal-preview-bar{font-size:12px;line-height:1.6;padding:12px}
  .portal-heading{padding:24px 0;gap:12px}.portal-heading h1{font-size:30px;line-height:1.15}.portal-heading>div>p:last-child{font-size:13px;line-height:1.6}.portal-art{width:60px;height:67px;margin:0}.portal-art img{width:47px;height:47px}
  .portal-wrap .portal-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 0 16px;overflow:visible;border:0;margin-bottom:12px}
  .portal-wrap .portal-tabs a{font-size:13px;white-space:normal;text-align:center;padding:12px 7px;border:1px solid #efdcb9;border-radius:10px;min-height:44px;line-height:1.4}
  .portal-summary-grid{grid-template-columns:1fr;gap:16px}.portal-next,.portal-status,.portal-included{padding:20px}.portal-next h2{font-size:23px}.portal-next>p:not(.eyebrow),.portal-status p,.portal-included>p,.portal-included li{font-size:14px;line-height:1.6}
  .portal-included ul{grid-template-columns:1fr}.portal-form-body{padding:0 18px 22px}.portal-form-body .form-grid{grid-template-columns:1fr}.portal-final,.portal-empty{padding:28px 20px}.portal-section-heading p{font-size:14px;line-height:1.6}
  .portal-bottom{font-size:11px;line-height:1.6}#toast{bottom:calc(94px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 24px);font-size:14px;line-height:1.5;padding:13px 16px}
  footer{font-size:11px;padding:20px 16px;line-height:1.5}footer span{display:none}
  /* Keep the whole month visible; readable reservation names appear below it. */
  .shell .agenda-main{padding:18px 12px 25px}.shell .agenda-main>.auth-panel{padding:18px 10px}.agenda-main .agenda-month-head{display:grid;grid-template-columns:auto 1fr auto;gap:6px}.agenda-main .agenda-month-head h2{text-align:center;font-size:18px}.agenda-main .agenda-month-head .btn{padding:8px;min-height:40px;font-size:12px}
  .agenda-main .agenda-grid-wrap{overflow:visible}.agenda-main .agenda-grid{min-width:0;width:100%;table-layout:fixed}.agenda-main .agenda-grid th{font-size:11px;padding:10px 1px;text-align:center}
  .agenda-main .agenda-grid td{padding:7px 2px;height:65px;text-align:center;vertical-align:top}.agenda-main .agenda-date{font-size:15px;margin-bottom:8px}.agenda-main .agenda-capacity{font-size:0;margin:0}.agenda-main .agenda-capacity::after{content:attr(data-short);font-size:11px;line-height:1.3}
  .agenda-main .agenda-grid .agenda-event{display:none}.agenda-main .agenda-grid td:has(.agenda-event)::after{content:'';display:block;width:6px;height:6px;background:#ef7900;border-radius:50%;margin:5px auto 0}
  .agenda-main .agenda-grid td:has(.agenda-event.google)::after{background:#347653}.agenda-main .agenda-legend{font-size:11px;gap:10px;line-height:1.5}.agenda-main .agenda-month-note{font-size:12px;line-height:1.6}
  .agenda-mobile-reservations{display:block;margin-top:16px}.agenda-mobile-reservations h3{font-size:16px;margin:0 0 10px}.agenda-mobile-reservations .agenda-event{font-size:14px;padding:12px;line-height:1.6;margin:8px 0}
}
@media(min-width:701px){.agenda-mobile-reservations{display:none}}
