:root{
  --bg:#0a0e1a; --elev:#1a2035; --text:#f1f5f9; --muted:#94a3b8; --primary:#6366f1; --primary-hover:#7c3aed; --surface:#151b2d; --stroke:#2d3748; --slot:#1f2937; --slot-text:#f1f5f9; --danger:#ef4444; --success:#10b981; --warning:#f59e0b;
  --gradient-1:#4f46e5; --gradient-2:#6366f1; --gradient-3:#818cf8;
  --shadow-sm:0 2px 8px rgba(0,0,0,.3);
  --shadow-md:0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:0 8px 32px rgba(0,0,0,.5);
  --shadow-glow:0 0 20px rgba(99,102,241,.2);
}

html.light{ 
  --bg:#f8fafc; --elev:#ffffff; --text:#0f172a; --muted:#64748b; --primary:#6366f1; --primary-hover:#7c3aed; --surface:#ffffff; --stroke:#e2e8f0; --slot:#f1f5f9; --slot-text:#1e293b;
  --shadow-sm:0 2px 8px rgba(0,0,0,.08);
  --shadow-md:0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:0 8px 32px rgba(0,0,0,.12);
  --shadow-glow:0 0 20px rgba(99,102,241,.15);
}

/* Animations */
@keyframes fadeIn {
  from { opacity:0; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}

@keyframes slideIn {
  from { opacity:0; transform:translateX(-30px); }
  to { opacity:1; transform:translateX(0); }
}

@keyframes scaleIn {
  from { opacity:0; transform:scale(0.9); }
  to { opacity:1; transform:scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(99,102,241,.3); }
  50% { box-shadow: 0 0 20px rgba(99,102,241,.6), 0 0 30px rgba(99,102,241,.4); }
}

*{box-sizing:border-box}
body{ 
  margin:0; 
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans"; 
  background:var(--bg); 
  color:var(--text); 
  min-height:100vh;
  overflow-x:hidden;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

.container{
  max-width:1100px; 
  margin:0 auto; 
  padding:20px;
  animation: fadeIn 0.6s ease-out;
}

/* Header */
.app-header{
  position:sticky; 
  top:0; 
  background:rgba(15, 20, 32, 0.9); 
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--stroke); 
  z-index:10;
  animation: slideIn 0.5s ease-out;
  box-shadow: var(--shadow-sm);
}

html.light .app-header {
  background:rgba(255, 255, 255, 0.9);
}

.header-inner{
  display:flex; 
  align-items:center; 
  justify-content:space-between;
  transition: all 0.3s ease;
}

.brand{
  font-weight:700; 
  letter-spacing:.2px;
  background:linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 50%, var(--gradient-3) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  font-size:1.1rem;
}

.admin-btn{
  color:#fff; 
  background:linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  text-decoration:none; 
  font-weight:600; 
  padding:10px 20px; 
  border-radius:10px; 
  border:none; 
  cursor:pointer; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position:relative;
  overflow:hidden;
  min-height:40px;
  display:flex;
  align-items:center;
  font-size:14px;
}

.admin-btn::before {
  content:'';
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  background:linear-gradient(135deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 100%);
  opacity:0;
  transition:opacity 0.3s ease;
}

.admin-btn:hover{
  transform:translateY(-2px);
  box-shadow: var(--shadow-md);
}

.admin-btn:hover::before {
  opacity:1;
}

.admin-btn:active {
  transform:translateY(0);
}

.header-actions{
  display:flex; 
  gap:12px; 
  align-items:center;
}

/* Theme Switch */
.theme-switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
  /* ============================================
     ВРЕМЕННОЕ СКРЫТИЕ ПЕРЕКЛЮЧАТЕЛЯ ТЕМЫ
     Чтобы вернуть обратно - удалите строку ниже
     ============================================ */
  display: none !important;
}

.theme-switch input {
  display: none;
}

