*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#f5f7fb;color:#1d2939;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.container{max-width:1180px;margin:34px auto;padding:0 18px}.narrow{max-width:680px}.card{background:#fff;border:1px solid #e4e7ec;border-radius:16px;padding:24px;margin-bottom:22px;box-shadow:0 2px 10px rgba(16,24,40,.04)}h1,h2,h3{margin-top:0;color:#101828}.brand{font-size:32px;font-weight:800;letter-spacing:-1px}.brand-mini{font-weight:800;color:#175cd3}.topbar,.page-head,.admin-nav,.form-actions,.calendar-header{display:flex;gap:16px;align-items:center;justify-content:space-between}.topbar{margin-bottom:22px}.admin-nav{background:#101828;color:#fff;border-radius:12px;padding:12px 16px;margin-bottom:22px;flex-wrap:wrap}.admin-nav a{color:#fff;text-decoration:none}.admin-nav .spacer{flex:1}.layout{display:grid;grid-template-columns:1.25fr .75fr;gap:22px}.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:22px}.stat{background:#fff;border-radius:14px;padding:22px;border:1px solid #e4e7ec}.stat strong{display:block;font-size:32px}.stat span{color:#667085}.calendar-header h2{margin:0}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.calendar-weekdays{margin:18px 0 8px;text-align:center;font-weight:700;color:#667085}.calendar-day{min-height:48px;display:flex;align-items:center;justify-content:center;border-radius:10px;text-decoration:none;color:#344054;border:1px solid transparent}.calendar-day.available{background:#dcfce7;border-color:#bbf7d0;color:#166534;font-weight:700}.calendar-day.available:hover{background:#bbf7d0}.calendar-day.selected{background:#175cd3!important;color:#fff!important;border-color:#175cd3!important}.calendar-day.disabled{background:#f2f4f7;color:#98a2b3}.slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.slot{padding:12px;border-radius:10px;text-align:center;background:#eff8ff;color:#175cd3;text-decoration:none;font-weight:700}.button{display:inline-block;border:0;border-radius:10px;background:#175cd3;color:#fff;padding:10px 16px;text-decoration:none;font:inherit;cursor:pointer}.button-light{background:#eef2f6;color:#344054}.danger{background:#b42318}.notice,.success,.error{padding:12px 14px;border-radius:10px;margin:10px 0 16px}.notice{background:#f2f4f7}.success{background:#ecfdf3;color:#027a48}.error{background:#fef3f2;color:#b42318}.muted{color:#667085;font-size:.92rem}form label{display:block;font-weight:600;margin-bottom:14px}input,select,textarea{width:100%;margin-top:6px;padding:10px 12px;border:1px solid #d0d5dd;border-radius:8px;font:inherit;background:#fff}.grid-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.grid-form .span-2{grid-column:span 2}.grid-form button{align-self:end;margin-bottom:14px}.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.search{display:flex;gap:10px;align-items:end}.search input{margin:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:11px;border-bottom:1px solid #eaecf0;vertical-align:top}.cards-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.mini-card{border:1px solid #e4e7ec;border-radius:12px;padding:18px}.plain-list{padding-left:20px}.inline{display:inline}.link-button{border:0;background:none;color:#175cd3;text-decoration:underline;cursor:pointer;padding:0;font:inherit}hr{border:0;border-top:1px solid #eaecf0;margin:22px 0}#horarios{scroll-margin-top:15px}@media(max-width:760px){.layout,.grid-form,.cards-list,.stats{grid-template-columns:1fr}.grid-form .span-2{grid-column:auto}.topbar,.page-head{align-items:flex-start;flex-direction:column}.slots{grid-template-columns:repeat(2,1fr)}.container{margin:18px auto}.card{padding:17px}.calendar-grid{gap:5px}.calendar-day{min-height:42px}.admin-nav span:not(.spacer){display:none}}

/* 2.0-alpha.2 */
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:18px;margin:20px 0}.detail-grid>div{padding:14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}

/* DCitas 2.0-alpha.3 */
.status-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.status-form select{min-width:125px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}
.button-small{padding:8px 12px;font-size:.92rem;white-space:nowrap}

