/* هوية بصرية Ahmed Hossny — أسود / أبيض / رمادي، مستوحاة من شكل اللوجو السداسي */

:root {
  --ah-black: #141414;
  --ah-charcoal: #262626;
  --ah-gray: #6b6b6b;
  --ah-light-gray: #e9e9e9;
  --ah-off-white: #f7f7f6;
  --ah-white: #ffffff;
  --ah-accent: #e2231a; /* أحمر اللوجو الأصلي */
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Tajawal', 'Cairo', Tahoma, sans-serif;
  background: var(--ah-off-white);
  color: var(--ah-black);
  direction: rtl;
}

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

.topbar {
  background: var(--ah-black);
  color: var(--ah-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 3px solid var(--ah-accent);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

.hex-logo {
  width: 34px;
  height: 34px;
  display: inline-block;
}

.topbar nav a {
  margin-inline-start: 18px;
  color: #d8d8d8;
  font-size: 14px;
}
.topbar nav a:hover { color: var(--ah-white); }

.topbar .user-chip {
  font-size: 13px;
  color: var(--ah-gray);
  background: var(--ah-charcoal);
  padding: 6px 12px;
  border-radius: 20px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.card {
  background: var(--ah-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--ah-light-gray);
}

h1, h2, h3 { color: var(--ah-black); }
h1 { font-size: 22px; }
h2 { font-size: 18px; margin-top: 0; }

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}
.btn-primary { background: var(--ah-black); color: var(--ah-white); }
.btn-primary:hover { background: var(--ah-charcoal); }
.btn-outline { background: transparent; color: var(--ah-black); border: 1px solid var(--ah-black); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-danger { background: #b3261e; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--ah-light-gray); font-size: 14px; }
th { background: var(--ah-off-white); font-weight: 700; color: var(--ah-charcoal); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-admin { background: #1d1d1d; color: #fff; }
.badge-branch_manager { background: var(--ah-accent); color: #fff; }
.badge-engineer { background: var(--ah-light-gray); color: var(--ah-charcoal); }

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}
label { font-size: 13px; color: var(--ah-gray); display: block; margin-bottom: 4px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

.items-table input[type=text] { margin-bottom: 0; }
.items-table input[type=number] { margin-bottom: 0; width: 100px; }

.totals-box { background: var(--ah-off-white); border-radius: 8px; padding: 14px; }
.totals-box .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.totals-box .row.final { font-weight: 800; font-size: 17px; border-top: 2px solid var(--ah-accent); margin-top: 6px; padding-top: 8px; }

.flash-error { background: #fde8e6; color: #8a1c14; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash-ok { background: #e7f7ea; color: #1c6b2c; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ah-black); }
.login-box { background: var(--ah-white); border-radius: 14px; padding: 36px; width: 340px; text-align: center; }
.login-box .hex-logo { width: 56px; height: 56px; margin-bottom: 10px; }

/* طباعة الفاتورة بشكل قريب من نموذج الورشة الورقي */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-sheet { box-shadow: none; border: none; }
}
