/* ═══════════════════════════════════════
   أتاي مخزن — AtayMakhzan Theme 🍵
   ═══════════════════════════════════════ */

/* ── Fix horizontal scroll ── */
html, body {
  overflow-x: hidden !important;
}

/* ── Global Font ── */
body, .ui, .ui * {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ── Force Light Background on the entire Home Page ── */
body:has(.page-content.home) {
  background-color: #FFFDF5 !important;
}

/* ── Kill Gitea's dark background & container limits on home ── */
.ui.container.page-content.home,
.page-content.home {
  background-color: #FFFDF5 !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Navbar — Clean & Minimal ── */
nav, .navbar, #navbar,
.ui.secondary.pointing.menu,
.ui.top.secondary.stackable.main.menu,
.ui.container.fluid > nav {
  background: #FFFDF5 !important;
  border-bottom: 1px solid rgba(212, 160, 23, 0.3) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
}

#navbar .item,
.ui.top.secondary.stackable.main.menu .item,
nav .item, nav a {
  color: #2C3E50 !important;
  font-weight: 600 !important;
}

#navbar .item:hover,
.ui.top.secondary.stackable.main.menu .item:hover,
nav .item:hover, nav a:hover {
  color: #1B5E20 !important;
  background: rgba(212, 160, 23, 0.08) !important;
}

#navbar .active.item,
.ui.top.secondary.stackable.main.menu .active.item {
  border-color: #D4A017 !important;
  color: #1B5E20 !important;
}

/* Navbar logo */
#navbar .item img, nav .item img {
  height: 30px !important;
}

/* ── Footer — matches CTA bottom seamlessly ── */
.page-footer, footer {
  background: #2C3E50 !important;
  color: #FFF8E7 !important;
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 1rem !important;
}

.page-footer a, footer a {
  color: #F0D060 !important;
}

/* ═══════════════════════════════════════
   شاشات الدخول والتسجيل — AtayMakhzan Auth
   ═══════════════════════════════════════ */

/* ── 1. إصلاح المساحة السوداء (توحيد لون الخلفية بالكامل) ── */
body:has(.user.signin),
body:has(.user.signup),
.page-content.user.signin,
.page-content.user.signup,
.full.height {
  background-color: #FFF8E7 !important;
}

/* ── 2. رأس صندوق تسجيل الدخول ── */
.user.signin .ui.attached.header,
.user.signup .ui.attached.header {
  background-color: #FFFDF5 !important;
  color: #1B5E20 !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  border: 1px solid rgba(212, 160, 23, 0.4) !important;
  border-bottom: 2px solid #D4A017 !important;
  border-radius: 4px 4px 0 0 !important;
  text-align: center !important;
}

/* ── 3. جسم صندوق تسجيل الدخول ── */
.user.signin .ui.attached.segment,
.user.signup .ui.attached.segment {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.4) !important;
  border-top: none !important;
  padding: 2.5rem 2rem !important;
  box-shadow: 0 10px 30px rgba(44, 62, 80, 0.05) !important;
}

/* ── 4. الجزء السفلي الملحق ── */
.user.signin .ui.bottom.attached.segment,
.user.signup .ui.bottom.attached.segment {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.4) !important;
  border-top: none !important;
  border-radius: 0 0 4px 4px !important;
}

/* ── 5. حقول الإدخال ── */
.ui.form input[type="text"],
.ui.form input[type="password"],
.ui.form input[type="email"] {
  font-family: 'Cairo', sans-serif !important;
  border: 1px solid rgba(212, 160, 23, 0.3) !important;
  border-radius: 2px !important;
  background-color: #ffffff !important;
  color: #2C3E50 !important;
  transition: all 0.3s ease !important;
}

.ui.form input:focus {
  border-color: #D4A017 !important;
  box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.15) !important;
}

/* ── 6. الأزرار الخضراء ── */
.user.signin .ui.button.primary,
.user.signup .ui.button.primary,
.ui.button.green {
  background-color: #1B5E20 !important;
  color: white !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 2px !important;
  transition: all 0.3s ease !important;
}

.user.signin .ui.button.primary:hover,
.user.signup .ui.button.primary:hover,
.ui.button.green:hover {
  background-color: #2E7D32 !important;
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.2) !important;
}

/* ── 7. الروابط ── */
.user.signin a,
.user.signup a {
  color: #D4A017 !important;
  font-weight: 600 !important;
  transition: color 0.2s ease !important;
}

.user.signin a:hover,
.user.signup a:hover {
  color: #1B5E20 !important;
}

/* ── 8. النصوص الوصفية والـ Labels ── */
.ui.form .field > label {
  color: #5D4037 !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 600 !important;
}

/* ═══════════════════════════════════════
   أتاي مخزن — التخصيص الشامل (Dashboard, Settings, Explore)
   ═══════════════════════════════════════ */

