/* ═══════════════════════════════════════════════
   AJANDA  —  Dark Theme Design System
═══════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ── */
:root {
  --bg-base:       #0d0f17;
  --bg-surface:    #131620;
  --bg-elevated:   #1a1e2e;
  --bg-hover:      #202435;
  --bg-card:       #181c2a;

  --border-subtle: #252a3d;
  --border-muted:  #2e3450;
  --border-focus:  #6366f1;

  --text-primary:  #e8eaf6;
  --text-secondary:#8b90a7;
  --text-muted:    #555c7a;

  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-glow:   rgba(99,102,241,.28);
  --accent-dim:    rgba(99,102,241,.12);

  --success: #22c55e;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #38bdf8;

  --r-sm: 6px; --r-md: 12px; --r-lg: 18px;
  --r-xl: 24px; --r-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.55);
  --glow:      0 0 24px var(--accent-glow);

  --ease: .22s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-muted); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ════════════════════════════════
   LAYOUT
════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: 270px 1fr;
  grid-template-rows: 62px 1fr;
  grid-template-areas: "hd hd" "sb mn";
  min-height: 100vh;
}

/* ── Header ── */
.app-header {
  grid-area: hd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--glow);
  flex-shrink: 0;
}
.brand-name {
  font-size: 1.1rem; font-weight: 700; letter-spacing: -.3px;
  background: linear-gradient(90deg, #e8eaf6, #818cf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.header-right {
  display: flex; align-items: center; gap: 12px;
}
.header-clock {
  font-size: .8rem; color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 5px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

/* ── Sidebar ── */
.app-sidebar {
  grid-area: sb;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 22px;
  overflow-y: auto;
}

/* Mini Calendar */
.mini-cal {
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  padding: 14px;
  border: 1px solid var(--border-subtle);
}
.mini-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.mini-cal-title {
  font-size: .88rem; font-weight: 600;
}
.mcal-nav {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; width: 26px; height: 26px;
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  transition: all var(--ease); font-size: .9rem;
}
.mcal-nav:hover { color: var(--accent-light); background: var(--accent-dim); }

.mcal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
}
/* mini cal da aynı */
.mcal-dn:nth-child(6) { color: #f59e0b; }
.mcal-dn:nth-child(7) { color: #ef4444; }
.mcal-day {
  text-align: center; font-size: .75rem;
  padding: 5px 2px;
  border-radius: var(--r-sm); cursor: pointer;
  color: var(--text-secondary); transition: all var(--ease);
  position: relative; user-select: none;
}
.mcal-day:hover:not(.empty) { background: var(--bg-hover); color: var(--text-primary); }
.mcal-day.today { background: var(--accent-dim); color: var(--accent-light); font-weight: 700; }
.mcal-day.selected { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 10px var(--accent-glow); }
.mcal-day.has-ev::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--accent-light);
}
.mcal-day.selected.has-ev::after { background: rgba(255,255,255,.8); }
.mcal-day.empty { cursor: default; }

/* Sidebar sections */
.sb-section-label {
  font-size: .68rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0 2px; margin-bottom: 6px;
}

.upcoming-list { display: flex; flex-direction: column; gap: 7px; }
.upcoming-item {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  cursor: pointer;
  transition: all var(--ease);
}
.upcoming-item:hover { background: var(--bg-hover); transform: translateX(2px); }
.upcoming-item-title {
  font-size: .8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upcoming-item-meta { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }

/* ── Main ── */
.app-main {
  grid-area: mn;
  padding: 26px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
}

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--r-md);
  border: none; font-size: .86rem; font-weight: 600;
  cursor: pointer; transition: all var(--ease);
  font-family: var(--font); line-height: 1;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: #fff; box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 6px 22px var(--accent-glow); }
.btn-primary:active { transform: none; }

.btn-ghost {
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-muted); }

