:root{--bg:#EEFFF5;--card:#ffffff;--text:#0f172a;--muted:#475569;--brand:#015490;--pending:#facc15;--confirmed:#22c55e;--canceled:#ef4444;--slot-height:52px;--hours-col-width: 90px;--day-min-width: 260px}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:#eefff5;color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial}.container{width:100%;max-width:100%;margin:18px auto;padding:0 16px}@media (max-width: 768px){.container{margin:12px auto;padding:0 12px}}@media (max-width: 600px){.container{margin:8px auto;padding:0 10px}}.btn{background:var(--brand);color:#fff;border:0;border-radius:10px;padding:8px 14px;font-weight:700;box-shadow:3px 3px 3px #0000003d;cursor:pointer;font-size:14px}.btn:disabled{opacity:.6;cursor:not-allowed}.btn-outline{background:#fff;color:var(--brand);border:2px solid var(--brand)}.btn-danger{background:var(--canceled)}.btn-success{background:var(--confirmed)}.btn-warning{background:var(--pending);color:#1f2937}.input,select{width:260px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:14px;transition:border-color .2s,box-shadow .2s}.input:focus,select:focus{outline:none;border-color:#015490;box-shadow:0 0 0 3px #0154901a}@media (max-width: 600px){.input,select{width:100%}}.topbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}.topbar .left,.topbar .right{display:flex;gap:12px;align-items:center}.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:11px}.badge.dot:before{content:"";width:10px;height:10px;border-radius:999px;background:#000;display:inline-block}.badge.pending{background:#fef9c3}.badge.pending:before{background:var(--pending)}.badge.confirmed{background:#dcfce7}.badge.confirmed:before{background:var(--confirmed)}.badge.canceled{background:#fee2e2}.badge.canceled:before{background:var(--canceled)}.calendar{background:var(--card);border-radius:14px;box-shadow:0 4px 16px #0000001f;padding:12px;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width: 768px){.calendar{box-shadow:0 2px 12px #00000014;padding:10px;border-radius:12px}}@media (max-width: 600px){.calendar{box-shadow:0 1px 8px #0000000f;padding:8px;border-radius:10px}}.grid{display:grid;grid-template-columns:var(--hours-col-width) repeat(6,minmax(var(--day-min-width),1fr));gap:0;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;min-width:calc(var(--hours-col-width) + 6 * var(--day-min-width))}.grid .head{display:contents}.grid .head .cell{background:#f8fafc;padding:10px;border-bottom:1px solid #e2e8f0;text-align:center;font-weight:700}.hours{display:grid;grid-auto-rows:var(--slot-height);background:#f8fafc}.hour-cell{font-size:12px;color:#475569;text-align:right;padding:6px 10px 6px 6px;border-right:1px solid #e2e8f0;border-bottom:1px solid #f1f5f9}.hours .hour-cell:nth-child(4n+1),.day-col .slot:nth-child(4n+1){border-bottom-color:#00000045;background:#94a3b833}.day-col{position:relative;display:grid;grid-auto-rows:var(--slot-height);border-left:1px solid rgba(0,0,0,.27)}.day-col .slot{border-bottom:1px solid rgba(0,0,0,.27)}.appt{position:absolute;left:8px;right:8px;border-radius:10px;padding:6px 44px 8px 12px;color:#0b1a0f;font-size:11px;line-height:.98;box-shadow:0 6px 16px #0000001f;border:1px solid rgba(0,0,0,.05);min-height:140px;border-left:8px solid var(--doctorColor)}.appt.pending{background:#fef08a}.appt.confirmed{background:#86efac}.appt.canceled{background:#fca5a5}.appt .title{font-weight:700;margin-bottom:4px;font-size:12px;overflow-wrap:anywhere;word-break:break-word}.appt .meta{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0;color:#0f172a;font-size:10px}.doc-dot{width:10px;height:10px;border-radius:50%;background:var(--doc-color, #999);display:inline-block;margin-right:6px;flex:0 0 auto}.appt.confirmed,.appt.pending,.appt.canceled{box-shadow:0 6px 16px #0000001f,inset 6px 0 0 var(--doc-color, transparent)}.appt .actions{display:flex;gap:6px;margin-top:9px;flex-wrap:wrap}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:999px;border:0;cursor:pointer;color:#fff;line-height:0;box-shadow:0 3px #0000001f}.icon-btn:active{transform:translateY(1px)}.icon-btn svg,.icon-btn img{width:21px;height:21px;display:block}.icon-wa{background:#25d366}.icon-ok{background:#22c55e}.icon-x{background:#ef4444}.appt .trash{position:absolute;top:8px;right:8px;width:26px;height:26px;display:flex;align-items:center;justify-content:center;background:#fff;border:0;cursor:pointer;color:#000;opacity:.9;border-radius:50px;z-index:2}.appt .trash:hover{opacity:1}.appt .trash svg{width:18px;height:18px}.modal-backdrop{position:fixed;inset:0;background:#0f172abf;display:flex;align-items:center;justify-content:center;padding:16px;z-index:9999;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal{width:100%;max-width:560px;background:#fff;border-radius:14px;padding:20px;box-shadow:0 25px 50px #00000080;z-index:10000;position:relative;opacity:1}.modal h3{margin:0 0 16px;color:#0f172a;font-size:22px}.modal label{display:block;margin-bottom:6px;font-weight:600;color:#475569;font-size:14px}.modal .row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.modal .row>div{display:flex;flex-direction:column}.modal .actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.modal .input,.modal select{width:100%;pointer-events:auto;z-index:1;background:#fff;opacity:1}.modal .input:focus,.modal select:focus{outline:2px solid #015490;outline-offset:2px}.modal .btn{pointer-events:auto;cursor:pointer;z-index:1}@media (max-width: 1440px){:root{--day-min-width: 240px}}@media (max-width: 1280px){:root{--day-min-width: 220px}}@media (max-width: 1024px){:root{--day-min-width: 200px}}.appt-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.appt .time{font-weight:800;font-size:16px;letter-spacing:.2px}.appt .patient{font-weight:700;font-size:15px;margin-bottom:2px}.appt .trash{z-index:2}.mini-cal{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:8px;width:220px;box-shadow:0 4px 12px #0000000f}.mini-cal .mc-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.mini-cal .mc-title{font-weight:700;color:#015490;font-size:14px}.mini-cal .mc-btn{width:28px;height:28px;border-radius:8px;border:1px solid #e2e8f0;background:#fff;cursor:pointer;line-height:0;font-size:18px;color:#475569}.mini-cal .mc-btn:hover{background:#f8fafc}.mini-cal .mc-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.mini-cal .mc-headrow{margin-bottom:4px}.mini-cal .mc-wd{text-align:center;color:#64748b;font-size:11px;font-weight:700;padding:4px 0}.mini-cal .mc-day{text-align:center;padding:6px 0;border-radius:8px;border:0;cursor:pointer;background:#fff;color:#0f172a;font-size:12px}.mini-cal .mc-day.other{color:#94a3b8;opacity:.75}.mini-cal .mc-day:hover{background:#f1f5f9}.mini-cal .mc-day.today{outline:2px solid #015490;outline-offset:2px}.mini-cal .mc-day.selected{background:#015490;color:#fff}.topbar.topbar-grid .left{justify-self:start}.topbar.topbar-grid .right{justify-self:end;display:flex;align-items:center}.topbar.topbar-grid{display:grid;grid-template-columns:1fr auto 1fr;align-items:center}.topbar.topbar-grid .left{justify-self:start;display:flex;gap:12px;align-items:center}.topbar.topbar-grid .center{justify-self:center}.topbar.topbar-grid .right{justify-self:end;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.brand-logo{height:104px!important;width:235px!important;object-fit:contain;-webkit-user-select:none;user-select:none}.toolbar{display:flex;flex-direction:row;gap:12px;align-items:center;flex-wrap:wrap}.toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap}@media (max-width: 768px){.toolbar{flex-direction:column;align-items:stretch}.toolbar-left,.toolbar-right{justify-content:center}.toolbar .dentist-select,.toolbar .input{width:100%}}@media (max-width: 600px){.toolbar,.toolbar-left,.toolbar-right{gap:8px}}.calendar-popover{position:absolute;right:0;top:44px;z-index:1000;filter:drop-shadow(0 8px 20px rgba(0,0,0,.15))}.mini-cal .mc-day:focus{outline:none;box-shadow:none}.mini-cal .mc-day[data-selected=true]{background:#015490;color:#fff}.mini-cal .mc-day:not([data-selected=true]){background:#fff;color:#0f172a}.modal .input,.modal select{width:100%}.time-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}@media (max-width: 560px){.modal .row{grid-template-columns:1fr}.time-grid{grid-template-columns:1fr 1fr}}.appt .card-tools{position:absolute;top:6px;right:6px;display:flex;gap:6px;z-index:2}.appt .tool-btn{width:26px;height:26px;border-radius:8px;border:0;background:#fffc;color:#475569;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 2px #0000001f}.appt .tool-btn:hover{background:#fff}.appt .tool-btn.danger{color:#ef4444}.appt .tool-btn svg{width:18px;height:18px;display:block}.ds-wrapper{position:relative;width:220px;flex-shrink:0}.ds-trigger{width:100%;display:flex;align-items:center;gap:8px;padding:9px 12px;background:#fff;border:1px solid #cbd5e1;border-radius:10px;cursor:pointer;font-weight:700;font-size:14px;color:#015490;box-shadow:0 2px 8px #0000001f;transition:border-color .2s,box-shadow .2s}.ds-trigger:hover{border-color:#015490;box-shadow:0 2px 12px #0154902e}.ds-trigger:focus{outline:none;border-color:#015490;box-shadow:0 0 0 3px #01549026}.ds-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.ds-label{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ds-chevron{color:#015490;flex-shrink:0;transition:transform .2s}.ds-chevron-open{transform:rotate(180deg)}.ds-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:1000;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 8px 24px #00000024;padding:6px 0;margin:0;list-style:none;max-height:260px;overflow-y:auto}.ds-option{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;font-weight:700;font-size:14px;color:#0f172a;transition:background .15s}.ds-option:hover{background:#f1f5f9}.ds-option-active{background:#eef6ff;color:#015490}.ds-option-label{flex:1}@media (max-width: 600px){.ds-wrapper{width:100%}}.appt .edit{position:absolute;top:8px;right:40px;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border:0;cursor:pointer;color:#000;opacity:.9;z-index:2;background:#fff;border-radius:50px}.appt .edit:hover{opacity:1}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--bg)}.login-card{width:100%;max-width:520px;background:#fff;border-radius:18px;padding:36px 40px 32px;box-shadow:10px 16px 40px #00000040}.login-logo{display:block;height:120px;margin:10px auto 8px;object-fit:contain;-webkit-user-select:none;user-select:none}.login-title{display:flex;flex-direction:column;align-items:center;margin:10px 0 14px;font-size:28px;color:var(--brand);font-weight:800}.login-form{display:flex;flex-direction:column;align-items:center}.login-input{width:min(420px,100%);font-size:16px;height:44px;margin:10px 0;border-radius:12px}.login-actions{display:flex;justify-content:center}.login-btn{font-size:22px;text-align:center;padding:12px 28px;border-radius:12px;box-shadow:0 6px #00000026;width:200px;height:55px;margin-top:15px}.login-error{margin-top:6px;color:#dc2626;font-weight:600;text-align:center}.login-pwd-wrap{position:relative;width:min(420px,100%)}.login-pwd-wrap .login-input{width:100%;padding-right:44px}.login-eye-btn{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;padding:4px;color:#64748b;display:flex;align-items:center}.login-eye-btn:hover{color:var(--brand)}.login-remember{display:flex;align-items:center;gap:8px;font-size:14px;color:#475569;cursor:pointer;margin-top:4px;width:min(420px,100%)}.login-remember input[type=checkbox]{width:16px;height:16px;accent-color:var(--brand);cursor:pointer}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (max-width: 900px){:root{--slot-height: 46px;--hours-col-width: 72px;--day-min-width: 220px}.topbar{flex-wrap:wrap;row-gap:8px}.topbar .left,.topbar .right{flex-wrap:wrap;gap:8px}.brand-logo{height:84px!important;width:auto!important}.toolbar,.toolbar-row{flex-direction:column;align-items:center;gap:10px}.toolbar-left,.toolbar-right{flex-wrap:wrap;justify-content:center}.calendar{padding:10px;overflow-x:auto;-webkit-overflow-scrolling:touch}.grid{min-width:calc(var(--hours-col-width) + 6 * var(--day-min-width))}.appt{min-height:120px;font-size:10.5px}.appt .time{font-size:15px}}@media (max-width: 600px){:root{--slot-height: 42px;--hours-col-width: 60px;--day-min-width: 190px}.container{padding:0 12px}.brand-logo{height:72px!important}.btn{padding:7px 12px;font-size:13px}.input,select{width:100%}.topbar .right{justify-content:center}.modal .row{grid-template-columns:1fr}.time-grid{grid-template-columns:1fr 1fr}.appt{min-height:110px}.appt .time{font-size:14px}.appt .meta{font-size:9.5px}.appt .actions .icon-btn{width:30px;height:30px}}@media (max-width: 420px){:root{--slot-height: 40px;--hours-col-width: 54px;--day-min-width: 170px}.brand-logo{height:60px!important}.calendar{box-shadow:4px 6px 16px #0000002e}.login-card{box-shadow:6px 10px 26px #0000002e}.appt{min-height:100px}.appt .time{font-size:13px}}html,body{overflow-x:hidden}@media (max-width: 640px){.topbar.topbar-grid{grid-template-columns:1fr;row-gap:10px;justify-items:center;text-align:center}.topbar.topbar-grid .center{order:0;justify-self:center}.topbar.topbar-grid .left{order:1;justify-self:center}.topbar.topbar-grid .right{order:2;justify-self:center}.topbar.topbar-grid .left{display:flex;flex-direction:column;align-items:center;gap:8px}.topbar.topbar-grid .right{display:flex;flex-direction:column;align-items:center;gap:10px}.brand-logo{height:88px!important;width:auto!important;max-width:70vw;margin:0 auto}.topbar .left,.topbar .left>*{flex-wrap:wrap;justify-content:center}.topbar .badge{display:inline-flex;margin:2px 4px}.topbar .right>div{text-align:center}.topbar .right .btn,.topbar .right .btn-outline{width:auto;align-self:center}.calendar-popover{left:50%!important;right:auto!important;transform:translate(-50%);top:44px}.toolbar,.toolbar-row{display:flex;flex-direction:column;align-items:center;gap:10px}.calendar{padding:10px;box-shadow:0 8px 24px #0000002e}}@media (min-width: 641px) and (max-width: 900px){.topbar.topbar-grid{grid-template-columns:1fr 1fr;justify-items:center}.topbar.topbar-grid .center{grid-column:1 / -1}}@media (max-width: 640px){.topbar.topbar-grid{grid-template-columns:1fr;row-gap:14px}.topbar.topbar-grid .center{justify-self:center}.topbar.topbar-grid .right{display:grid;grid-template-columns:repeat(3,max-content);justify-content:center;align-items:center;gap:10px 10px}.topbar.topbar-grid .right>:nth-child(1),.topbar.topbar-grid .right>:nth-child(2),.topbar.topbar-grid .right>:nth-child(3){grid-column:auto}.topbar.topbar-grid .right>:nth-child(n+4){grid-column:1 / -1;justify-self:center}}@media (max-width: 600px){.topbar .left{display:grid!important;grid-template-columns:auto 1fr auto;align-items:center;gap:8px}.topbar .left>strong{grid-column:2;justify-self:center}.topbar .left>button:first-of-type{grid-column:1;justify-self:start}.topbar .left>button:nth-of-type(2){grid-column:3;justify-self:end}.topbar .left>button:nth-of-type(3){grid-column:1 / -1;justify-self:center;margin-top:4px}.topbar .left>h2{display:none}}@media (max-width: 640px){:root{--slot-height: 80px}.hours,.day-col{grid-auto-rows:var(--slot-height)}.appt{min-height:190px;padding-bottom:12px}.appt .time{font-size:18px}.appt .meta{font-size:11px}.appt .actions{flex-wrap:wrap;row-gap:6px}}@media (max-width: 390px){:root{--slot-height: 92px}.hours,.day-col{grid-auto-rows:var(--slot-height)}.appt{min-height:210px}}.slot-clickable{cursor:pointer;transition:background-color .2s ease}.slot-clickable:hover{background-color:#01549014!important;border:1px dashed #015490!important}.day-col .slot-clickable:nth-child(4n+1):hover{background-color:#0154901f!important}.appt{pointer-events:auto}.slot-clickable{position:relative;z-index:1}.day-col .appt{z-index:10}body:has(.modal-backdrop) .slot-clickable{pointer-events:none!important;cursor:default!important}body:has(.modal-backdrop) .slot-clickable:hover{background-color:transparent!important;border:none!important}.modal-backdrop,.modal,.modal *{pointer-events:auto!important}body:has(.modal-backdrop){overflow:hidden}.gear-btn{display:inline-flex!important;align-items:center;justify-content:center;width:40px;height:40px;padding:0!important;border-radius:50%!important;color:var(--brand);transition:transform .3s,background .2s}.gear-btn:hover{transform:rotate(45deg);background:#eef6ff}.gear-btn svg{display:block}.settings-modal{max-width:440px;max-height:90vh;overflow-y:auto}.settings-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.settings-header h3{margin:0}.settings-close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;border-radius:8px;color:#475569}.settings-close:hover{background:#f1f5f9}.settings-photo-section{display:flex;flex-direction:column;align-items:center;gap:8px;margin-bottom:16px}.settings-avatar{position:relative;width:90px;height:90px;border-radius:50%;overflow:hidden;cursor:pointer;border:3px solid var(--brand);background:#f1f5f9}.settings-avatar img{width:100%;height:100%;object-fit:cover}.settings-avatar-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:36px;font-weight:800;color:#fff;background:var(--brand)}.settings-avatar-overlay{position:absolute;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s}.settings-avatar:hover .settings-avatar-overlay{opacity:1}.settings-photo-hint{font-size:12px;color:#64748b}.settings-label{display:block;margin-bottom:4px;font-weight:600;color:#475569;font-size:14px}.settings-input{width:100%!important;margin-bottom:12px}.settings-msg{font-size:13px;font-weight:600;margin:4px 0 8px;text-align:center}.settings-msg.success{color:#16a34a}.settings-msg.error{color:#dc2626}.settings-actions{display:flex;justify-content:center;margin-top:8px}.settings-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0 16px}.settings-subtitle{margin:0 0 12px;color:var(--brand);font-size:16px}
