:root{
  --brand:#800080;
  --brand-2:#5a54d8;
  --bg:#f0f4f8;
  --card:#ffffff;
  --text:#1f2933;
  --muted:#6b7280;
  --border:#e5e7eb;
  --chip:#eef2ff;

  --shadow-soft:0 10px 30px rgba(15,23,42,0.08);
  --shadow-strong:0 18px 45px rgba(15,23,42,0.18);
  --radius-lg:18px;
  --radius-md:12px;
  --radius-pill:999px;
}

*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
}
body{
  font-family:'Poppins',system-ui,Segoe UI,Roboto,Arial;
  background:linear-gradient(145deg,#f7f5fb,#eef2ff 40%,#f0f4f8);
  color:var(--text);
  min-height:100vh;
  transition:background .3s,color .3s;
}

/* ================= HEADER & TOPNAV ================= */
header{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff;
  padding:16px 24px 18px;
  border-bottom:4px solid rgba(0,0,0,0.06);
  box-shadow:0 10px 25px rgba(15,23,42,.25);
  position:sticky;
  top:0;
  z-index:25;
}
h1{
  margin:0;
  font-size:1.3rem;
  letter-spacing:.02em;
}
.topnav{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.tab-btn{
  background:rgba(255,255,255,.14);
  color:#fdfcff;
  border:1px solid rgba(255,255,255,.35);
  padding:8px 13px;
  border-radius:var(--radius-pill);
  cursor:pointer;
  font-size:.85rem;
  display:flex;
  align-items:center;
  gap:6px;
  backdrop-filter:blur(8px);
  transition:.2s;
}
.tab-btn i{font-size:.9rem}
.tab-btn:hover{
  background:rgba(255,255,255,.28);
  transform:translateY(-1px);
}
.tab-btn.active{
  background:#ffffff;
  color:var(--brand);
  box-shadow:0 8px 18px rgba(15,23,42,.16);
}

/* ================= LOGIN & REGISTER ================= */
.login-wrapper{
  width:100%;
  min-height:calc(100vh - 90px);
  display:flex;
  justify-content:center;
  align-items:center;
  padding:32px 16px 40px;
}

.login-card{
  width:880px;
  max-width:100%;
  min-height:420px;
  background:var(--card);
  border-radius:26px;
  box-shadow:var(--shadow-strong);
  display:flex;
  overflow:hidden;
  position:relative;
}

/* sol panel */
.login-form-panel{
  width:50%;
  padding:46px 40px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.login-title{
  font-size:26px;
  color:var(--brand);
  margin-bottom:18px;
  font-weight:700;
}
.input-box{
  position:relative;
  width:100%;
  margin:14px 0;
}
.input-box i{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:#8d8d8d;
  font-size:.9rem;
}
.input-box input{
  width:100%;
  padding:13px 13px 13px 40px;
  border-radius:12px;
  background:#f4f5fb;
  border:1px solid #dde1f0;
  font-size:.9rem;
  transition:.18s;
}
.input-box input:focus{
  border-color:var(--brand-2);
  background:#ffffff;
  box-shadow:0 0 0 2px rgba(90,84,216,.25);
  outline:none;
}

/* floating label */
.input-box label{
  position:absolute;
  left:40px;
  top:50%;
  transform:translateY(-50%);
  color:#9ca3af;
  pointer-events:none;
  transition:.18s;
  font-size:.8rem;
}
.input-box input:focus ~ label,
.input-box input:not(:placeholder-shown) ~ label{
  top:3px;
  font-size:10px;
  color:var(--brand);
}

/* login button */
.login-btn{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  border:none;
  padding:13px 18px;
  width:100%;
  margin-top:16px;
  border-radius:var(--radius-pill);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 14px 30px rgba(90,84,216,.4);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:.9rem;
  letter-spacing:.01em;
  transition:.22s;
}
.login-btn i{font-size:.9rem}
.login-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 38px rgba(90,84,216,.52);
}

.no-account{
  margin-top:12px;
  font-size:.8rem;
  color:var(--muted);
}
.register-link{
  color:var(--brand);
  cursor:pointer;
  font-weight:600;
}

/* sağ panel */
.login-info-panel{
  width:50%;
  background:radial-gradient(circle at 0% 0%,#f9f5ff 0,#a855f7 30%,#4c1d95 85%);
  color:#fff;
  padding:40px 36px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
  position:relative;
}
.login-info-panel::before{
  content:"";
  position:absolute;
  inset:12px;
  border-radius:30px;
  border:1px solid rgba(255,255,255,.16);
  pointer-events:none;
}
.login-info-panel h1{
  font-size:30px;
  font-weight:700;
  margin-bottom:6px;
}
.login-info-panel p{
  font-size:.9rem;
  opacity:.9;
}
.info-icon{
  font-size:62px;
  margin-top:26px;
  opacity:.95;
}

/* register kutusu (ayrı ekran için) */
.register-container{
  max-width:460px;
  margin:30px auto 40px;
  padding:22px 22px 24px;
  background:var(--card);
  border-radius:22px;
  box-shadow:var(--shadow-soft);
  display:none;
  flex-direction:column;
  gap:12px;
}

/* login & register responsive */
@media(max-width:860px){
  .login-card{
    flex-direction:column;
    border-radius:24px;
  }
  .login-form-panel,
  .login-info-panel{
    width:100%;
    padding:32px 26px 34px;
  }
  .login-info-panel{order:-1; min-height:180px;}
}
@media(max-width:560px){
  .login-card{box-shadow:0 10px 24px rgba(15,23,42,.22);}
}

/* ================= GENEL FORM ELEMANLARI ================= */
input,select,textarea{
  font-family:'Poppins',system-ui,Segoe UI,Roboto,Arial;
}
input,select{
  width:100%;
  padding:9px 10px;
  border-radius:10px;
  border:1px solid #dde2f2;
  outline:none;
  background:#f8fafc;
  font-size:.85rem;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand-2);
  box-shadow:0 0 0 1px rgba(90,84,216,.32);
  background:#ffffff;
}

/* generic buttons */
.button{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff;
  border:none;
  padding:9px 13px;
  border-radius:var(--radius-pill);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.8rem;
  font-weight:600;
  box-shadow:0 10px 22px rgba(90,84,216,.35);
  transition:.2s;
}
.button:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(90,84,216,.45);
}
.button.ghost{
  background:#ffffff;
  color:var(--brand);
  border:1px solid rgba(128,0,128,.3);
  box-shadow:none;
}
.button.ghost:hover{
  background:#f5f3ff;
}

/* küçük ikonlu buton */
.icon-button{
  border:none;
  background:#f3f4ff;
  color:#4b5563;
  border-radius:10px;
  padding:6px 8px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:.7rem;
  transition:.17s;
}
.icon-button i{font-size:.75rem;}
.icon-button:hover{
  background:#e0e7ff;
  color:#111827;
}

/* ================= ANA KARTLAR / MAİN ================= */
main{
  margin:24px auto 40px;
  max-width:1340px;
  padding:22px 22px 26px;
  background:var(--card);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
}
.container h2{
  margin:0 0 14px;
  font-size:1.15rem;
}

/* ================= STATS ================= */
.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:18px;
}
.stat{
  background:linear-gradient(145deg,#ffffff,#f4f5ff);
  border-radius:var(--radius-lg);
  padding:14px 16px;
  box-shadow:0 12px 28px rgba(15,23,42,.07);
  border:1px solid #e3e5fb;
}
.stat-label{
  font-size:.78rem;
  color:var(--muted);
  margin-bottom:4px;
}
.stat-value{
  font-size:1.5rem;
  font-weight:700;
}

/* ================= GRID FORM ================= */
.flex-container{
  display:grid;
  gap:10px;
  margin-bottom:18px;
}
.grid-6{
  grid-template-columns:repeat(6,minmax(120px,1fr));
}
@media(max-width:1100px){
  .grid-6{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:720px){
  .grid-6{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px){
  .grid-6{grid-template-columns:1fr;}
}

/* ================= TOOLBAR ================= */
.toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  margin:6px 0 18px;
  flex-wrap:wrap;
}
.toolbar select,
.toolbar input[type="date"]{
  max-width:180px;
}
.toolbar .spacer{flex:1}

/* ================= TABLE ================= */
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:.82rem;
}
th,td{
  padding:9px 10px;
  text-align:left;
  vertical-align:top;
}
th{
  background:#4a4e69;
  color:#f9fafb;
  font-weight:600;
}
th:first-child{border-top-left-radius:10px;}
th:last-child{border-top-right-radius:10px;}
tbody tr{
  background:#ffffff;
}
tbody tr:nth-child(even){
  background:#f9fafb;
}
tbody tr:hover{
  background:#eef2ff;
}
td{
  border-bottom:1px solid #e5e7eb;
}

/* ================= BADGE & CHIP ================= */
.badge{
  padding:4px 10px;
  border-radius:var(--radius-pill);
  font-size:.72rem;
  font-weight:600;
  display:inline-block;
}
.badge.plan{background:#e0e7ff;color:#3730a3;}
.badge.arrived{background:#dcfce7;color:#166534;}
.badge.cancel{background:#fee2e2;color:#991b1b;}
.badge.defer{background:#fef3c7;color:#92400e;}

#slotLegend{
  display:flex;
  gap:8px;
  margin-bottom:10px;
}
.chip{
  padding:6px 12px;
  border-radius:var(--radius-pill);
  font-weight:600;
  font-size:.72rem;
  border:1px solid var(--border);
  background:#f9fafb;
}
.chip.empty{background:#f8fafc;}
.chip.full{background:#fee2e2;color:#b91c1c;}

/* ================= SLOT GRID (GÜNLÜK PLANLAMA) ================= */
.slot-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
@media(max-width:1100px){
  .slot-grid{grid-template-columns:repeat(3,1fr);}
}
@media(max-width:800px){
  .slot-grid{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:520px){
  .slot-grid{grid-template-columns:1fr;}
}
.slot-card{
  border-radius:16px;
  padding:10px 12px 12px;
  background:#ffffff;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:86px;
  justify-content:space-between;
  border:1px solid #e5e7eb;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
}
.slot-time{
  font-weight:700;
  font-size:.9rem;
}
.slot-empty .slot-time{color:#111827;}
.slot-full{
  background:linear-gradient(145deg,#fff1f2,#ffe4e6);
  border-color:#fecaca;
}
.slot-full .slot-time{color:#b91c1c;}
.slot-actions{
  display:flex;
  gap:8px;
}
.slot-patient{
  font-size:.8rem;
  color:#111827;
}

/* ================= MODAL ================= */
.modal{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2000;
}
.modal-content{
  width:min(520px,92%);
  background:#ffffff;
  border-radius:20px;
  padding:18px 18px 16px;
  box-shadow:var(--shadow-strong);
}
.modal-content h3{
  margin:0 0 10px;
}
.modal-row{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:10px;
  margin-bottom:9px;
  align-items:center;
}
.modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:8px;
}

/* ================= SETTINGS GRID ================= */
.settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
@media(max-width:720px){
  .settings-grid{grid-template-columns:1fr;}
}

/* ================= TOAST ================= */
#notification{
  display:none;
  position:fixed;
  top:88px;
  left:50%;
  transform:translateX(-50%);
  background:#111827;
  color:#f9fafb;
  padding:11px 16px;
  border-radius:var(--radius-pill);
  box-shadow:0 10px 26px rgba(15,23,42,.35);
  z-index:3000;
  max-width:90%;
  text-align:center;
  font-size:.8rem;
}

/* ================= FAB BUTONLAR ================= */
#logoutButton{
  position:fixed;
  bottom:22px;
  right:86px;
  width:50px;
  height:50px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff;
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 16px 34px rgba(90,84,216,.55);
}
#logoutButton i{font-size:1rem;}

#darkModeToggle{
  position:fixed;
  top:20px;
  right:20px;
  background:#111827;
  color:#f9fafb;
  border:none;
  padding:8px 10px;
  border-radius:var(--radius-pill);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:.8rem;
  box-shadow:0 12px 28px rgba(15,23,42,.55);
}

/* ================= DARK MODE ================= */
.dark-mode{
  background:#020617;
  color:#e5e7eb;
}
.dark-mode main{
  background:#020617;
  box-shadow:0 14px 32px rgba(0,0,0,.65);
  border:1px solid #1f2937;
}
.dark-mode .stat{
  background:radial-gradient(circle at 0 0,#0f172a,#020617 70%);
  border-color:#1e293b;
  box-shadow:0 10px 26px rgba(0,0,0,.8);
}
.dark-mode table tbody tr{background:#020617;}
.dark-mode table tbody tr:nth-child(even){background:#030712;}
.dark-mode th{background:#111827;}
.dark-mode td{border-color:#111827;}
.dark-mode .button.ghost{
  background:#020617;
  color:#c7d2fe;
  border-color:#4c1d95;
}
.dark-mode .slot-card{
  background:#020617;
  border-color:#111827;
}
.dark-mode .slot-full{
  background:radial-gradient(circle at 0 0,#450a0a,#020617 75%);
}
.dark-mode .modal-content{
  background:#020617;
  border:1px solid #1e293b;
}
.dark-mode .login-card{
  background:#020617;
  box-shadow:0 18px 40px rgba(0,0,0,.85);
}
.dark-mode .login-form-panel{
  background:transparent;
}
.dark-mode .input-box input{
  background:#020617;
  border-color:#111827;
  color:#e5e7eb;
}
.dark-mode .input-box input:focus{
  border-color:#6366f1;
  box-shadow:0 0 0 2px rgba(79,70,229,.45);
}
.dark-mode .login-info-panel::before{
  border-color:rgba(148,163,184,.32);
}
.dark-mode #notification{
  background:#020617;
}
/* ================= CLEAN PREMIUM QUICK MODAL ================= */

#quickModal.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 13, 30, 0.55);
    backdrop-filter: blur(8px);
    z-index: 2400;
}

/* Modal Kart */
#quickModal .modal-content {
    width: min(780px, 95%);
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 28px 20px;
    box-shadow: 0 30px 55px rgba(15,19,48,0.45);
    position: relative;
    overflow: hidden;
}

/* Üst Mor Çizgi */
#quickModal .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #6e0ba6, #9b5fff, #ff7ce5);
}

/* Başlık */
#quickModal h3 {
    margin: 10px 0 20px;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #2b2b2b;
}

#quickModal h3::before {
    content: "\f073";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #6e0ba6, #9b5fff);
    color: #fff;
    box-shadow: 0 8px 22px rgba(110,11,166,0.55);
}

/* 2 Kolon GRID */
#quickModal .modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
    margin: 5px 0 12px;
}

#quickModal .modal-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#quickModal .modal-item.full {
    grid-column: span 2;
}

/* Label */
#quickModal .modal-item label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.02em;
}

/* Input / Select */
#quickModal .modal-item input,
#quickModal .modal-item select {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dcdce0;
    background: #fafafa;
    font-size: 14px;
    transition: .2s;
}

#quickModal .modal-item input:focus,
#quickModal .modal-item select:focus {
    background: #fff;
    border-color: #6e0ba6;
    box-shadow: 0 0 0 3px rgba(110,11,166,.18);
    transform: translateY(-1px);
}

/* Action Buton Bar */
#quickModal .modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Kapat Butonu */
#quickModal .modal-actions .button.ghost {
    background: #fff;
    color: #6b7280;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    padding: 10px 18px;
}

