@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --bg: #f4f6f9;
  --text: #212529;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}

header.topbar {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--primary);
}

header .brand {
  font-weight: 700;
  font-size: 22px;
  color: var(--primary);
}

header nav a {
  text-decoration: none;
  color: var(--text);
  margin-left: 20px;
  transition: 0.3s;
  font-weight: 600;
}

header nav a:hover {
  color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

h2 {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 20px;
  color: var(--primary);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 15px;
}

label {
  min-width: 120px;
  font-weight: 600;
}

.input, select, textarea {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  min-width: 200px;
  outline: none;
  transition: 0.2s;
}

.input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th, .table td {
  border: 1px solid #eee;
  padding: 10px;
  text-align: center;
}

.table th {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
}

.btn {
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover { background: #0056b3; }

.btn.gray { background: var(--secondary); }
.btn.red { background: var(--danger); }
.btn.green { background: var(--success); }

.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

footer.foot {
  text-align: center;
  padding: 20px;
  background: #fff;
  color: #888;
  border-top: 1px solid #eee;
  margin-top: 30px;
}

.item-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.item-row select, .item-row input {
  flex: 1;
}

 /* header / topbar */
.topbar { width:100%; position:sticky; top:0; z-index:1100; backdrop-filter: blur(6px); background: rgba(255,255,255,0.78); border-bottom: 1px solid rgba(0,0,0,0.06); }
.topbar-inner { max-width:1300px; margin:0 auto; padding:10px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; font-family:'Cairo',sans-serif; }
.brand { display:flex; align-items:center; gap:12px; }
.brand .logo { width:44px; height:44px; border-radius:8px; background:linear-gradient(135deg,#007bff,#6610f2); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:18px; box-shadow:0 4px 12px rgba(0,0,0,0.08); }
.brand .title { font-size:16px; font-weight:600; color:#222; }
nav.top-nav { display:flex; gap:8px; align-items:center; }
nav.top-nav a { text-decoration:none; color:#333; padding:8px 12px; border-radius:8px; font-size:14px; transition:background .15s, color .15s; }
nav.top-nav a:hover { background: rgba(0,123,255,0.08); color:#007bff; }
.top-actions { display:flex; gap:10px; align-items:center; }
.search-box { display:flex; align-items:center; gap:8px; background:#fff; border:1px solid #ececec; padding:6px 8px; border-radius:8px; min-width:220px; box-shadow:0 2px 6px rgba(0,0,0,0.03); }
.search-box input { border:0; outline:0; font-family:'Cairo'; font-size:14px; width:140px; direction:ltr; padding-left:6px; }
.search-box button { background:transparent; border:0; cursor:pointer; color:#666; font-size:15px; }
.user-menu { position:relative; }
.user-btn { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:10px; background:#fff; border:1px solid #eee; cursor:pointer; }
.user-btn img.avatar { width:36px; height:36px; border-radius:50%; object-fit:cover; border:2px solid #f1f1f1; }
.user-dropdown { position:absolute; right:0; top:calc(100% + 8px); background:#fff; border-radius:10px; padding:8px; min-width:200px; box-shadow:0 10px 30px rgba(0,0,0,0.12); display:none; }
.user-dropdown a { display:block; padding:8px 10px; text-decoration:none; color:#333; border-radius:8px; font-size:14px; }
.user-dropdown a:hover { background:#f5f7ff; color:#0056b3; }
.theme-toggle { display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid #eee; padding:6px; border-radius:8px; cursor:pointer; font-size:13px; }

/* small screens */
@media(max-width:900px){
  nav.top-nav { display:none; }
  .search-box input { width:90px; }
}
