* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { margin: 0; background: #f4f6f9; color: #1f2937; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.login-card { background: #fff; padding: 40px; border-radius: 16px; width: 360px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2); }
.login-card h1 { text-align: center; margin: 0 0 8px; }
.muted { color: #6b7280; text-align: center; margin-bottom: 20px; font-size: 13px; }
label { display:block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 14px; }
button { margin-top: 16px; width: 100%; padding: 12px; background: #0ea5e9; color:#fff;
  border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; }
button:hover { background: #0284c7; }
.alert { background: #fee2e2; color: #991b1b; padding: 10px; border-radius: 8px; margin-bottom: 10px; }
.navbar { background: #0f172a; color: #fff; padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.navbar a { color: #cbd5e1; text-decoration: none; margin-left: 20px; }
.navbar a:hover { color: #fff; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; padding: 24px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 20px; }
.card h2 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: linear-gradient(135deg,#0ea5e9,#6366f1); color:#fff; padding: 20px;
  border-radius: 12px; }
.stat h3 { margin: 0; font-size: 28px; }
.stat p { margin: 4px 0 0; opacity: .9; font-size: 13px; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 10px; border-bottom: 1px solid #e5e7eb; text-align: left; font-size: 14px; vertical-align: top; }
th { background: #f9fafb; font-weight: 600; }
.btn { display:inline-block; padding: 8px 14px; background:#0ea5e9; color:#fff;
  text-decoration:none; border-radius:6px; font-size:13px; border:none; cursor:pointer; width:auto; margin-top:0; }
.btn:hover { background:#0284c7; }
.btn-danger { background:#ef4444; }
.btn-success { background:#10b981; }
.btn-success:hover { background:#059669; }
.row { display:flex; gap:12px; flex-wrap:wrap; }
.prescription { background:#fff; border:1px solid #e5e7eb; padding: 30px; border-radius: 12px; margin-bottom: 20px; }
.prescription .header { border-bottom: 2px solid #0ea5e9; padding-bottom: 12px; margin-bottom: 16px; }
.prescription h2 { margin: 0; color:#0f172a; }
.prescription .meta { color:#6b7280; font-size: 13px; margin-top: 6px; }
.prescription table th { background:#eff6ff; }
.glass-table th { background:#f0fdf4; }
.badge { padding:2px 8px; border-radius:6px; font-size:12px; font-weight:600; }
.b-waiting { background:#fef3c7; color:#92400e; }
.b-in_progress { background:#dbeafe; color:#1e40af; }
.b-completed { background:#d1fae5; color:#065f46; }
.b-pending { background:#fef3c7; color:#92400e; }
.b-resulted { background:#d1fae5; color:#065f46; }
.b-new { background:#dbeafe; color:#1e40af; }
.b-follow_up { background:#fef3c7; color:#92400e; }
@media print { .navbar, .btn, form { display:none !important; } }