.toggle {
  height: 40px;
  width: 85px;
  border-radius: 9999px;
  background: linear-gradient(to bottom, #6ec8ff, #1f73a7);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.24);
  transition: all 0.3s ease-in-out;
}

.toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.5), 3px 3px 12px rgba(0, 0, 0, 0.3);
}

.mountains {
  height: 100%;
  width: 100%;
  position: absolute;
  z-index: 3;
  background-color: #1d7371;
  transition: all 0.5s ease-in-out;
  clip-path: polygon(
    0% 80%,
    25% 50%,
    40% 70%,
    60% 35%,
    65% 45%,
    80% 20%,
    100% 80%,
    100% 100%,
    0% 100%
  );
}

.cloud {
  height: 4px;
  width: 9px;
  border-radius: 9999px;
  background-color: rgb(255, 255, 255);
  position: absolute;
  top: 20%;
  left: 10%;
  filter: opacity(0.5);
  z-index: 2;
}

.cloud::before {
  content: "";
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background-color: rgb(255, 255, 255);
  position: absolute;
  top: -50%;
  right: 50%;
  transform: translateX(50%);
}

.sea {
  height: 100px;
  width: 300%;
  border-radius: 50%;
  position: absolute;
  right: 50%;
  bottom: -500%;
  transform: translateX(50%);
  transition: all 0.5s ease-in-out;
  background: linear-gradient(
    to bottom,
    #3f75cc,
    #06063b,
    #06063b,
    #06063b,
    #06063b
  );
}

.sea::before {
  content: "";
  height: 13px;
  width: 8px;
  background-color: rgba(254, 254, 254, 0.34);
  filter: blur(3px);
  position: absolute;
  top: 2%;
  left: 43%;
}

.star {
  height: 1px;
  width: 1px;
  position: absolute;
  top: -50%;
  right: 15%;
  background-color: #fff;
  transition: all 0.5s ease-in-out;
  filter: blur(0.4px);
  border-radius: 50%;
  z-index: 2;
}

.star::before {
  content: "";
  height: 100%;
  width: 100%;
  position: absolute;
  top: -50%;
  right: 10px;
  background-color: #fff;
  transition: all 0.5s ease-in-out;
  border-radius: 50%;
}

.star::after {
  content: "";
  height: 100%;
  width: 100%;
  position: absolute;
  top: 5px;
  right: -10px;
  background-color: #fff;
  transition: all 0.5s ease-in-out;
  border-radius: 50%;
}

/* Sun */
.toggle::before {
  content: "";
  height: 20px;
  width: 20px;
  position: absolute;
  top: 10%;
  right: 30%;
  border-radius: 50%;
  background-color: #ffd34d;
  transition: all 0.5s ease-in-out;
  box-shadow: 0 0 10px rgba(254, 249, 95, 0.76);
  z-index: 4;
}

/* Moon */
.toggle::after {
  content: "";
  height: 18px;
  width: 18px;
  position: absolute;
  top: 10%;
  left: -60%;
  border-radius: 50%;
  background-color: #ffffff;
  transition: all 0.5s ease-in-out;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.53);
  z-index: 4;
}

/* Checked state - Dark mode */
.theme-switch input:checked + .toggle {
  background: linear-gradient(to bottom, #036daf, #003d63);
}

.theme-switch input:checked + .toggle:hover {
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5), 3px 3px 12px rgba(0, 0, 0, 0.3);
}

.theme-switch input:checked + .toggle::before {
  transform: translateX(280%);
}

.theme-switch input:checked + .toggle::after {
  transform: translateX(480%);
}

.theme-switch input:checked + .toggle .mountains {
  background-color: #05021a;
  transform: translateY(100%);
}

.theme-switch input:checked + .toggle .sea {
  background-color: #05021a;
  bottom: -210%;
}

.theme-switch input:checked + .toggle .star {
  transform: rotate(10deg);
  top: 20%;
}

/* Custom Select */
.custom-select {
  position: relative;
  display: inline-block;
  min-width: 50px;
  user-select: none;
}