/* ── 6. العناصر المشتركة (تظهر في كل مكان) ── */
body, .full.height, .page-content {
  background-color: #FFF8E7 !important;
  color: #5D4037 !important;
}

h1, h2, h3, h4, h5, .ui.header {
  font-family: 'Cairo', sans-serif !important;
  color: #1B5E20 !important;
}

.ui.segment {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.3) !important;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.02) !important;
  border-radius: 2px !important;
}

.ui.divider, .divider {
  border-top: 1px solid rgba(212, 160, 23, 0.2) !important;
  border-bottom: none !important;
}

/* ── 1. Navbar العلوي والقوائم المنسدلة ── */
.ui.dropdown .menu {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.4) !important;
  border-radius: 2px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

.ui.dropdown .menu > .item {
  color: #2C3E50 !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 600 !important;
}

.ui.dropdown .menu > .item:hover {
  background-color: rgba(212, 160, 23, 0.1) !important;
  color: #1B5E20 !important;
}

.ui.dropdown .menu > .divider {
  border-top: 1px solid rgba(212, 160, 23, 0.15) !important;
}

/* ── 2. Dashboard (بعد الدخول) ── */
.page-content.dashboard .ui.secondary.stackable.menu .item {
  color: #5D4037 !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 600 !important;
}

.page-content.dashboard .ui.secondary.stackable.menu .active.item {
  color: #1B5E20 !important;
  border-bottom: 2px solid #D4A017 !important;
  background: transparent !important;
}

.flex-container-main .ui.segment,
.flex-container-sidebar .ui.segment {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.3) !important;
}

/* ── 3. Settings (الإعدادات) ── */
.ui.fluid.vertical.menu {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.3) !important;
  border-radius: 2px !important;
}

.ui.fluid.vertical.menu .item {
  color: #5D4037 !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(212, 160, 23, 0.1) !important;
}

.ui.fluid.vertical.menu .active.item {
  background-color: #1B5E20 !important;
  color: #ffffff !important;
  border-left: 3px solid #D4A017 !important;
}

.ui.top.attached.header {
  background-color: #FFFDF5 !important;
  border: 1px solid rgba(212, 160, 23, 0.4) !important;
  border-bottom: 2px solid #D4A017 !important;
  color: #1B5E20 !important;
}

.ui.attached.segment {
  background-color: #ffffff !important;
  border: 1px solid rgba(212, 160, 23, 0.3) !important;
  border-top: none !important;
}

.ui.red.button {
  background-color: #C62828 !important;
  color: white !important;
  font-family: 'Cairo', sans-serif !important;
}

.ui.red.button:hover {
  background-color: #B71C1C !important;
  box-shadow: 0 4px 12px rgba(198, 40, 40, 0.2) !important;
}

/* ── 4. القوائم المنسدلة للاختيار وصناديق الاختيار ── */
.ui.selection.dropdown {
  background-color: #ffffff !important;
  border: 1px solid rgba(212, 160, 23, 0.4) !important;
  color: #2C3E50 !important;
  border-radius: 2px !important;
  font-family: 'Cairo', sans-serif !important;
}

.ui.selection.dropdown:focus,
.ui.selection.dropdown.active {
  border-color: #1B5E20 !important;
  box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.1) !important;
}

.ui.checkbox input:checked ~ label:before {
  background-color: #1B5E20 !important;
  border-color: #1B5E20 !important;
}

.ui.checkbox label {
  color: #5D4037 !important;
  font-family: 'Cairo', sans-serif !important;
}

/* ── 5. Explore (استكشاف) ── */
.ui.secondary.pointing.tabular.menu {
  border-bottom: 2px solid rgba(212, 160, 23, 0.2) !important;
}

.ui.secondary.pointing.tabular.menu .item {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 600 !important;
  color: #5D4037 !important;
}

.ui.secondary.pointing.tabular.menu .active.item {
  border-bottom-color: #1B5E20 !important;
  border-bottom-width: 2px !important;
  color: #1B5E20 !important;
  background: transparent !important;
}

.flex-list .item {
  border-bottom: 1px solid rgba(212, 160, 23, 0.15) !important;
  padding: 1.5rem 0 !important;
}

.flex-list .item:hover {
  background-color: rgba(255, 253, 245, 0.5) !important;
}

/* ── رسائل التنبيه والخطأ ── */
.ui.message {
  background-color: #FFFDF5 !important;
  border: 1px solid #D4A017 !important;
  color: #5D4037 !important;
  border-radius: 2px !important;
  font-family: 'Cairo', sans-serif !important;
  box-shadow: 0 2px 6px rgba(212, 160, 23, 0.1) !important;
}

.ui.error.message {
  background-color: #FFF5F5 !important;
  border: 1px solid #E53935 !important;
  color: #C62828 !important;
}

.ui.success.message {
  background-color: #F1F8E9 !important;
  border: 1px solid #2E7D32 !important;
  color: #1B5E20 !important;
}