.btn-danger {
  background: rgba(239,68,68,.12); color: var(--danger);
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger:hover { background: rgba(239,68,68,.22); }

.btn-sm { padding: 6px 14px; font-size: .78rem; border-radius: var(--r-sm); }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: var(--r-sm); }

/* ════════════════════════════════
   VIEW CONTROLS
════════════════════════════════ */
.view-controls {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.view-tabs {
  display: flex; gap: 3px;
  background: var(--bg-elevated);
  padding: 4px; border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
}
.view-tab {
  padding: 7px 18px; border-radius: var(--r-sm); border: none;
  background: none; color: var(--text-secondary);
  font-size: .82rem; font-weight: 500; cursor: pointer;
  transition: all var(--ease); font-family: var(--font);
}
.view-tab:hover { color: var(--text-primary); }
.view-tab.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.month-nav {
  display: flex; align-items: center; gap: 10px;
}
.month-nav-label {
  font-size: 1rem; font-weight: 600; min-width: 160px; text-align: center;
}

/* ════════════════════════════════
   MONTH GRID
════════════════════════════════ */
.month-view { display: flex; flex-direction: column; }

.month-day-names {
  display: grid; grid-template-columns: repeat(7,1fr);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.mdn {
  text-align: center; padding: 11px 6px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-muted);
}
/* Pzt=ilk sütun normal, Cmt=6.sütun sarı, Paz=7.sütun kırmızı */
.mdn:nth-child(6) { color: #f59e0b; }
.mdn:nth-child(7) { color: #ef4444; }

.month-grid {
  display: grid; grid-template-columns: repeat(7,1fr);
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  overflow: hidden;
}

.month-cell {
  min-height: 100px; padding: 7px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: background var(--ease);
  cursor: pointer;
  position: relative;
}
.month-cell:hover { background: var(--bg-hover); }
.month-cell:nth-child(7n) { border-right: none; }
.month-cell.today { background: rgba(99,102,241,.07); }
.month-cell.today .cell-num { color: var(--accent-light); font-weight: 700; }
.month-cell.other-month .cell-num { color: var(--text-muted); opacity: .4; }
.month-cell.selected { outline: 1px solid var(--accent); outline-offset: -1px; }

.cell-num { font-size: .75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.cell-events { display: flex; flex-direction: column; gap: 2px; }
.cell-pill {
  font-size: .64rem; padding: 1px 5px;
  border-radius: 4px; color: #fff; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
  transition: filter var(--ease);
}
.cell-pill:hover { filter: brightness(1.3); }
.cell-more { font-size: .62rem; color: var(--text-muted); padding-top: 1px; }

/* ════════════════════════════════
   DAY / LIST VIEW
════════════════════════════════ */
.day-header {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px;
}
.day-title { font-size: 1.5rem; font-weight: 700; }
.day-sub   { font-size: .86rem; color: var(--text-muted); }

.events-list { display: flex; flex-direction: column; gap: 10px; }

.event-card {
  background: var(--bg-card);
  border-radius: var(--r-lg); padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  display: flex; align-items: flex-start; gap: 14px;
  transition: all var(--ease); cursor: pointer;
  position: relative; overflow: hidden;
}
.event-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--ev-color, var(--accent));
}
.event-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-muted);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}

