:root{--primary:#0d6efd;--primary-dark:#0a58ca;--sidebar-bg:#1a2332;--sidebar-hover:#253347;--sidebar-active:#0d6efd;--body-bg:#f0f2f5;--card-shadow:0 2px 12px rgba(0,0,0,.08)}
*{font-family:'Cairo',sans-serif}body{background:var(--body-bg);margin:0;min-height:100vh}
.sidebar{width:260px;min-height:100vh;background:var(--sidebar-bg);color:#fff;position:fixed;right:0;top:0;z-index:1000;display:flex;flex-direction:column;transition:transform .3s}
.sidebar-header{padding:24px 20px 16px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1)}
.sidebar-logo{width:64px;height:64px;object-fit:contain;border-radius:12px;background:#fff;padding:4px}
.sidebar-icon{font-size:40px;color:var(--primary)}
.sidebar .nav{padding:8px 0;flex:1;overflow-y:auto}
.sidebar .nav-link{color:rgba(255,255,255,.7);padding:9px 24px;display:flex;align-items:center;gap:10px;font-size:13px;transition:all .2s}
.sidebar .nav-link:hover{color:#fff;background:var(--sidebar-hover)}
.sidebar .nav-link.active{color:#fff;background:var(--sidebar-active);font-weight:600}
.sidebar .nav-link i{font-size:17px;width:22px;text-align:center}
.sidebar-footer{padding:14px 20px;border-top:1px solid rgba(255,255,255,.1);text-align:center;font-size:12px}
.main-content{margin-right:260px;flex:1;padding:20px;min-height:100vh;width:calc(100% - 260px)}
.stat-card{border:none;border-radius:16px;box-shadow:var(--card-shadow);transition:transform .2s}
.stat-card:hover{transform:translateY(-2px)}.stat-card .card-body{padding:20px}
.stat-card .stat-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px}
.card{border:none;border-radius:16px;box-shadow:var(--card-shadow)}.card-header{background:#fff;border-bottom:1px solid #eee;font-weight:600;border-radius:16px 16px 0 0!important}
.table{font-size:14px}.table th{background:#f8f9fa;font-weight:600;white-space:nowrap}
.badge{font-weight:500;padding:5px 12px;border-radius:20px}
.login-wrapper{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--sidebar-bg),var(--primary-dark))}
.login-card{width:400px;border-radius:20px;box-shadow:0 8px 40px rgba(0,0,0,.15)}
.btn-whatsapp{background:#25D366;color:#fff;border:none;border-radius:8px;padding:4px 10px;font-size:13px}
.btn-whatsapp:hover{background:#1da851;color:#fff}
@media print{body *{visibility:hidden}.print-area,.print-area *{visibility:visible;display:block}.print-area{position:absolute;top:0;right:0;width:100%}}
@media(max-width:991px){.sidebar{transform:translateX(100%)}.sidebar.show{transform:translateX(0)}.main-content{margin-right:0;width:100%}}
.reminder-item{padding:10px 14px;border-bottom:1px solid #f0f0f0;font-size:13px}.reminder-item:last-child{border-bottom:none}
.reminder-overdue{border-right:3px solid #dc3545}.reminder-today{border-right:3px solid #ffc107}.reminder-upcoming{border-right:3px solid #198754}
.tooth-chart{display:flex;flex-direction:column;align-items:center;gap:4px;padding:20px;background:#fff;border-radius:16px}
.tooth-row{display:flex;gap:3px;justify-content:center}
.tooth-cell{width:42px;height:50px;border:2px solid #dee2e6;border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;font-weight:600;background:#fff;position:relative}
.tooth-cell:hover{border-color:var(--primary);background:#e8f0fe}
.tooth-cell.selected{border-color:var(--primary);background:#cfe2ff;box-shadow:0 0 0 2px rgba(13,110,253,.25)}
.tooth-cell.has-record{border-color:#198754;background:#d1e7dd}
.tooth-cell.has-issue{border-color:#dc3545;background:#f8d7da}
.tooth-cell .tooth-num{font-size:13px;font-weight:700;color:#333}
.tooth-cell .tooth-icon{font-size:14px}
.tooth-divider{width:2px;background:#adb5bd;margin:0 6px;border-radius:2px}
.jaw-label{font-size:12px;color:#6c757d;font-weight:600;margin:4px 0}
.jaw-line{width:100%;max-width:500px;height:2px;background:#dee2e6;margin:2px 0}
.img-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.img-card{border:1px solid #dee2e6;border-radius:12px;overflow:hidden;transition:transform .2s;cursor:pointer}
.img-card:hover{transform:scale(1.03);box-shadow:0 4px 15px rgba(0,0,0,.1)}
.img-card img{width:100%;height:120px;object-fit:cover}
.img-card .img-info{padding:8px;font-size:11px;background:#f8f9fa}
.proc-tooth{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:#e8f0fe;border-radius:8px;font-weight:700;font-size:13px;color:var(--primary)}
