/* ==============================================================================
   SALONZB - KURUMSAL VE MODERN SAAS & ERP ARAYÜZ STİLLERİ (PROFESYONEL NORMAL GÖRÜNÜM)
   ============================================================================== */

:root {
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-border: #1e293b;
  
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* APP SHELL (SIDEBAR + MAIN CONTENT) */
.app-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* SIDEBAR */
aside.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 40;
}

.sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-badge {
  background: var(--primary);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-text);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  padding: 0 12px 6px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.nav-item i {
  width: 18px;
  height: 18px;
}

/* TOP NAVBAR */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

header.top-navbar {
  height: 64px;
  background-color: #fff;
  border-bottom: 1px solid var(--card-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.branch-select {
  padding: 6px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-badge-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid var(--card-border);
}

.role-select {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  outline: none;
  cursor: pointer;
}

/* MAIN CONTENT */
main.content-area {
  padding: 32px;
  flex: 1;
}

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

.page-title h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.page-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* CARDS & METRIC WIDGETS */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.metric-card .title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-card .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin: 8px 0 4px 0;
}

.metric-card .sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* DATA TABLES */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-header-bar h3 {
  font-size: 15px;
  font-weight: 700;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

table.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 18px;
  border-bottom: 1px solid var(--card-border);
}

table.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
}

table.data-table tr:hover td {
  background: #f8fafc;
}

/* EMPTY STATES */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state i {
  color: #cbd5e1;
  margin-bottom: 14px;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 18px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

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

.btn-secondary {
  background-color: #fff;
  border-color: var(--card-border);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: #f8fafc;
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}

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

/* STATUS BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.form-control {
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s;
}

.form-control:focus {
  border-color: var(--primary);
}

.modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==============================================================================
   GÖRSEL SAATLİK TAKVİM (HOURLY VISUAL CALENDAR GRID) STİLLERİ
   ============================================================================== */
.visual-cal-wrapper {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.visual-cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.visual-cal-table th,
.visual-cal-table td {
  border: 1px solid #edf2f7;
  vertical-align: top;
}

.cal-time-head {
  width: 80px;
  background: #f8fafc;
  padding: 14px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.cal-staff-head {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
}

.cal-staff-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-staff-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cal-staff-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cal-staff-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.cal-time-cell {
  background: #fafbfc;
  text-align: center;
  padding: 14px 6px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-sub);
  width: 80px;
}

.cal-slot-cell {
  padding: 6px;
  min-height: 80px;
  height: 80px;
  background: #ffffff;
  position: relative;
  transition: background-color 0.15s;
}

.cal-slot-cell:hover {
  background-color: #fafbfd;
}

.calendar-empty-slot {
  width: 100%;
  height: 100%;
  min-height: 68px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px dashed transparent;
  transition: all 0.15s ease;
}

.calendar-empty-slot:hover {
  background-color: rgba(79, 70, 229, 0.04);
  border-color: rgba(79, 70, 229, 0.25);
}

.slot-add-hint {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  align-items: center;
  gap: 4px;
}

.calendar-empty-slot:hover .slot-add-hint {
  display: inline-flex;
}

/* Randevu Kartı (3D Parçalı Süre Göstergeli) */
.calendar-event-card {
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(79, 70, 229, 0.14);
}

.cal-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-event-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 6px;
  border-radius: 4px;
}

.cal-event-deposit {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.cal-event-deposit.paid {
  background: var(--success-light);
  color: var(--success);
}

.cal-event-deposit.pending {
  background: var(--warning-light);
  color: var(--warning);
}

.cal-event-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-service {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
}

.cal-event-price {
  font-weight: 800;
  color: var(--text-main);
}

.cal-split-tag {
  font-size: 9px;
  font-weight: 700;
  color: #4338ca;
  background: #e0e7ff;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

/* ==============================================================================
   KULLANICILAR VE ROLLER (RBAC) STİLLERİ
   ============================================================================== */
.user-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
}

.badge-owner {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

.badge-manager {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-stylist {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-cashier {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-assistant {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.password-protected-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* ==============================================================================
   SALON GİRİŞ VE ÇIKIŞ (AUTHENTICATION) EKRANI STİLLERİ
   ============================================================================== */
.login-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  animation: modalIn 0.25s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge-large {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.login-brand-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.login-brand-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-input {
  padding: 11px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.login-error-alert {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.quick-login-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--card-border);
}

.quick-login-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.quick-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-login-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.quick-login-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.login-card-footer {
  text-align: center;
  margin-top: 20px;
}

.login-back-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.login-back-link:hover {
  color: var(--primary);
}

/* NAVBAR AUTH USER PROFILE & LOGOUT */
.auth-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius-sm);
}

.user-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-details-mini {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-details-mini .user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.user-details-mini .user-role {
  font-size: 10px;
  color: var(--text-muted);
}