.ev-time {
  display: flex; flex-direction: column; align-items: center;
  min-width: 50px; gap: 2px;
}
.ev-time-s { font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-time-sep { width: 1px; height: 14px; background: var(--border-subtle); }
.ev-time-e { font-size: .72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.ev-body { flex: 1; min-width: 0; }
.ev-title { font-size: .93rem; font-weight: 600; margin-bottom: 3px; }
.ev-desc {
  font-size: .8rem; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-badges { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

.badge {
  font-size: .64rem; font-weight: 600; letter-spacing: .3px;
  padding: 2px 9px; border-radius: var(--r-pill); text-transform: uppercase;
}
.ev-actions {
  display: flex; gap: 5px;
  opacity: 0; transition: opacity var(--ease);
}
.event-card:hover .ev-actions { opacity: 1; }

/* ════════════════════════════════
   EMPTY STATE
════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; gap: 10px;
  color: var(--text-muted); text-align: center;
}
.empty-icon { font-size: 2.8rem; opacity: .35; }
.empty-title { font-size: .96rem; font-weight: 600; color: var(--text-secondary); }
.empty-sub   { font-size: .82rem; }

/* ════════════════════════════════
   MODAL
════════════════════════════════ */
.backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .24s ease;
}
.backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-elevated);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-muted);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99,102,241,.1);
  width: 100%; max-width: 530px; max-height: 90vh; overflow-y: auto;
  transform: translateY(18px) scale(.97);
  transition: transform .24s cubic-bezier(.4,0,.2,1);
}
.backdrop.open .modal { transform: none; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0;
  background: var(--bg-elevated); z-index: 1;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: var(--bg-hover); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); width: 30px; height: 30px;
  border-radius: var(--r-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--ease); line-height: 1;
}
.modal-close:hover { color: var(--text-primary); background: var(--border-muted); }

.modal-body  { padding: 20px 22px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border-subtle);
}

/* ════════════════════════════════
   FORM ELEMENTS
════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: .78rem; font-weight: 600;
  letter-spacing: .3px; color: var(--text-secondary);
  text-transform: uppercase;
}
.form-label span { color: var(--danger); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .9rem;
  padding: 10px 14px;
  width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* ════════════════════════════════
   CUSTOM DATE PICKER
════════════════════════════════ */
.date-picker-wrap { position: relative; }

.date-display {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: .9rem;
  padding: 10px 14px;
  width: 100%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color var(--ease), box-shadow var(--ease);
  user-select: none;
}
.date-display:hover { border-color: var(--border-muted); }
.date-display.open  { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-dim); }
.date-display-text { flex: 1; }
.date-display-icon { color: var(--text-muted); font-size: .9rem; }

.date-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-muted);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  z-index: 500; padding: 14px;
  width: 280px;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity var(--ease), transform var(--ease);
}
.date-dropdown.open { opacity: 1; pointer-events: all; transform: none; }

.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.dp-nav {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; width: 28px; height: 28px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; transition: all var(--ease);
}
.dp-nav:hover { color: var(--accent-light); background: var(--accent-dim); }
.dp-title {
  font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: 4px 10px; border-radius: var(--r-sm);
  transition: background var(--ease);
}
.dp-title:hover { background: var(--bg-hover); }

.dp-day-names {
  display: grid; grid-template-columns: repeat(7,1fr);
  margin-bottom: 4px;
}
.dp-dn {
  text-align: center; font-size: .62rem; font-weight: 700;
  letter-spacing: .5px; color: var(--text-muted);
  text-transform: uppercase; padding: 2px 0 6px;
}

.dp-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.dp-day {
  text-align: center; font-size: .78rem;
  padding: 7px 2px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--ease); user-select: none;
  position: relative;
}
.dp-day:hover:not(.empty) { background: var(--bg-hover); color: var(--text-primary); }
.dp-day.today  { background: var(--accent-dim); color: var(--accent-light); font-weight: 700; }
.dp-day.selected { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 10px var(--accent-glow); }
.dp-day.other  { color: var(--text-muted); opacity: .5; }
.dp-day.empty  { cursor: default; }