/* Kaydet Butonu */
#quickModal .modal-actions .button.primary {
    background: linear-gradient(135deg, #6e0ba6, #9b5fff);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    padding: 10px 22px;
    box-shadow: 0 14px 32px rgba(110,11,166,0.55);
}

#quickModal .modal-actions .button.primary:hover {
    transform: translateY(-1px);
}

/* ============ PREMIUM 2 COLUMN QUICK MODAL ============ */

.modal-xl {
  width: 520px !important;
  max-width: 90%;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* GRID */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 15px 0 5px;
}

.modal-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-item.full {
  grid-column: span 2;
}

.modal-item label {
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.modal-item input,
.modal-item select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dcdce0;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: all .2s ease;
}

.modal-item input:focus,
.modal-item select:focus {
  border-color: #6e0ba6;
  box-shadow: 0 0 0 3px rgba(110, 11, 166, .15);
}

/* ACTIONS */
.modal-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions .primary {
  background: #6e0ba6;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
}
.clinic-status {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.clinic-free { background:#dcfce7; color:#166534; }
.clinic-busy { background:#fee2e2; color:#991b1b; }
.clinic-break { background:#fef3c7; color:#92400e; }

.clinic-action-btn {
  background:#eef2ff;
  border:1px solid #d4d4ff;
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:.75rem;
  transition:.2s;
}

.clinic-action-btn:hover {
  background:#e3e0ff;
}
/* styles.css (rastgele uygun bir yere) */

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.service-item:last-child {
  border-bottom: none;
}
.service-info {
  display: flex;
  flex-direction: column;
}
.service-name {
  font-weight: 600;
}
.service-price {
  font-size: 0.9em;
  color: var(--muted);
}
.service-actions button {
  margin-left: 8px;
  padding: 5px 8px;
  font-size: 0.8em;
}/* ================= POLIKLINIK ================= */
#poliklinikView .container h2 {
  margin-bottom: 16px;
}

#clinicList tr:hover {
  background:#eef2ff !important;
}

.clinic-badge {
  padding:4px 10px;
  border-radius:20px;
  font-size:.75rem;
  font-weight:600;
}

.clinic-open {
  background:#dcfce7;
  color:#166534;
}

.clinic-closed {
  background:#fee2e2;
  color:#991b1b;
}
