/* Espero Randevu — uzman paneli */
.erv-panel {
  --erv-wine: #7C3049;
  --erv-wine-soft: #f3e8ec;
  --erv-gold: #BF9B4F;
  --erv-sage: #7C8B6F;
  --erv-sage-soft: #eef1ea;
  --erv-cream: #FBF6EF;
  --erv-line: #E1D5C4;
  --erv-ink: #2b2b2b;
  --erv-muted: #7a7a7a;
  color: var(--erv-ink);
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  box-sizing: border-box;
  font-size: 15px;
}
.erv-panel *, .erv-panel *::before, .erv-panel *::after { box-sizing: border-box; }
.erv-panel [hidden] { display: none !important; }
.erv-panel h2 { font-size: 20px; margin: 0 0 8px; color: var(--erv-wine); }
.erv-panel h3 { font-size: 18px; margin: 0 0 8px; color: var(--erv-wine); }

.erv-box { background: #fff; border: 1px solid var(--erv-line); border-radius: 10px; padding: 20px; margin: 0 0 20px; }
.erv-help { color: var(--erv-muted); margin: 0 0 14px; line-height: 1.55; }
.erv-login { max-width: 420px; margin: 40px auto; }
.erv-login form p { margin: 0 0 12px; }
.erv-login input[type=text], .erv-login input[type=password] { width: 100%; }

/* Başlık ve sekmeler */
.erv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--erv-line); margin-bottom: 18px; }
.erv-hello { font-size: 22px; font-weight: 600; color: var(--erv-wine); margin-bottom: 8px; }
.erv-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.erv-tabs a { padding: 9px 14px; border-radius: 8px 8px 0 0; text-decoration: none; color: var(--erv-ink); }
.erv-tabs a.is-active { background: var(--erv-wine); color: #fff; }
.erv-head-links { display: flex; gap: 14px; padding-bottom: 10px; font-size: 14px; }
.erv-head-links a { color: var(--erv-wine); }

.erv-msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }
.erv-msg.is-ok { background: var(--erv-sage-soft); border-left: 4px solid var(--erv-sage); }
.erv-msg.is-err { background: #fdecec; border-left: 4px solid #c0392b; }

/* Düğmeler ve form */
.erv-btn { display: inline-block; background: var(--erv-wine); color: #fff; border: 1px solid var(--erv-wine); border-radius: 8px; padding: 8px 14px; font-size: 14px; line-height: 1.3; cursor: pointer; text-decoration: none; }
.erv-btn:hover { filter: brightness(1.08); color: #fff; }
.erv-btn.is-ghost { background: #fff; color: var(--erv-wine); }
.erv-btn.is-ghost:hover { background: var(--erv-wine-soft); }
.erv-btn.is-danger { background: #a93226; border-color: #a93226; }
.erv-btn.is-small { padding: 4px 10px; font-size: 13px; }
.erv-btn:disabled { opacity: .45; cursor: default; }
.erv-link { background: none; border: 0; padding: 0 4px; color: #a93226; cursor: pointer; text-decoration: underline; font-size: 13px; }
.erv-panel label { display: block; margin: 0 0 12px; font-size: 14px; }
.erv-panel input[type=text], .erv-panel input[type=email], .erv-panel input[type=tel], .erv-panel input[type=date], .erv-panel select {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--erv-line); border-radius: 6px; background: #fff; font-size: 15px; min-height: 40px;
}
.erv-panel label.erv-check, .erv-panel label.erv-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; }
.erv-panel fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.erv-panel legend { font-size: 14px; margin-bottom: 6px; padding: 0; }
.erv-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.erv-actions { margin-top: 8px; }

/* Takvim */
.erv-cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.erv-cal-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.erv-cal-title { font-weight: 600; font-size: 17px; }
.erv-legend { color: var(--erv-muted); font-size: 13px; margin: 0 0 10px; }
.erv-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 10px; border: 1px solid var(--erv-line); }
.erv-sw:first-child { margin-left: 0; }
.erv-sw.is-open { background: var(--erv-sage-soft); }
.erv-sw.is-online { background: var(--erv-wine); }
.erv-sw.is-office { background: var(--erv-gold); }

.erv-cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--erv-line); border-radius: 10px; background: #fff; }
.erv-cal { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; margin: 0; }
.erv-cal th, .erv-cal td { border: 1px solid #efe7da; padding: 3px; vertical-align: top; }
.erv-cal thead th { background: var(--erv-cream); font-size: 13px; text-align: center; padding: 8px 4px; font-weight: 600; }
.erv-cal thead th span { font-weight: 400; color: var(--erv-muted); }
.erv-cal thead th.is-today { background: var(--erv-wine-soft); color: var(--erv-wine); }
.erv-cal tbody th { width: 58px; font-size: 12px; color: var(--erv-muted); font-weight: 400; text-align: right; padding-right: 6px; background: #fff; }
.erv-cal td { height: 54px; }
.erv-cal td.is-open { background: var(--erv-sage-soft); }
.erv-cal td.is-past { opacity: .55; }
.erv-slot { width: 100%; height: 100%; min-height: 46px; border: 0; background: transparent; color: transparent; font-size: 18px; cursor: pointer; border-radius: 6px; }
.erv-slot:hover, .erv-slot:focus { background: rgba(124, 48, 73, .08); color: var(--erv-wine); outline: none; }
.erv-sess { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 5px 7px; margin: 0 0 2px; cursor: pointer; color: #fff; line-height: 1.25; font-size: 13px; }
.erv-sess strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erv-sess small { opacity: .9; font-size: 11px; }
.erv-sess.is-online { background: var(--erv-wine); }
.erv-sess.is-office { background: var(--erv-gold); color: #2b2b2b; }
.erv-sess.st-completed { opacity: .7; }
.erv-sess.st-no_show { opacity: .7; text-decoration: line-through; }

/* Modal */
.erv-modal { position: fixed; inset: 0; background: rgba(30, 20, 25, .45); z-index: 99999; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.erv-modal-box { position: relative; background: #fff; border-radius: 12px; padding: 22px; width: 100%; max-width: 520px; box-shadow: 0 10px 40px rgba(0, 0, 0, .2); }
.erv-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--erv-muted); }
body.erv-modal-open { overflow: hidden; }
.erv-s-meta { color: var(--erv-muted); margin: 0 0 6px; }
.erv-s-contact { font-size: 14px; margin: 0 0 14px; }
.erv-s-status { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.erv-s-status form { margin: 0; }
.erv-details { border-top: 1px solid var(--erv-line); padding: 10px 0 0; margin-top: 10px; }
.erv-details summary { cursor: pointer; font-weight: 600; color: var(--erv-wine); margin-bottom: 10px; }

/* Çalışma saatleri */
.erv-presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.erv-rule-day { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #f1ebe2; }
.erv-rule-label { font-weight: 600; }
.erv-rule-intervals { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.erv-rule-empty { color: var(--erv-muted); font-size: 14px; }
.erv-interval { display: inline-flex; align-items: center; gap: 4px; background: var(--erv-cream); border-radius: 8px; padding: 4px 6px; }
.erv-interval select { width: auto !important; display: inline-block !important; margin: 0 !important; min-height: 34px !important; padding: 4px 6px !important; }
.erv-exc-list, .erv-preview { list-style: none; margin: 14px 0 0; padding: 0; }
.erv-exc-list li, .erv-preview li { padding: 8px 0; border-top: 1px solid #f1ebe2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.erv-exc-list form { margin: 0 0 0 auto; }
.erv-exc-list em { color: var(--erv-muted); }
.erv-tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.erv-tag.is-closed { background: #fdecec; color: #a93226; }
.erv-tag.is-open { background: var(--erv-sage-soft); color: #4f5c44; }

@media (max-width: 640px) {
  .erv-rule-day { grid-template-columns: 1fr auto; }
  .erv-rule-intervals { grid-column: 1 / -1; grid-row: 2; }
  .erv-hello { font-size: 19px; }
  .erv-cal-title { order: -1; width: 100%; }
}

/* Bildirim seçenekleri ve WhatsApp */
.erv-notify { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; margin: 4px 0 8px; font-size: 14px; }
.erv-notify > span { margin-right: 12px; }
.erv-msg.is-wa { background: #eaf7ee; border-left: 4px solid #25a35a; }
.erv-msg.is-wa p { margin: 0 0 8px; }
.erv-wa-text { background: #fff; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.erv-btn.is-wa { background: #25a35a; border-color: #25a35a; }

/* Ofis takvimi */
.erv-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.erv-subtabs a { padding: 7px 14px; border: 1px solid var(--erv-line); border-radius: 20px; text-decoration: none; color: var(--erv-ink); background: #fff; font-size: 14px; }
.erv-subtabs a.is-active { background: var(--erv-gold); border-color: var(--erv-gold); color: #2b2b2b; font-weight: 600; }
a.erv-sess { text-decoration: none; }
.erv-sess.is-busy { cursor: default; color: #fff; }
.erv-slot.is-request { color: transparent; font-size: 12px; }
.erv-slot.is-request:hover, .erv-slot.is-request:focus { color: var(--erv-wine); }
.erv-req { font-size: 11px; background: #fff7e0; color: #7a5b12; border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; }
.erv-requests ul { list-style: none; margin: 0; padding: 0; }
.erv-requests li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid #f1ebe2; }
.erv-requests li em { color: var(--erv-muted); font-size: 14px; }
.erv-requests form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.erv-req-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.erv-panel input.erv-inline-input { display: inline-block; width: 170px; margin: 0; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.erv-tag.is-pending { background: #fff7e0; color: #7a5b12; }
.erv-tag.is-approved { background: var(--erv-sage-soft); color: #4f5c44; }
.erv-tag.is-rejected { background: #fdecec; color: #a93226; }

/* Danışanlar */
.erv-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.erv-list-head h2 { margin: 0; }
.erv-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.erv-panel .erv-filter input[type=search] { flex: 1 1 220px; display: block; margin: 0; padding: 8px 10px; border: 1px solid var(--erv-line); border-radius: 6px; min-height: 40px; font-size: 15px; }
.erv-panel .erv-filter select { width: auto; margin: 0; }
.erv-table-scroll { overflow-x: auto; }
.erv-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.erv-table th { text-align: left; font-weight: 600; color: var(--erv-muted); border-bottom: 1px solid var(--erv-line); padding: 8px 10px; white-space: nowrap; }
.erv-table td { border-bottom: 1px solid #f1ebe2; padding: 9px 10px; vertical-align: top; }
.erv-table a { color: var(--erv-wine); text-decoration: none; }
.erv-client-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.erv-client-head h2 { font-size: 24px; }
.erv-client-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.erv-grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.erv-panel textarea { display: block; width: 100%; padding: 10px; border: 1px solid var(--erv-line); border-radius: 6px; font-size: 15px; font-family: inherit; }
.erv-note { border-top: 1px solid #f1ebe2; padding: 12px 0; margin-top: 12px; }
.erv-note header { font-size: 12px; color: var(--erv-muted); margin-bottom: 4px; }
.erv-note-body { line-height: 1.6; white-space: normal; }
.erv-note details { margin-top: 6px; font-size: 13px; }
.erv-note summary { cursor: pointer; color: var(--erv-muted); }
.erv-note details form { margin-top: 8px; }
.erv-history { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.erv-history li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid #f1ebe2; }
.erv-history li a { color: var(--erv-ink); font-weight: 600; text-decoration: none; }
.erv-history li.st-cancelled a { text-decoration: line-through; color: var(--erv-muted); }
.erv-tag.is-confirmed { background: #eef2f8; color: #34507a; }
.erv-tag.is-completed { background: var(--erv-sage-soft); color: #4f5c44; }
.erv-tag.is-no_show, .erv-tag.is-cancelled { background: #fdecec; color: #a93226; }
.erv-tag.is-held, .erv-tag.is-pending_payment { background: #fff7e0; color: #7a5b12; }
.erv-h2-summary { cursor: pointer; font-size: 18px; font-weight: 600; color: var(--erv-wine); }
.erv-counts { list-style: none; margin: 0; padding: 0; }
.erv-counts li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #f1ebe2; }
.erv-counts li a { color: var(--erv-wine); text-decoration: none; }
.erv-counts .erv-count { margin-left: auto; color: var(--erv-muted); font-size: 14px; }
.erv-counts li.is-active { background: var(--erv-cream); }
.erv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.erv-names { margin-top: 12px; padding: 12px 16px; background: var(--erv-cream); border-radius: 8px; }
.erv-names ol { margin: 0; padding-left: 20px; columns: 2; }
@media (max-width: 800px) { .erv-grid-2 { grid-template-columns: 1fr; } .erv-names ol { columns: 1; } }

/* Online / yüz yüze saat düzenleyicileri */
.erv-same-toggle { font-weight: 600; margin: 4px 0 14px !important; }
.erv-editor { border-top: 1px solid var(--erv-line); padding-top: 12px; margin-top: 12px; }
.erv-editor h3 { margin: 0 0 8px; }

/* Temanın genel button:hover/focus arka planını (mor) panel düğmelerinde ez */
.erv-panel .erv-btn:hover, .erv-panel .erv-btn:focus { background: var(--erv-wine); color: #fff; }
.erv-panel .erv-btn.is-ghost:hover, .erv-panel .erv-btn.is-ghost:focus { background: var(--erv-wine-soft); color: var(--erv-wine); }
.erv-panel .erv-btn.is-danger:hover, .erv-panel .erv-btn.is-danger:focus { background: #a93226; }
.erv-panel .erv-btn.is-wa:hover, .erv-panel .erv-btn.is-wa:focus { background: #25a35a; }
.erv-panel .erv-link:hover, .erv-panel .erv-link:focus, .erv-panel .erv-x:hover, .erv-panel .erv-x:focus { background: none; }
.erv-panel .erv-sess.is-online:hover, .erv-panel .erv-sess.is-online:focus { background: var(--erv-wine); color: #fff; filter: brightness(1.1); }
.erv-panel .erv-sess.is-office:hover, .erv-panel .erv-sess.is-office:focus { background: var(--erv-gold); color: #2b2b2b; filter: brightness(1.05); }
.erv-panel .erv-slot.is-request:hover, .erv-panel .erv-slot.is-request:focus { background: rgba(124, 48, 73, .08); }
.erv-panel button, .erv-panel .erv-btn { text-transform: none; letter-spacing: normal; }
.erv-panel button:focus-visible { outline: 2px solid var(--erv-wine); outline-offset: 2px; }

/* Adım 7: sonraki seans, ödeme bekleyen seans */
.erv-s-quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.erv-s-quick form { margin: 0; }
.erv-s-receipt { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; padding: 8px 10px; background: #F7F2EC; border-radius: 6px; font-size: 14px; }
.erv-s-receipt[hidden] { display: none; }
.erv-s-receipt form { margin: 0; }
.erv-pay-choice { margin-top: 2px; }
.erv-sess.st-pending_payment { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); outline: 1px dashed rgba(0,0,0,.25); }

/* WhatsApp hatırlatma listesi */
.erv-wa-reminders summary { cursor: pointer; list-style: none; }
.erv-wa-reminders summary::-webkit-details-marker { display: none; }
.erv-wa-reminders summary h2 { display: inline; }
.erv-wa-reminders ul { list-style: none; margin: 0; padding: 0; }
.erv-wa-reminders li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid #f1ebe2; }
.erv-wa-reminders li strong { margin-right: 6px; }
.erv-wa-done { color: #2f7d4f; font-weight: 600; font-size: 14px; margin-right: 8px; }
.erv-tag.is-wa-sent { background: #eef2f8; color: #34507a; }
.erv-tag.is-wa-delivered { background: var(--erv-sage-soft); color: #4f5c44; }
.erv-tag.is-wa-read { background: #e3f5ea; color: #1f7a45; }
.erv-tag.is-wa-failed { background: #fdecec; color: #a93226; }
.erv-wa-reminders form { display: inline; margin: 0 0 0 6px; }
.erv-msg.is-info { background: #f7f2ec; border-left: 4px solid #b9a58c; }
.erv-label { font-weight: 600; font-size: 14px; }
.erv-acc-detail { margin-top: 14px; }
.erv-acc-detail summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.erv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.erv-stats > div { background: #f7f2ec; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.erv-stats span { font-size: 13px; color: var(--erv-muted); }
.erv-stats strong { font-size: 20px; }
.erv-stats small { font-size: 12px; color: var(--erv-muted); }
.erv-weekly summary { cursor: pointer; }
.erv-weekly summary h2 { display: inline; }
.erv-weekly-settings { align-items: end; }
.erv-weekly-list { list-style: none; margin: 10px 0; padding: 0; }
.erv-weekly-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #f1ebe2; }
.erv-weekly-list li > span { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.erv-weekly-list form { margin: 0; }
.erv-tag.is-wa-manual { background: #eaf7ee; color: #1f6b3d; }

.erv-copy { display: flex; gap: 6px; align-items: center; }
.erv-copy input { flex: 1; min-width: 0; font-size: 13px; }
.erv-s-paylink[hidden] { display: none; }

.erv-s-pay { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; font-size: 14px; }
.erv-s-pay[hidden], .erv-s-pay-btns[hidden] { display: none; }
.erv-s-pay-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.erv-s-pay form { margin: 0; }