.dp-year-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 4px;
}
.dp-year-item {
  text-align: center; font-size: .78rem;
  padding: 7px 4px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--ease);
}
.dp-year-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dp-year-item.current { background: var(--accent); color: #fff; }

.dp-month-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 4px;
}
.dp-month-item {
  text-align: center; font-size: .78rem;
  padding: 8px 4px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--ease);
}
.dp-month-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dp-month-item.current { background: var(--accent); color: #fff; }

/* ════════════════════════════════
   CUSTOM TIME PICKER
════════════════════════════════ */
.time-picker-wrap { position: relative; }

.time-display {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: .9rem;
  padding: 10px 14px;
  width: 100%;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: border-color var(--ease), box-shadow var(--ease);
  user-select: none;
}
.time-display:hover { border-color: var(--border-muted); }
.time-display.open  { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-dim); }
.time-display-icon  { color: var(--text-muted); font-size: .88rem; }
.time-display-val   { flex: 1; font-variant-numeric: tabular-nums; font-weight: 500; }
.time-display-arrow { color: var(--text-muted); font-size: .75rem; margin-left: auto; }
.time-display.open .time-display-arrow i { transform: rotate(180deg); }

.time-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-muted);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  z-index: 500; padding: 14px;
  min-width: 200px;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity var(--ease), transform var(--ease);
}
.time-dropdown.open { opacity: 1; pointer-events: all; transform: none; }

.time-cols { display: flex; gap: 8px; align-items: flex-start; }

.time-col-label {
  font-size: .64rem; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--text-muted);
  text-align: center; margin-bottom: 6px;
}
.time-sep-col {
  display: flex; align-items: center; padding-top: 28px;
  font-size: 1.1rem; font-weight: 700; color: var(--text-muted);
}

.time-scroll {
  height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-muted) transparent;
}
.time-scroll::-webkit-scrollbar { width: 3px; }
.time-scroll::-webkit-scrollbar-thumb { background: var(--border-muted); border-radius: 3px; }

.time-item {
  text-align: center; padding: 7px 10px;
  border-radius: var(--r-sm); cursor: pointer;
  font-size: .84rem; font-variant-numeric: tabular-nums;
  color: var(--text-secondary); transition: all var(--ease);
  white-space: nowrap;
}
.time-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.time-item.selected { background: var(--accent); color: #fff; font-weight: 600; }

.time-confirm {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: flex-end;
}

/* ════════════════════════════════
   COLOR PICKER DOTS
════════════════════════════════ */
.color-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.color-dot {
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; transition: all var(--ease);
  border: 2px solid transparent; position: relative;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--border-focus), 0 0 12px rgba(0,0,0,.4);
}
.color-dot.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .58rem; color: #fff;
}

/* ════════════════════════════════
   TIME GRID (Day detail view)
════════════════════════════════ */
.time-grid {
  display: flex; gap: 0;
}
.tg-hours {
  display: flex; flex-direction: column;
  width: 52px; flex-shrink: 0;
}
.tg-hour-label {
  height: 56px;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding-right: 10px; padding-top: 2px;
  font-size: .68rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.tg-slots {
  flex: 1; position: relative;
  border-left: 1px solid var(--border-subtle);
}
.tg-row {
  height: 56px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.tg-row:nth-child(even) { background: rgba(255,255,255,.01); }
.tg-event-block {
  position: absolute; left: 4px; right: 4px;
  border-radius: var(--r-sm);
  padding: 4px 8px; cursor: pointer;
  transition: filter var(--ease);
  overflow: hidden; z-index: 1;
}
.tg-event-block:hover { filter: brightness(1.2); z-index: 2; }
.tg-ev-title { font-size: .72rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev-time  { font-size: .62rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }

/* ════════════════════════════════
   DETAIL PANEL
════════════════════════════════ */
.detail-panel {
  background: var(--bg-elevated);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-subtle);
  padding: 22px;
  display: none;
}
.detail-panel.visible { display: block; }

.detail-color-bar {
  height: 4px; border-radius: var(--r-pill);
  margin-bottom: 16px;
}
.detail-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.detail-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: .8rem; color: var(--text-secondary);
}
.detail-desc {
  font-size: .88rem; color: var(--text-secondary);
  line-height: 1.65; border-top: 1px solid var(--border-subtle);
  padding-top: 14px; margin-top: 2px;
}

/* ════════════════════════════════
   TOAST NOTIFICATION
════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column-reverse; gap: 8px;
  z-index: 2000;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-muted);
  border-radius: var(--r-md);
  padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-md);
  font-size: .86rem;
  animation: toastIn .3s cubic-bezier(.4,0,.2,1);
  min-width: 220px; max-width: 340px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  }
.toast.info    { border-left: 3px solid var(--info);    }
.toast-icon { font-size: 1rem; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger);  }
.toast.info    .toast-icon { color: var(--info);    }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

/* ════════════════════════════════
   CUSTOM SELECT WRAPPER
════════════════════════════════ */
.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  pointer-events: none;
  width: 10px; height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23555c7a' d='M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.form-select { padding-right: 32px; cursor: pointer; }

/* ════════════════════════════════
   ROW HELPERS
════════════════════════════════ */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ════════════════════════════════
   LOADING SPINNER
════════════════════════════════ */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent);
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════
   FONT AWESOME ICON TWEAKS
