:root {
  --navy: #0f2942;
  --navy-light: #1a3a5c;
  --blue: #2563eb;
  --gold: #c9a24b;
  --bg: #f4f6f9;
  --green: #16a34a;
  --orange: #ea580c;
}

body {
  font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
  background: var(--bg);
}

/* ============ ADMIN LAYOUT ============ */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  padding: 1.25rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand i { color: var(--gold); font-size: 1.3rem; }
.sidebar-nav { flex: 1; padding: 1rem 0.6rem; display: flex; flex-direction: column; gap: .2rem; }
.sidebar-nav a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  padding: .6rem .9rem;
  border-radius: .5rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .92rem;
  transition: background .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: var(--blue); color: #fff; }
.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer a { color: #f87171; text-decoration: none; font-size: .9rem; }

.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  background: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}
.admin-content { padding: 1.5rem; flex: 1; }

.lang-switch a {
  display: inline-block;
  padding: .3rem .6rem;
  font-size: .8rem;
  color: #6b7280;
  text-decoration: none;
  border-radius: .3rem;
}
.lang-switch a.active { background: var(--navy); color: #fff; }

/* ============ CARDS / PANELS ============ */
.panel {
  background: #fff;
  border-radius: .75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.panel-title { font-weight: 600; margin-bottom: 1rem; color: var(--navy); }

.stat-card {
  background: #fff;
  border-radius: .75rem;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border-inline-start: 4px solid var(--blue);
}
.stat-card i { font-size: 1.8rem; color: var(--blue); }
.stat-navy i { color: var(--navy); } .stat-navy { border-inline-start-color: var(--navy); }
.stat-green i { color: var(--green); } .stat-green { border-inline-start-color: var(--green); }
.stat-orange i { color: var(--orange); } .stat-orange { border-inline-start-color: var(--orange); }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; color: #111827; }
.stat-label { display: block; font-size: .8rem; color: #6b7280; }

.avatar-sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ============ LOGIN ============ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
}
.login-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-brand i { font-size: 2.2rem; color: var(--gold); }
.login-brand h3 { margin-top: .5rem; color: var(--navy); font-size: 1.1rem; }

/* ============ PUBLIC DIRECTORY ============ */
.directory-header {
  background: var(--navy);
  color: #fff;
  padding: 1.25rem 0;
}
.directory-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; }
.directory-brand i { color: var(--gold); font-size: 1.5rem; }
.directory-header .lang-switch a { color: rgba(255,255,255,.7); }
.directory-header .lang-switch a.active { background: var(--gold); color: var(--navy); }

.directory-search .form-control, .directory-search .form-select { border-radius: .6rem; }

.employee-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  height: 100%;
  transition: transform .15s, box-shadow .15s;
}
.employee-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }

.employee-photo {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.employee-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 1.4rem;
}
.employee-name { font-weight: 700; color: #111827; }
.employee-position { font-size: .85rem; color: var(--blue); }
.employee-dept { font-size: .78rem; color: #6b7280; margin-top: .15rem; }
.employee-phone { margin-top: .75rem; font-size: .9rem; color: #374151; }

.employee-actions { display: flex; gap: .5rem; margin-top: .9rem; }
.btn-call, .btn-whatsapp {
  flex: 1;
  text-align: center;
  padding: .5rem;
  border-radius: .5rem;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
}
.btn-call { background: #eef2ff; color: var(--blue); }
.btn-call:hover { background: var(--blue); color: #fff; }
.btn-whatsapp { background: #dcfce7; color: var(--green); }
.btn-whatsapp:hover { background: var(--green); color: #fff; }

.employee-actions-secondary { display: flex; gap: .5rem; margin-top: .5rem; }
.btn-vcard {
  flex: 1;
  text-align: center;
  padding: .4rem;
  border-radius: .5rem;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #4b5563;
}
.btn-vcard:hover { background: var(--navy); color: #fff; }
.btn-qr {
  padding: .4rem .7rem;
  border-radius: .5rem;
  border: none;
  background: #f3f4f6;
  color: #4b5563;
}
.btn-qr:hover { background: var(--navy); color: #fff; }

.directory-footer { color: #9ca3af; }
