:root {
  --moh-red: #c8102e;
  --moh-red-dark: #9b0c24;
  --moh-green: #007a33;
  --moh-bg: #f4f6f9;
  --moh-sidebar: #1a2238;
  --moh-sidebar-hover: #2a3658;
  --moh-text: #2c3e50;
  --moh-muted: #7b8794;
  --moh-border: #e3e8ee;
}

* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: var(--moh-bg);
  color: var(--moh-text);
  margin: 0;
}

/* ===== LOGIN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c8102e 0%, #1a2238 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  padding: 40px 35px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-card .logo {
  text-align: center;
  margin-bottom: 20px;
}
.login-card .logo img { height: 70px; }
.login-card h3 {
  text-align: center;
  color: var(--moh-red);
  font-weight: 700;
  margin: 10px 0 5px;
}
.login-card .subtitle {
  text-align: center;
  color: var(--moh-muted);
  font-size: 14px;
  margin-bottom: 25px;
}
.login-card .form-control {
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid var(--moh-border);
}
.login-card .form-control:focus {
  border-color: var(--moh-red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.15);
}
.btn-moh {
  background: var(--moh-red);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  width: 100%;
  transition: 0.2s;
}
.btn-moh:hover { background: var(--moh-red-dark); color: #fff; }

/* ===== LAYOUT ===== */
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  background: var(--moh-sidebar);
  color: #cbd5e1;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: 0.3s;
  z-index: 1000;
}
.sidebar .brand {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .brand img { height: 40px; background: #fff; padding: 4px; border-radius: 6px; }
.sidebar .brand-text { font-weight: 700; color: #fff; font-size: 14px; line-height: 1.2; }
.sidebar .brand-text small { color: #94a3b8; font-weight: 400; font-size: 11px; }

.sidebar nav { padding: 15px 10px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  transition: 0.2s;
}
.sidebar nav a:hover { background: var(--moh-sidebar-hover); color: #fff; }
.sidebar nav a.active { background: var(--moh-red); color: #fff; }
.sidebar nav a i { width: 18px; text-align: center; }

.main {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
}
.topbar {
  background: #fff;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--moh-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar h5 { margin: 0; font-weight: 700; }
.topbar .user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.topbar .user .avatar {
  width: 36px; height: 36px;
  background: var(--moh-red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.content { padding: 25px; }

.menu-toggle {
  background: none;
  border: none;
  font-size: 20px;
  display: none;
  color: var(--moh-text);
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
}

/* ===== DASHBOARD ===== */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  border: 1px solid var(--moh-border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: 0.2s;
  height: 100%;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.stat-card .icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}
.stat-card .icon.red { background: var(--moh-red); }
.stat-card .icon.green { background: var(--moh-green); }
.stat-card .icon.blue { background: #2563eb; }
.stat-card .label { color: var(--moh-muted); font-size: 13px; margin: 0; }
.stat-card .value { font-size: 26px; font-weight: 700; margin: 0; }

.action-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--moh-border);
  text-align: center;
  text-decoration: none;
  color: var(--moh-text);
  display: block;
  transition: 0.2s;
  height: 100%;
}
.action-card:hover {
  border-color: var(--moh-red);
  color: var(--moh-red);
  transform: translateY(-3px);
}
.action-card i { font-size: 36px; color: var(--moh-red); margin-bottom: 12px; }
.action-card h6 { margin: 0; font-weight: 700; }
.action-card p { color: var(--moh-muted); font-size: 13px; margin: 6px 0 0; }

/* ===== CARDS / FORMS ===== */
.panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--moh-border);
  overflow: hidden;
}
.panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--moh-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-header h5 { margin: 0; font-weight: 700; }
.panel-body { padding: 22px; }

.form-label { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #475569; }
.form-control, .form-select {
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--moh-border);
  font-size: 14px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--moh-red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}
.input-group .btn-gen {
  background: var(--moh-green);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 14px;
  font-size: 13px;
}
.input-group .btn-gen:hover { background: #005c25; color: #fff; }
.input-group .form-control { border-radius: 8px 0 0 8px; }

.btn-primary-moh {
  background: var(--moh-red);
  border: none;
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
}
.btn-primary-moh:hover { background: var(--moh-red-dark); color: #fff; }
.btn-outline-moh {
  background: #fff;
  border: 1px solid var(--moh-border);
  color: var(--moh-text);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
}
.btn-outline-moh:hover { background: #f1f5f9; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table.moh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.moh-table thead th {
  background: #f8fafc;
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--moh-border);
  white-space: nowrap;
}
table.moh-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--moh-border);
  vertical-align: middle;
}
table.moh-table tbody tr:hover { background: #fafbfc; }
.action-icons { display: flex; gap: 8px; }
.action-icons a {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  transition: 0.2s;
}
.act-view { background: #dbeafe; color: #1d4ed8; }
.act-edit { background: #fef3c7; color: #b45309; }
.act-qr   { background: #dcfce7; color: #15803d; }
.act-del  { background: #fee2e2; color: #b91c1c; cursor: pointer; }
.action-icons a:hover { transform: scale(1.1); }

.arabic { font-family: 'Traditional Arabic', 'Amiri', serif; direction: rtl; }