════════════════════════════════ */
.fa-xs { font-size: .72em; }

/* brand icon */
.brand-icon i {
  font-size: 1.1rem;
  color: #fff;
}

/* view tab icons */
.view-tab i {
  font-size: .78rem;
  opacity: .8;
}
.view-tab.active i { opacity: 1; }

/* button icons */
.btn i { font-size: .85em; line-height: 1; }

/* detail meta icons */
.detail-meta-item i {
  width: 16px;
  text-align: center;
  color: var(--accent-light);
  font-size: .82rem;
}

/* upcoming meta icons */
.upcoming-item-meta i {
  font-size: .68rem;
  opacity: .7;
}

/* empty state icon */
.empty-icon i {
  font-size: 2.8rem;
  opacity: .3;
  color: var(--text-secondary);
}

/* modal close */
.modal-close i { font-size: .9rem; }

/* sidebar section label icons */
.sb-section-label i {
  font-size: .62rem;
  opacity: .7;
}

/* form label icons */
.form-label i {
  opacity: .6;
  margin-right: 1px;
}

/* date/time picker icons */
.date-display-icon i,
.time-display-icon i {
  font-size: .88rem;
  color: var(--text-muted);
}

.time-display-arrow i {
  font-size: .68rem;
  transition: transform var(--ease);
}
.time-display.open .time-display-arrow i {
  transform: rotate(180deg);
}

/* dp nav arrows */
.dp-nav i, .mcal-nav i, .btn-icon i {
  font-size: .78rem;
}

/* toast icons */
.toast-icon i { font-size: 1rem; }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas: "hd" "mn";
  }
  .app-sidebar { display: none; }
  .app-main { padding: 16px; }
  .row-2 { grid-template-columns: 1fr; }
}

/* ════════════════════════════════
   MODAL SIZES
════════════════════════════════ */
.modal-lg { max-width: 600px; }
.modal-sm { max-width: 420px; }

/* ════════════════════════════════
   FORM DIVIDER
════════════════════════════════ */
.form-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 0 12px;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.form-divider i { color: var(--accent); font-size: .72rem; }

/* ════════════════════════════════
   RECURRENCE BOX
════════════════════════════════ */
.recurrence-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 14px;
}

.recurrence-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rec-tab {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ease);
  font-family: var(--font);
}
.rec-tab:hover { color: var(--text-primary); border-color: var(--border-muted); }
.rec-tab.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-color: rgba(99,102,241,.35);
  font-weight: 600;
}