/* Clinic selector - full width */
.clinic-select {
  display: block;
  width: 100%;
}

/* Clinic filter in admin panel */
.clinic-filter-select {
  min-width: 200px;
}

.clinic-filter-select .select-selected {
  padding: 8px 26px 8px 12px;
}

.clinic-filter-select .select-items div {
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--stroke);
}

.clinic-filter-select .select-items div:last-child {
  border-bottom: none;
}

.clinic-filter-select .select-items div:hover {
  background: var(--primary);
  color: #fff;
}

.clinic-select .select-selected {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 40px 12px 14px;
  font-size: 15px;
  min-height: 46px;
}

.clinic-select .select-selected:after {
  right: 14px;
  border-width: 5px;
  border-top-color: var(--primary);
}

.clinic-select .select-items div {
  padding: 12px 14px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--stroke);
}

.clinic-select .select-items div:last-child {
  border-bottom: none;
}

.clinic-select .select-items div:hover {
  background: var(--primary);
  color: #fff;
}

.select-selected {
  background: var(--elev);
  color: var(--text);
  border: 2px solid var(--stroke);
  padding: 8px 26px 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 55px;
}

.select-selected:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 7px;
  width: 0;
  height: 0;
  margin-top: -2px;
  border: 4px solid transparent;
  border-top-color: var(--muted);
  transition: transform 0.3s ease;
}

.select-selected.select-arrow-active:after {
  transform: rotate(180deg);
  margin-top: -6px;
}

.select-selected:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.select-items {
  position: absolute;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-top: none;
  border-radius: 0 0 10px 10px;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  margin-top: -2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.select-hide {
  display: none;
}

.select-items div {
  color: var(--text);
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.select-items div:hover {
  background: var(--primary);
  color: #fff;
}

/* Custom Date Picker */
.custom-date-picker {
  position: relative;
  display: inline-block;
  user-select: none;
}

.date-selected {
  background: var(--elev);
  color: var(--text);
  border: 2px solid var(--stroke);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.date-selected svg {
  color: var(--muted);
  flex-shrink: 0;
}

.date-selected:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.date-selected:hover svg {
  color: var(--primary);
}

.date-dropdown {
  position: absolute;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 12px;
  top: calc(100% + 4px);
  left: 0;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: slideDown 0.3s ease;
  padding: 12px;
}

/* Mini Calendar */
.mini-calendar {
  min-width: 280px;
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stroke);
}

.mini-nav-btn {
  background: var(--slot);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.mini-nav-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.mini-month-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mini-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 4px;
  text-transform: uppercase;
}

.mini-day-cell {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--elev);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mini-day-cell:hover:not(.muted):not(.past) {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99,102,241,.2) 0%, rgba(139,92,246,.15) 100%);
  transform: scale(1.1);
  color: var(--primary);
  font-weight: 600;
}

.mini-day-cell.muted {
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--stroke);
  cursor: default;
  opacity: 0.3;
}