/* DCitas 2.0-alpha.4 */
.calendar-cards{margin-top:20px}
.calendar-card{display:flex;flex-direction:column;align-items:flex-start}
.calendar-card h3{margin-bottom:10px}
.calendar-public-link{word-break:break-word}
.calendar-actions{justify-content:flex-start;margin-top:auto;padding-top:8px}
.calendar-create-form{margin-top:20px}
.field-help{display:block;margin-top:6px;color:#667085;font-size:.84rem;font-weight:400}
.create-calendar-actions{justify-content:flex-end;margin-top:4px}

.calendar-head-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:8px}

/* DCitas 2.0-alpha.7 - branding público */
.public-header{margin-bottom:22px}.public-branding{max-width:none;width:100%}.public-company-name{font-size:30px;font-weight:800;color:#101828;letter-spacing:-.5px;margin-bottom:8px}.public-company-logo{display:block;max-width:280px;max-height:95px;width:auto;height:auto;object-fit:contain;margin-bottom:12px}.public-professional{font-size:24px;margin:0 0 14px;color:#344054}.public-description{font-size:1rem;line-height:1.55;margin:10px 0 14px;color:#344054}.public-instruction{margin:0;color:#101828}.logo-preview-wrap{display:flex;align-items:center;gap:14px;margin-top:10px}.logo-preview{max-width:180px;max-height:70px;width:auto;height:auto;object-fit:contain;border:1px solid #e4e7ec;border-radius:8px;padding:6px;background:#fff}@media(max-width:760px){.public-company-name{font-size:26px}.public-company-logo{max-width:220px;max-height:80px}.public-professional{font-size:21px}}


/* alpha.8: contexto de superadministrador */
.account-switcher{display:flex;align-items:center;gap:7px;margin:0 8px;color:#fff;font-size:.85rem}
.account-switcher label{font-weight:600;white-space:nowrap}
.account-switcher select{width:auto;min-width:170px;padding:7px 30px 7px 10px;border-radius:8px;border:1px solid #334155;background:#fff;color:#0f172a}
.admin-context{font-size:.82rem;opacity:.8;white-space:nowrap}
.button-danger{background:#b42318;border-color:#b42318;color:#fff}
.button-danger:hover{background:#912018;border-color:#912018}
@media(max-width:900px){.account-switcher{width:100%;margin:8px 0}.account-switcher select{flex:1}.admin-context{display:none}}

/* alpha.9 - administración de cuentas */
.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;margin-bottom:22px}.page-heading h1{margin-bottom:4px}.muted{color:#64748b;margin:0}.inline-form{display:inline-block;margin:2px}.actions-cell{white-space:normal;min-width:270px}.button-danger{background:#b91c1c;color:#fff;border-color:#b91c1c}.button-danger:hover{background:#991b1b}.status-badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:.86rem;font-weight:700}.status-active{background:#dcfce7;color:#166534}.status-suspended{background:#fef3c7;color:#92400e}.status-cancelled{background:#fee2e2;color:#991b1b}@media(max-width:760px){.page-heading .button{width:100%;text-align:center}.actions-cell{min-width:220px}}

/* 2.0-alpha.10: fondo blanco exclusivo para páginas públicas */
.public-page{background:#fff}

/* 2.0-alpha.11 - perfil público de empresa */
.company-profile{max-width:1080px;margin-top:48px}.company-profile-header{margin-bottom:34px}.company-profile-logo{display:block;max-width:340px;max-height:120px;width:auto;height:auto;object-fit:contain;margin-bottom:20px}.company-profile-name{font-size:38px;margin-bottom:16px}.company-profile-description{max-width:850px;font-size:1.05rem;line-height:1.65;color:#344054}.provider-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.provider-card{border:1px solid #e4e7ec;border-radius:14px;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:#fff}.provider-card h3{margin:0 0 6px}.provider-specialty{margin:0 0 6px;color:#175cd3;font-weight:700}.calendar-meta{margin:0 0 8px;color:#475467;font-weight:600}@media(max-width:760px){.provider-grid{grid-template-columns:1fr}.provider-card{align-items:flex-start;flex-direction:column}.company-profile{margin-top:24px}.company-profile-logo{max-width:260px;max-height:100px}}


/* 2.0-alpha.12 - especialidad en calendario público */
.public-specialty{margin:-6px 0 14px;color:#175cd3;font-size:1rem;font-weight:700}


/* 2.0-alpha.13 - texto público a todo el ancho disponible */
.public-page .public-branding{max-width:none;width:100%}
.public-page .public-description{max-width:none;width:100%}

/* 2.0-alpha.14: perfil público de empresa a ancho completo */
.public-page .company-profile{max-width:1180px;width:100%}
.public-page .company-profile-description{max-width:none;width:100%}


/* DCitas 2.0-alpha.15 - Notas de clientes */
.client-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;padding:16px 0 22px;border-bottom:1px solid #e2e8f0;margin-bottom:22px}
.note-editor textarea{width:100%;margin-top:8px;resize:vertical;min-height:120px}
.notes-table .note-body{min-width:380px;white-space:normal;line-height:1.5}
.note-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.note-actions form{margin:0}
@media(max-width:800px){.client-summary{grid-template-columns:1fr 1fr}.notes-table .note-body{min-width:260px}}
@media(max-width:520px){.client-summary{grid-template-columns:1fr}}

/* DCitas 2.0-alpha.17 - gestión superior de empresas y usuarios */
.narrow-admin-card{max-width:900px;margin-left:auto;margin-right:auto}
.checkbox-field{display:flex!important;flex-direction:column;justify-content:flex-start}
.checkbox-row{display:flex;align-items:center;gap:9px;margin-top:12px;font-weight:500}
.checkbox-row input[type="checkbox"]{width:auto;margin:0;transform:scale(1.15)}

/* DCitas 2.0-alpha.18 - plantilla administrativa de ancho completo */
body:not(.public-page){background:#f8fafc}
body:not(.public-page)>.container:not(.narrow){max-width:none;width:100%;margin:0;padding:0 44px 42px}
body:not(.public-page)>.container:not(.narrow)>.admin-nav{margin-left:-44px;margin-right:-44px;width:calc(100% + 88px)}
.admin-nav{min-height:72px;background:#fff;color:#0f172a;border-radius:0;border-bottom:1px solid #e2e8f0;padding:10px 28px;margin-bottom:34px;display:flex;align-items:center;gap:26px;box-shadow:none;flex-wrap:nowrap}
.admin-nav a{color:#0f172a;text-decoration:none}
.admin-brand{display:flex;align-items:center;gap:11px;font-size:18px;font-weight:800;white-space:nowrap;margin-right:8px}
.admin-brand-mark{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:11px;background:#162033;color:#fff;font-size:19px;font-weight:800}
.admin-brand small{font-size:12px;color:#175cd3;font-weight:800}
.admin-menu{display:flex;align-items:center;gap:5px;white-space:nowrap}
.admin-menu>a{padding:11px 13px;border-radius:10px;font-weight:500}
.admin-menu>a:hover{background:#f1f5f9}
.admin-menu>a.active{background:#eaf2ff;color:#175cd3}
.admin-nav-right{margin-left:auto;display:flex;align-items:center;gap:18px;min-width:0}
.account-switcher{display:flex;align-items:center;gap:8px;margin:0;color:#475569;font-size:.82rem}
.account-switcher label{font-weight:700;white-space:nowrap;margin:0}
.account-switcher select{width:auto;min-width:190px;max-width:280px;margin:0;padding:8px 32px 8px 11px;border-radius:8px;border:1px solid #d0d5dd;background:#fff;color:#0f172a}
.admin-user-menu{display:flex;align-items:center;gap:11px;white-space:nowrap}
.admin-context{font-size:.78rem;color:#64748b;opacity:1}
.admin-user-name{font-size:.85rem;font-weight:600;color:#334155}
.admin-logout{font-size:.85rem;color:#175cd3!important;font-weight:700}
body:not(.public-page)>.container:not(.narrow)>.card{border-radius:15px;box-shadow:0 1px 3px rgba(16,24,40,.04);margin-bottom:20px}
body:not(.public-page)>.container:not(.narrow) .page-head h1,
body:not(.public-page)>.container:not(.narrow) .page-heading h1{font-size:30px;letter-spacing:-.5px}
@media(max-width:1200px){.admin-nav{gap:12px;padding-left:18px;padding-right:18px}.admin-menu>a{padding:10px 8px}.admin-context,.admin-user-name{display:none}.account-switcher select{min-width:160px;max-width:210px}}
@media(max-width:900px){body:not(.public-page)>.container:not(.narrow){padding:0 18px 30px}body:not(.public-page)>.container:not(.narrow)>.admin-nav{margin-left:-18px;margin-right:-18px;width:calc(100% + 36px)}.admin-nav{align-items:flex-start;flex-wrap:wrap;padding:12px 18px 14px;margin-bottom:24px}.admin-brand{margin-right:auto}.admin-menu{order:3;width:100%;overflow-x:auto;padding-bottom:2px}.admin-nav-right{margin-left:0}.account-switcher{width:auto;margin:0}.account-switcher select{min-width:150px}.admin-user-menu{display:none}}
@media(max-width:600px){.admin-nav-right{width:100%;order:2}.account-switcher{width:100%}.account-switcher select{flex:1;max-width:none}.admin-menu{order:3}.admin-menu>a{padding:9px 10px}.admin-brand-mark{width:36px;height:36px}body:not(.public-page)>.container:not(.narrow)>.card{padding:17px}}


/* 2.0-alpha.20: capacidad por horario */
.slots .slot.slot-capacity{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:135px;padding:12px 14px;line-height:1.2}
.slot-capacity strong{font-size:1.05rem}
.slot-capacity span{font-size:.78rem;font-weight:600;opacity:.82;white-space:nowrap}
.slot-summary{margin:10px 0 16px}
@media(max-width:640px){.slots{grid-template-columns:1fr 1fr}.slots .slot.slot-capacity{width:100%;min-width:0}}


/* DCitas 2.0-alpha.22 - directorio de empresas en dashboard superadministrador */
.dashboard-company-search{margin:0 0 18px}
.dashboard-company-search>label{margin-bottom:7px}
.dashboard-company-search-row{display:flex;align-items:center;gap:10px}
.dashboard-company-search-row input{margin:0;flex:1;min-width:220px}
.dashboard-company-search-row .button{white-space:nowrap}
.dashboard-company-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:22px 0 10px}
.dashboard-company-heading h2{margin:0}
.dashboard-company-table td:last-child,.dashboard-company-table th:last-child{width:150px;text-align:right}
.dashboard-pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:16px}
.dashboard-pagination span{font-size:.9rem;color:#64748b}
@media(max-width:640px){.dashboard-company-search-row{align-items:stretch;flex-direction:column}.dashboard-company-search-row .button{text-align:center}.dashboard-company-heading{align-items:flex-start;flex-direction:column}.dashboard-company-table td:last-child,.dashboard-company-table th:last-child{text-align:left;width:auto}.dashboard-pagination{justify-content:space-between}}

/* alpha.23 - contexto de empresa para superadministrador */
.admin-super-return{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#163b6d;text-decoration:none;font-weight:700;white-space:nowrap}
.admin-super-return:hover{background:#f1f5f9}
.company-admin-stats{margin:22px 0}
.company-admin-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
@media(max-width:900px){.company-admin-actions .button{width:100%;text-align:center;justify-content:center}.admin-super-return{width:100%;justify-content:center}}

/* 2.0-alpha.24: buscador dinámico de empresas en encabezado de cuentas */
.accounts-heading{align-items:center;flex-wrap:nowrap}
.accounts-heading-title{flex:0 0 auto}
.accounts-live-search{flex:1;max-width:620px;min-width:260px;margin:0 auto}
.accounts-live-search input{margin:0;width:100%}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:900px){.accounts-heading{flex-wrap:wrap}.accounts-live-search{order:3;flex-basis:100%;max-width:none}.accounts-heading>.button{margin-left:auto}}
@media(max-width:640px){.accounts-heading>.button{width:100%;text-align:center}.accounts-live-search{min-width:100%}}