.recurrence-options {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.rec-end-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.rec-end-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.rec-end-choices { display: flex; gap: 16px; flex-wrap: wrap; }

.rec-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .84rem;
  color: var(--text-secondary);
  transition: color var(--ease);
  user-select: none;
}
.rec-radio:hover { color: var(--text-primary); }
.rec-radio input[type="radio"] { display: none; }
.rec-radio-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--ease);
  flex-shrink: 0;
}
.rec-radio input:checked ~ .rec-radio-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.rec-radio input:checked ~ .rec-radio-dot::after {
  content: '';
  width: 5px; height: 5px;
  background: #fff;
  border-radius: 50%;
}
.rec-radio input:checked ~ * { color: var(--accent-light); }

.rec-preview {
  margin-top: 12px;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  display: none;
}
.rec-preview.visible { display: block; }
.rec-preview strong { color: var(--accent-light); }

/* yinelenen etkinlik rozeti */
.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  background: rgba(245,158,11,.12);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,.2);
}

/* ════════════════════════════════
   CONFIRM MODAL
════════════════════════════════ */
.confirm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 10px 22px 24px;
}

.confirm-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(239,68,68,.12);
  margin-top: 4px;
}
.confirm-icon-wrap.warn  { background: rgba(245,158,11,.12); }
.confirm-icon-wrap.info  { background: rgba(99,102,241,.12); }

.confirm-icon-wrap i {
  font-size: 1.5rem;
  color: var(--danger);
}
.confirm-icon-wrap.warn  i { color: var(--warning); }
.confirm-icon-wrap.info  i { color: var(--accent-light); }

.confirm-message {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}
.confirm-message strong { color: var(--text-primary); }

.confirm-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.confirm-choices .btn {
  justify-content: center;
  width: 100%;
  padding: 11px 20px;
}
.confirm-choices .btn-row {
  display: flex;
  gap: 8px;
}
.confirm-choices .btn-row .btn {
  flex: 1;
}

/* mini cal gün isimleri tekrar */
.mcal-dn {
  text-align: center; font-size: .62rem; font-weight: 700;
  letter-spacing: .5px; color: var(--text-muted);
  text-transform: uppercase; padding: 3px 0 6px;
}

/* ════════════════════════════════
   LIST VIEW DATE HEADER
════════════════════════════════ */
.list-date-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 2px;
}
.today-chip {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,.2);
  text-transform: uppercase;
}

/* ════════════════════════════════
   LIST SEARCH BOX
════════════════════════════════ */
.list-search-wrap {
  position: relative;
  margin-bottom: 20px;
}

.list-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .88rem;
  pointer-events: none;
  transition: color var(--ease);
}

.list-search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .92rem;
  padding: 11px 42px 11px 40px;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.list-search-input::placeholder {
  color: var(--text-muted);
}

.list-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-card);
}

.list-search-input:focus ~ .list-search-icon,
.list-search-wrap:focus-within .list-search-icon {
  color: var(--accent-light);
}

.list-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .68rem;
  transition: all var(--ease);
  line-height: 1;
}
.list-search-clear:hover {
  color: var(--text-primary);
  background: var(--border-muted);
}

/* ── Arama eşleşme vurgusu ── */
mark.search-hl {
  background: rgba(99,102,241,.28);
  color: var(--accent-light);
  border-radius: 3px;
  padding: 0 1px;
  font-weight: 600;
}

/* ── Sonuç sayısı chip ── */
.search-count-row {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.search-count {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,.18);
}

/* ════════════════════════════════
   BUGÜN BUTONU
════════════════════════════════ */
.btn-today {
  padding: 7px 16px;
  border-radius: var(--r-md);
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--ease);
  white-space: nowrap;
  margin-left: 6px;
  box-shadow: 0 2px 10px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.12);
  letter-spacing: .2px;
  position: relative;
  overflow: hidden;
}
.btn-today::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
  pointer-events: none;
}
.btn-today i {
  font-size: .68rem;
  opacity: .9;
}
.btn-today:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(99,102,241,.55), inset 0 1px 0 rgba(255,255,255,.15);
  filter: brightness(1.1);
}
.btn-today:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(99,102,241,.3);
  filter: brightness(.97);
}
