/* assets/css/style.css — עיצוב מותאם אישי */

/* ── Google Font ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');

/* ── משתנים ─────────────────────────────────────── */
:root {
  --sidebar-width: 240px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: rgba(255,255,255,0.07);
  --sidebar-active: rgba(99,198,164,0.15);
  --sidebar-accent: #63c6a4;
  --topbar-height: 60px;
  --brand-color: #1a9e75;
  --brand-dark: #0f7a58;
  --radius: 10px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --font: 'Heebo', sans-serif;
}

/* ── בסיס ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: #f4f6fb;
  direction: rtl;
  color: #1e293b;
  font-size: 14px;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ── Layout Shell ────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--brand-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar-brand-sub {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.25);
  padding: 12px 18px 4px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  font-weight: 400;
  border-right: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: rgba(255,255,255,0.85);
  background: var(--sidebar-hover);
}

.nav-link.active {
  color: #fff;
  background: var(--sidebar-active);
  border-right-color: var(--sidebar-accent);
  font-weight: 500;
}

.nav-link i {
  font-size: 17px;
  flex-shrink: 0;
}

.nav-link .badge {
  margin-right: auto;
  font-size: 10px;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.user-role {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
}

.user-logout {
  margin-right: auto;
  color: rgba(255,255,255,0.3);
  font-size: 16px;
  transition: color 0.15s;
}

.user-logout:hover { color: #e74c3c; }

/* ── Main Content ────────────────────────────────── */
.main-content {
  margin-right: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title i { color: var(--brand-color); font-size: 18px; }

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

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f6fb;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 220px;
  transition: border-color 0.15s;
}

.topbar-search:focus-within { border-color: var(--brand-color); }
.topbar-search i { color: #94a3b8; font-size: 15px; }
.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 13px;
  color: #1e293b;
  width: 100%;
}
.topbar-search input::placeholder { color: #94a3b8; }

/* ── Page Body ───────────────────────────────────── */
.page-body {
  padding: 24px;
  flex: 1;
}

/* ── Stats Cards ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid #e8ecf0;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.green  { background: #d1fae5; color: #059669; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }

.stat-body {}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label { font-size: 12px; color: #64748b; }

.stat-change {
  font-size: 11px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 20px;
}

.stat-change.up   { background:#d1fae5; color:#059669; }
.stat-change.down { background:#fee2e2; color:#dc2626; }
.stat-change.neutral { background:#f1f5f9; color:#64748b; }

/* ── Cards / Panels ──────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e8ecf0;
  box-shadow: var(--shadow-sm);
}

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

.card-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header-title i { color: var(--brand-color); }
.card-body { padding: 20px; }

/* ── Tables ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.table-office {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table-office thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8ecf0;
  white-space: nowrap;
}

.table-office tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.table-office tbody tr:hover td { background: #fafbff; }
.table-office tbody tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────────── */
.badge-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status i { font-size: 12px; }

/* ── Buttons ─────────────────────────────────────── */
.btn-brand {
  background: var(--brand-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, transform 0.1s;
}

.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-brand:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-outline:hover { border-color: var(--brand-color); color: var(--brand-color); }

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-icon:hover { border-color: var(--brand-color); color: var(--brand-color); }
.btn-icon.danger:hover { border-color: #ef4444; color: #ef4444; }

/* ── Forms ───────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}

.form-label .req { color: #ef4444; margin-right: 2px; }

.form-control, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d9e0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(26,158,117,0.12);
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── Alerts ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert i { font-size: 18px; flex-shrink: 0; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger   { background: #fee2e2; color: #7f1d1d; }
.alert-warning  { background: #fef3c7; color: #78350f; }
.alert-info     { background: #dbeafe; color: #1e3a5f; }
.btn-close { margin-right: auto; background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.5; }
.btn-close:hover { opacity: 1; }

/* ── Login Page ──────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #0f4532 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 36px 40px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

.login-logo {
  width: 52px;
  height: 52px;
  background: var(--brand-color);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin: 0 auto 16px;
}

.login-title {
  text-align: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-sub {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 12.5px;
  margin-bottom: 28px;
}

.login-field label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
  font-weight: 500;
}

.login-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.login-input-wrap i.prefix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 16px;
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  padding: 10px 40px 10px 12px;
  color: #fff;
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.login-input-wrap input::placeholder { color: rgba(255,255,255,0.25); }
.login-input-wrap input:focus { border-color: var(--brand-color); }

.login-input-wrap .toggle-pass {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.login-btn {
  width: 100%;
  background: var(--brand-color);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s, transform 0.1s;
}

.login-btn:hover { background: var(--brand-dark); }
.login-btn:active { transform: scale(0.99); }

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.login-security {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  gap: 4px;
}

.login-forgot {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: color 0.15s;
}

.login-forgot:hover { color: rgba(255,255,255,0.6); }

.login-alert {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 16px;
}

.breadcrumb a { color: #94a3b8; }
.breadcrumb a:hover { color: var(--brand-color); }
.breadcrumb .sep { color: #cbd5e1; font-size: 10px; }
.breadcrumb .current { color: #475569; font-weight: 500; }

/* ── Client Profile ──────────────────────────────── */
.client-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.client-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-color), #0f6e56);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.client-info-name { font-size: 18px; font-weight: 700; color: #1e293b; }
.client-info-id   { font-size: 12.5px; color: #94a3b8; margin-top: 2px; }
.client-tabs { margin-right: auto; display: flex; gap: 6px; }

.tab-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-family: var(--font);
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  text-decoration: none;
}

.tab-btn:hover, .tab-btn.active {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
}

/* ── Settings Page ───────────────────────────────── */
.settings-section {
  max-width: 680px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  gap: 16px;
}

.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 13.5px; font-weight: 500; color: #1e293b; }
.settings-row-desc  { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-right: 0;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .login-box {
    padding: 24px 20px;
  }
}