.mini-day-cell.selected {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

.mini-day-cell.past {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Select styles moved to input section for consistency */

/* Welcome Section */
.welcome-section{
  display:flex; 
  align-items:center; 
  justify-content:center; 
  min-height:calc(100vh - 100px); 
  text-align:center;
  animation: fadeIn 0.8s ease-out;
}

.welcome-content{
  max-width:600px;
  animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-title{
  font-size:3.5rem; 
  font-weight:700; 
  margin:0 0 1.5rem;
  background:linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 50%, var(--gradient-3) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  animation: float 3s ease-in-out infinite;
  background-size:200% 200%;
}

.welcome-text{
  font-size:1.3rem; 
  color:var(--muted); 
  margin:0 0 2.5rem; 
  line-height:1.8;
  animation: fadeIn 1s ease-out 0.3s backwards;
}

/* Booking Layout */
.layout{
  display:grid; 
  grid-template-columns:1.2fr .8fr; 
  gap:24px; 
  align-items:start;
}

.calendar-card,.form-card{
  background:var(--surface); 
  border:1px solid var(--stroke); 
  border-radius:20px; 
  padding:20px;
  box-shadow: var(--shadow-md);
  transition:all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: scaleIn 0.6s ease-out;
}

.calendar-card:hover,.form-card:hover {
  box-shadow: var(--shadow-lg);
  transform:translateY(-2px);
}

html.light .calendar-card:hover,html.light .form-card:hover {
  box-shadow: 0 8px 32px rgba(99,102,241,.15);
}

.calendar-card {
  animation-delay: 0.1s;
}

.form-card {
  animation-delay: 0.2s;
}

/* Calendar */
.calendar-header{
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap:8px;
  margin-bottom:16px;
}

.nav-btn{
  background:var(--slot); 
  color:var(--text); 
  border:1px solid var(--stroke); 
  border-radius:12px; 
  padding:8px 14px; 
  cursor:pointer; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight:600;
  font-size:1.2rem;
}

.nav-btn:hover{
  border-color:var(--primary);
  background:var(--primary);
  color:#fff;
  transform:scale(1.1);
}

.month-label{
  font-weight:700;
  font-size:1.1rem;
  letter-spacing:0.3px;
  color:var(--text);
}

.calendar-grid{
  display:grid; 
  grid-template-columns:repeat(7,1fr); 
  gap:10px; 
  margin-top:16px;
}

.day-cell{
  aspect-ratio:1/1; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  border-radius:14px; 
  border:1px solid var(--stroke); 
  background:var(--elev); 
  color:var(--text); 
  cursor:pointer; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight:500;
  position:relative;
  overflow:visible;
}

.day-cell::before {
  content:'';
  position:absolute;
  top:3px; left:3px; right:3px; bottom:3px;
  border-radius:10px;
  background:linear-gradient(135deg, rgba(99,102,241,.4) 0%, rgba(139,92,246,.3) 100%);
  opacity:0;
  transition:all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index:-1;
}

html.light .day-cell::before {
  background:linear-gradient(135deg, rgba(99,102,241,.25) 0%, rgba(139,92,246,.2) 100%);
}

.day-cell:hover:not(.muted):not(.past)::before {
  opacity:1;
}

.day-cell:hover:not(.muted):not(.past){
  color:#fff;
  transform:scale(1.05);
  z-index:1;
  font-weight:600;
  border-color:var(--primary);
}

html.light .day-cell:hover:not(.muted):not(.past){
  color:var(--primary);
}

.day-cell.muted{
  color:var(--muted); 
  background:transparent; 
  border:1px dashed var(--stroke); 
  cursor:default;
  opacity:0.5;
}

.day-cell.selected{
  background:linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color:#fff !important;
  border:2px solid var(--primary);
  box-shadow: var(--shadow-glow), 0 4px 12px rgba(99,102,241,.3);
  animation: glow 2s ease-in-out infinite;
  font-weight:700;
}

.day-cell.selected::before {
  display:none;
}

.day-cell.past{
  opacity:.35; 
  cursor:not-allowed;
}

.day-cell.full-day{
  background:linear-gradient(135deg, rgba(239,68,68,.25) 0%, rgba(239,68,68,.35) 100%);
  color:var(--danger) !important;
  border:2px solid var(--danger);
  font-weight:700;
  animation: pulseRed 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(239,68,68,.3), 0 4px 12px rgba(239,68,68,.2);
}

.day-cell.full-day:hover{
  background:linear-gradient(135deg, rgba(239,68,68,.4) 0%, rgba(239,68,68,.5) 100%);
  box-shadow: 0 0 25px rgba(239,68,68,.5), 0 4px 16px rgba(239,68,68,.3);
  animation: pulseRedFast 1s ease-in-out infinite;
}

@keyframes pulseRed {
  0%, 100% { 
    box-shadow: 0 0 15px rgba(239,68,68,.3), 0 4px 12px rgba(239,68,68,.2);
    border-color: var(--danger);
  }
  50% { 
    box-shadow: 0 0 25px rgba(239,68,68,.5), 0 4px 20px rgba(239,68,68,.4);
    border-color: #ff5555;
  }
}

@keyframes pulseRedFast {
  0%, 100% { 
    box-shadow: 0 0 25px rgba(239,68,68,.5), 0 4px 16px rgba(239,68,68,.3);
  }
  50% { 
    box-shadow: 0 0 35px rgba(239,68,68,.7), 0 4px 24px rgba(239,68,68,.5);
  }
}

/* Slots */
.slots{
  margin-top:20px; 
  display:grid; 
  gap:16px;
}

.slots-group{
  border-top:1px solid var(--stroke); 
  padding-top:16px;
  animation: fadeIn 0.6s ease-out;
}

.slots-title{
  font-weight:600; 
  color:var(--muted); 
  margin-bottom:12px; 
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:1px;
}

.slot-list{
  display:grid; 
  grid-template-columns:repeat(3,1fr); 
  gap:10px;
}

.slot{
  padding:12px 14px; 
  border:2px solid var(--stroke); 
  background:var(--slot); 
  color:var(--slot-text); 
  border-radius:16px; 
  text-align:center; 
  cursor:pointer; 
  font-size:14px; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight:500;
  position:relative;
  overflow:hidden;
}

.slot::before {
  content:'';
  position:absolute;
  top:0; left:-100%;
  width:100%; height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transition:left 0.5s ease;
}

html.light .slot::before {
  background:linear-gradient(90deg, transparent, rgba(99,102,241,.15), transparent);
}

.slot:hover:not([disabled])::before {
  left:100%;
}

.slot:hover:not([disabled]){
  border-color:var(--primary);
  transform:translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

.slot.full{
  border:2px solid var(--danger);
  color:var(--danger);
  background:linear-gradient(135deg, rgba(239,68,68,.1) 0%, rgba(239,68,68,.2) 100%);
  cursor:not-allowed;
  animation: pulse 2s ease-in-out infinite;
  font-weight:600;
}

.slot.selected{
  background:linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color:#fff !important;
  border:2px solid var(--primary);
  box-shadow: var(--shadow-glow), 0 4px 12px rgba(99,102,241,.3);
  transform:scale(1.05);
  font-weight:700;
}

.slot[disabled]{
  opacity:.4; 
  cursor:not-allowed;
}

/* Form */
.form-card h2{
  margin:0 0 20px;
  font-size:1.5rem;
  background:linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.input-row{
  display:grid; 
  gap:8px; 
  margin-bottom:18px; 
  position:relative;
}

.input-row label {
  font-weight:600;
  font-size:14px;
  color:var(--text);
  transition:color 0.3s ease;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 45px;
  width: 100%;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.toggle-password-btn:hover {
  opacity: 1;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.toggle-password-btn:active {
  transform: translateY(-50%) scale(0.95);
}

input[type="text"],input[type="tel"],input[type="password"],input[type="date"]{
  background:var(--elev); 
  color:var(--text); 
  border:2px solid var(--stroke); 
  padding:12px 14px; 
  border-radius:12px; 
  font-size:15px; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family:inherit;
}

/* Date Input Styling */
input[type="date"] {
  position:relative;
  cursor:pointer;
  color-scheme: dark;
}

html.light input[type="date"] {
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor:pointer;
  filter: invert(0.7);
  opacity:0.7;
  transition:opacity 0.3s ease;
}

html.light input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.4);
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
  opacity:1;
}

input:focus,select:focus{
  outline:none; 
  border-color:var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
  transform:translateY(-1px);
}

input:focus + label {
  color:var(--primary);
}

input.error{
  border-color:var(--danger);
  animation: shake 0.3s ease;
}

.custom-select.error .select-selected {
  border-color:var(--danger);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-msg{
  color:var(--danger); 
  font-size:12px; 
  min-height:18px;
  font-weight:500;
  animation: fadeIn 0.3s ease;
}

.selected-slot{
  margin:12px 0 18px; 
  color:var(--text-secondary);
  font-weight:400;
  font-size:14px;
  padding:0;
  background:transparent;
  border:none;
  text-align:center;
  transition:all 0.3s ease;
}

.selected-slot.has-selection{
  color:var(--primary);
  font-weight:600;
}

/* Buttons */
.primary{
  background:linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color:#fff; 
  border:none; 
  padding:14px 16px; 
  border-radius:12px; 
  font-weight:600; 
  cursor:pointer; 
  font-size:15px; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  position:relative;
  overflow:hidden;
}

form .primary{
  width:100%;
}

.primary::after {
  content:'';
  position:absolute;
  top:50%; left:50%;
  width:0; height:0;
  border-radius:50%;
  background:rgba(255,255,255,.3);
  transform:translate(-50%, -50%);
  transition:width 0.6s ease, height 0.6s ease;
}

.primary:active::after {
  width:300px;
  height:300px;
}

.primary:hover{
  transform:translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

html.light .primary:hover{
  box-shadow: 0 8px 32px rgba(99,102,241,.25), 0 0 20px rgba(99,102,241,.2);
}

.primary[disabled]{
  opacity:.5; 
  cursor:not-allowed; 
  transform:none;
  box-shadow:none;
}

.primary.large{
  padding:16px 36px; 
  font-size:18px;
  border-radius:16px;
}

.ghost{
  background:transparent; 
  color:var(--text); 
  border:2px solid var(--stroke); 
  padding:10px 16px; 
  border-radius:12px; 
  cursor:pointer; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight:500;
}

.ghost:hover{
  border-color:var(--primary); 
  background:var(--primary);
  color:#fff;
  transform:translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.danger{
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color:#fff; 
  border:none; 
  padding:8px 14px; 
  border-radius:10px; 
  cursor:pointer; 
  transition:all 0.3s ease;
  font-weight:500;
}

.danger:hover{
  transform:translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hint{
  margin-top:12px; 
  color:var(--muted); 
  font-size:12px; 
  line-height:1.5;
  text-align:center;
}

/* Toast */
.toast{
  position:fixed; 
  bottom:30px; 
  right:30px; 
  background:var(--surface); 
  border:1px solid var(--primary); 
  padding:14px 20px; 
  border-radius:14px; 
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  opacity:0; 
  transform:translateY(20px) scale(0.9);
  transition:all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index:100;
  font-weight:500;
  max-width:350px;
}

.toast.show{
  opacity:1; 
  transform:translateY(0) scale(1);
  animation: float 2s ease-in-out infinite;
}

/* Admin Panel */
.admin-layout{
  display:grid; 
  gap:20px; 
  margin-top:20px;
}

.admin-layout h2{
  margin:0 0 20px; 
  font-size:28px;
  background:linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.toolbar{
  display:flex; 
  gap:12px; 
  align-items:center; 
  justify-content:space-between; 
  margin-bottom:20px; 
  flex-wrap:wrap;
}

.empty-state{
  text-align:center; 
  color:var(--muted); 
  padding:60px 20px;
  font-size:18px;
  animation: fadeIn 0.6s ease;
}

.booking-item{
  display:grid; 
  grid-template-columns:1fr auto; 
  gap:20px; 
  align-items:center; 
  background:var(--elev); 
  border:1px solid var(--stroke); 
  padding:16px 20px; 
  border-radius:16px; 
  margin-bottom:14px; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideIn 0.4s ease-out;
}

.booking-item:hover{
  border-color:var(--primary);
  transform:translateX(5px);
  box-shadow: var(--shadow-md);
}

html.light .booking-item:hover{
  box-shadow: 0 4px 16px rgba(99,102,241,.15);
}

.booking-info{
  display:grid; 
  gap:6px;
}

.booking-date{
  font-weight:600; 
  color:var(--text);
  font-size:15px;
}

.booking-contact{
  color:var(--muted); 
  font-size:14px;
}

.booking-clinic{
  color:var(--primary); 
  font-size:13px;
  font-weight:600;
  margin-top:4px;
}

.booking-actions{
  display:flex; 
  gap:10px; 
  align-items:center; 
  flex-wrap:wrap;
}

.badge{
  padding:8px 14px; 
  border-radius:999px; 
  font-size:12px; 
  font-weight:600; 
  white-space:nowrap;
  transition:all 0.3s ease;
}

.badge.pending{
  background:rgba(245,158,11,.2); 
  color:#f59e0b;
  animation: pulse 2s ease-in-out infinite;
}

.badge.approved{
  background:rgba(16,185,129,.2); 
  color:#10b981;
}

.badge.rejected{
  background:rgba(239,68,68,.2); 
  color:#ef4444;
}

.btn-approve{
  background:linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color:#fff; 
  border:none; 
  padding:9px 16px; 
  border-radius:10px; 
  cursor:pointer; 
  font-size:13px; 
  font-weight:600; 
  transition:all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-approve:hover{
  transform:translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-reject{
  background:linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color:#fff; 
  border:none; 
  padding:9px 16px; 
  border-radius:10px; 
  cursor:pointer; 
  font-size:13px; 
  font-weight:600; 
  transition:all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-reject:hover{
  transform:translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Modal */
.modal{
  display:none; 
  position:fixed; 
  top:0; 
  left:0; 
  width:100%; 
  height:100%; 
  background:rgba(0,0,0,.7); 
  backdrop-filter:blur(8px);
  z-index:1000; 
  align-items:center; 
  justify-content:center;
  animation: fadeIn 0.3s ease;
}

.modal-content{
  background:var(--surface); 
  border:1px solid var(--stroke); 
  border-radius:20px; 
  padding:28px; 
  max-width:420px; 
  width:90%; 
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header{
  display:flex; 
  justify-content:space-between; 
  align-items:center; 
  margin-bottom:24px;
}

.modal-header h2{
  margin:0; 
  font-size:22px;
  background:linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.modal-close{
  background:transparent; 
  border:none; 
  color:var(--text); 
  font-size:32px; 
  cursor:pointer; 
  padding:0; 
  width:36px; 
  height:36px; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  border-radius:10px; 
  transition:all 0.3s ease;
  line-height:1;
}

.modal-close:hover{
  background:var(--danger);
  color:#fff;
  transform:rotate(90deg);
}

/* Responsive */

/* Tablet */
@media (max-width: 980px){ 
  .layout{grid-template-columns:1fr} 
  .welcome-title{font-size:2.5rem}
  .welcome-text{font-size:1.2rem}
  
  .calendar-card, .form-card {
    padding: 16px;
  }
}

/* Mobile Large (phones in landscape) */
@media (max-width: 720px){ 
  .container {
    padding: 12px;
  }
  
  /* Header */
  .brand {
    font-size: 0.95rem;
  }
  
  .header-actions {
    gap: 8px;
  }
  
  .admin-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  select {
    padding: 6px 8px;
    font-size: 13px;
  }
  
  /* Welcome */
  .welcome-title {
    font-size: 2rem;
  }
  
  .welcome-text {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .primary.large {
    padding: 12px 28px;
    font-size: 16px;
  }
  
  /* Calendar */
  .calendar-card, .form-card {
    padding: 14px;
    border-radius: 16px;
  }
  
  .calendar-grid {
    gap: 6px;
  }
  
  .day-cell {
    border-radius: 10px;
    font-size: 14px;
  }
  
  .month-label {
    font-size: 1rem;
  }
  
  .nav-btn {
    padding: 6px 10px;
    font-size: 1.1rem;
  }
  
  /* Slots */
  .slot-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .slot {
    padding: 10px 8px;
    font-size: 13px;
  }
  
  .slots-title {
    font-size: 13px;
  }
  
  /* Form */
  .form-card h2 {
    font-size: 1.3rem;
  }
  
  input[type="text"],
  input[type="tel"],
  input[type="password"],
  input[type="date"],
  select {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .primary {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .selected-slot {
    font-size: 14px;
    padding: 10px;
  }
  
  /* Admin */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .booking-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 14px;
  }
  
  .booking-actions {
    justify-content: flex-start;
    gap: 8px;
  }
  
  /* Modal */
  .modal-content {
    padding: 20px;
    width: 95%;
  }
  
  .modal-header h2 {
    font-size: 18px;
  }
  
  /* Toast */
  .toast {
    bottom: 15px;
    right: 15px;
    left: 15px;
    padding: 10px 14px;
    font-size: 14px;
  }
}

  /* Mobile Small */
@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
  
  /* Header */
  .app-header {
    position: relative;
  }
  
  .header-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .brand {
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--stroke);
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .toggle {
    height: 35px;
    width: 75px;
  }
  
  .custom-select {
    min-width: 70px;
  }
  
  .select-selected {
    padding: 6px 28px 6px 10px;
    font-size: 13px;
  }
  
  /* Welcome */
  .welcome-title {
    font-size: 1.6rem;
  }
  
  .welcome-text {
    font-size: 0.9rem;
  }
  
  .primary.large {
    padding: 12px 24px;
    font-size: 15px;
  }
  
  /* Calendar */
  .calendar-grid {
    gap: 4px;
  }
  
  .day-cell {
    font-size: 12px;
    border-radius: 8px;
  }
  
  .calendar-header {
    margin-bottom: 10px;
  }
  
  .month-label {
    font-size: 0.9rem;
  }
  
  .nav-btn {
    padding: 4px 8px;
  }
  
  /* Slots */
  .slot-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .slot {
    padding: 12px 10px;
    font-size: 14px;
  }
  
  .slots-group {
    padding-top: 10px;
  }
  
  /* Form */
  .form-card h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
  
  .input-row {
    margin-bottom: 12px;
  }
  
  .input-row label {
    font-size: 13px;
  }
  
  input[type="text"],
  input[type="tel"],
  input[type="password"],
  input[type="date"] {
    font-size: 15px;
  }
  
  .selected-slot {
    font-size: 13px;
  }
  
  /* Admin */
  .admin-layout h2 {
    font-size: 1.4rem;
  }
  
  .booking-date {
    font-size: 14px;
  }
  
  .booking-contact {
    font-size: 13px;
  }
  
  .badge {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .btn-approve,
  .btn-reject {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* Modal */
  .modal-content {
    padding: 16px;
  }
  
  .modal-header h2 {
    font-size: 16px;
  }
  
  .modal-close {
    width: 32px;
    height: 32px;
    font-size: 28px;
  }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
  .welcome-title {
    font-size: 1.4rem;
  }
  
  .calendar-grid {
    gap: 3px;
  }
  
  .day-cell {
    font-size: 11px;
  }
  
  .slot {
    font-size: 13px;
    padding: 10px 8px;
  }
  
  .toggle {
    height: 32px;
    width: 70px;
  }
  
  .toggle::before {
    height: 18px;
    width: 18px;
  }
  
  .toggle::after {
    height: 16px;
    width: 16px;
  }
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--stroke);
  padding-bottom: 0;
}

.admin-tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 12px 20px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.05);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* Statistics */
.stats-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stats-filter {
  background: var(--elev);
  color: var(--text);
  border: 2px solid var(--stroke);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.stats-filter:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stats-filter.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--elev);
  border: 2px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-card.stat-success {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.stat-card.stat-danger {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.stat-card.stat-warning {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
}

.stat-card.stat-success .stat-value {
  color: var(--success);
}

.stat-card.stat-danger .stat-value {
  color: var(--danger);
}

.stat-card.stat-warning .stat-value {
  color: var(--warning);
}

/* Test Tools */
.test-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
}

.ghost.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.ghost.danger:hover {
  background: var(--danger);
  color: #fff;
}

/* Loading states */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
  .fade-in-up {
    animation: fadeIn 0.6s ease-out;
  }
}
