
:root {
    --green: #2d6a4f;
    --green-dark: #1b4332;
    --green-light: #52b788;
    --gold: #c9a227;
    --gold-light: #f0c040;
    --cream: #f9f6f0;
    --text-dark: #1f2933;
    --text-muted: #5f6b76;
}

* { box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    direction: rtl;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--green-dark);
    color: #ccc;
    padding: 6px 0;
    font-size: 13px;
}
.top-bar a { color: #ccc; text-decoration: none; margin: 0 6px; }
.top-bar a:hover { color: var(--gold-light); }
.top-social { margin-left: 8px; }

/* ===== NAVBAR ===== */
.main-navbar {
    background: var(--green);
    padding: 8px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}
@media (min-width: 992px) {
    /* keep header on one row on large screens */
    .main-navbar .container {
        flex-wrap: nowrap !important;
    }
    .main-navbar .navbar-collapse {
        flex-wrap: nowrap;
    }
    .main-navbar .navbar-nav {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    .main-navbar .nav-link {
        padding: 8px 10px !important;
    }
}
@media (max-width: 991.98px) {
    .main-navbar .navbar-collapse {
        padding: 12px 0 8px;
        border-top: 1px solid rgba(255,255,255,0.15);
        margin-top: 10px;
    }
    .main-navbar .navbar-nav .nav-link {
        padding: 10px 12px !important;
    }
    .main-navbar .brand-main {
        font-size: 14px;
    }
    .main-navbar .logo-img {
        height: 52px;
    }
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 55px; width: auto; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-main { color: #fff; font-weight: 800; font-size: 16px; }
.brand-sub { color: var(--gold-light); font-size: 11px; font-weight: 500; }
.main-navbar .nav-link { color: rgba(255,255,255,0.9) !important; font-weight: 600; font-size: 14px; padding: 8px 12px !important; border-radius: 6px; transition: all 0.2s; }
.main-navbar .nav-link:hover, .main-navbar .nav-link.active { background: rgba(255,255,255,0.15); color: #fff !important; }
.main-navbar .nav-link i { margin-left: 5px; }
.navbar-toggler { border-color: rgba(255,255,255,0.4); }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

/* ===== BUTTONS ===== */
.btn-gold { background: var(--gold); color: #fff; border: none; font-weight: 700; border-radius: 8px; padding: 10px 24px; transition: all 0.2s; }
.btn-gold:hover { background: #a8841e; color: #fff; }
.btn-gold-sm { background: var(--gold); color: #fff !important; border: none; font-weight: 700; border-radius: 6px; padding: 6px 16px; font-size: 13px; text-decoration: none; display: inline-block; transition: all 0.2s; }
.btn-gold-sm:hover { background: #a8841e; color: #fff !important; }
.btn-green { background: var(--green); color: #fff; border: none; font-weight: 700; border-radius: 8px; padding: 10px 24px; transition: all 0.2s; }
.btn-green:hover { background: var(--green-dark); color: #fff; }

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, #40916c 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="30" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    pointer-events: none;
    z-index: 0;
}
.hero > .container {
    position: relative;
    z-index: 1;
}
.hero-cta-row {
    position: relative;
    z-index: 2;
}
.hero-cta-row a.btn {
    position: relative;
    z-index: 1;
}
.hero-side-img {
    animation: heroFloat 5s ease-in-out infinite;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.logo-img-hero {
    animation: logoPop 0.9s ease-out both;
}
@keyframes logoPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.hero-title { font-size: 38px; font-weight: 800; line-height: 1.3; }
.hero-subtitle { font-size: 18px; color: rgba(255,255,255,0.85); margin: 15px 0 30px; }
.hero-btn-wa { background: #25d366 !important; color: #fff !important; border: none !important; font-weight: 700; border-radius: 8px; }
.hero-btn-wa:hover { background: #1dae56 !important; color: #fff !important; }
.homepage-custom-block { background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #eee; }
[data-theme="dark"] .homepage-custom-block { background: #1e2a24; border-color: #2d3d34; }
.hero-badge { background: var(--gold); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; display: inline-block; margin-bottom: 16px; }
.hero-stats { display: flex; gap: 30px; margin-top: 30px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 28px; font-weight: 800; color: var(--gold-light); }
.hero-stat .lbl { font-size: 12px; color: rgba(255,255,255,0.8); }

/* ===== SECTION ===== */
.section-title { font-size: 28px; font-weight: 800; color: var(--green-dark); margin-bottom: 8px; }
.section-subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 35px; }
.section-title-bar { width: 60px; height: 4px; background: var(--gold); border-radius: 2px; margin-bottom: 8px; }

/* ===== CARDS ===== */
.card-hover { transition: transform 0.2s, box-shadow 0.2s; border: none; border-radius: 14px; overflow: hidden; }
.card-hover:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }

/* ===== PRODUCT CARD ===== */
.product-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.07); transition: all 0.2s; border: 1px solid #eee; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.product-img { height: 200px; background: linear-gradient(135deg, #d8f3dc, #b7e4c7); display: flex; align-items: center; justify-content: center; font-size: 60px; }
.product-body { padding: 18px; }
.product-name { font-size: 16px; font-weight: 700; color: var(--green-dark); margin-bottom: 6px; }
.product-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.product-price { font-size: 18px; font-weight: 800; color: var(--gold); }
.product-unit { font-size: 12px; color: #888; }
.product-packaging { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 600; }
.badge-category { background: #e8f5e9; color: var(--green); font-size: 11px; border-radius: 20px; padding: 2px 10px; font-weight: 600; }

/* ===== ANNOUNCEMENT CARD ===== */
.announcement-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-right: 5px solid var(--green); }
.announcement-card.profit { border-right-color: var(--gold); }
.announcement-card.news { border-right-color: #2196f3; }
.announcement-date { font-size: 12px; color: #888; }
.announcement-title { font-size: 17px; font-weight: 700; color: var(--green-dark); margin: 5px 0; }
.badge-type { border-radius: 20px; font-size: 11px; padding: 3px 10px; font-weight: 600; }
.badge-general { background: #e8f5e9; color: var(--green); }
.badge-profit { background: #fff9e6; color: var(--gold); }
.badge-news { background: #e3f2fd; color: #1565c0; }

/* ===== STAT BOX ===== */
.stat-box { background: #fff; border-radius: 14px; padding: 25px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.07); border-top: 4px solid var(--green); }
.stat-box .icon { font-size: 35px; margin-bottom: 10px; }
.stat-box .value { font-size: 26px; font-weight: 800; color: var(--green-dark); }
.stat-box .label { color: var(--text-muted); font-size: 13px; font-weight: 600; }

/* ===== SALE POINT CARD ===== */
.salepoint-card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); border: 1px solid #eee; margin-bottom: 15px; transition: all 0.2s; }
.salepoint-card:hover { border-color: var(--green-light); box-shadow: 0 4px 16px rgba(45,106,79,0.12); }
.salepoint-name { font-weight: 700; color: var(--green-dark); font-size: 16px; }
.governorate-badge { background: #e8f5e9; color: var(--green); border-radius: 20px; font-size: 11px; padding: 2px 10px; font-weight: 600; }

/* ===== CONTACT ===== */
.contact-card { background: #fff; border-radius: 14px; padding: 30px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.contact-icon { width: 55px; height: 55px; background: linear-gradient(135deg, var(--green), var(--green-light)); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; margin-left: 15px; flex-shrink: 0; }
.contact-info h6 { margin: 0; font-weight: 700; color: var(--green-dark); }
.contact-info p { margin: 3px 0 0; color: var(--text-muted); font-size: 14px; }

/* ===== FORM STYLES ===== */
.form-label { font-weight: 600; color: var(--green-dark); font-size: 14px; }
.form-control, .form-select { border-radius: 8px; border: 1.5px solid #ddd; font-family: 'Cairo', sans-serif; padding: 10px 14px; }
.form-control:focus, .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 0.2rem rgba(45,106,79,0.15); }

/* ===== PAGE HEADER ===== */
.page-header { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #fff; padding: 50px 0; margin-bottom: 40px; }
.page-header h1 { font-size: 32px; font-weight: 800; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 16px; }

/* ===== ALERTS ===== */
.alert { border-radius: 10px; font-weight: 600; }

/* ===== FOOTER ===== */
.site-footer { background: var(--green-dark); color: #ccc; padding: 50px 0 20px; }
.footer-title { color: var(--gold-light); font-weight: 700; margin-bottom: 15px; font-size: 16px; }
.footer-desc { color: #aaa; font-size: 14px; line-height: 1.7; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; color: #aaa; font-size: 14px; }
.footer-links a { color: #aaa; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 30px 0 20px; }
.footer-copy { color: #666; font-size: 13px; margin: 0; }
.footer-dev-credit-wrap {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 12px !important;
    padding-top: 14px !important;
}
.footer-dev-credit {
    font-size: 12px;
    color: #6a7a72;
    line-height: 1.6;
}
.footer-dev-credit-label {
    margin-left: 6px;
}
.footer-dev-credit-link {
    color: #8a9a92;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
    transition: color 0.2s, border-color 0.2s;
}
.footer-dev-credit-link:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-light);
}

.social-links a { color: #aaa; font-size: 20px; margin-left: 12px; text-decoration: none; transition: color 0.2s; }
.social-links a:hover { color: var(--gold-light); }

.footer-social-lead {
    font-size: 13px;
    font-weight: 600;
    color: #c9c9c9;
    line-height: 1.5;
}

/* قسم تابعونا — الصفحة الرئيسية */
.social-follow-section {
    background: linear-gradient(180deg, #f4faf6 0%, var(--cream) 100%);
    border-top: 1px solid rgba(45, 106, 79, 0.12);
    border-bottom: 1px solid rgba(45, 106, 79, 0.12);
}
.social-follow-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 100px;
    padding: 1rem 0.75rem;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.social-follow-card:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.social-follow-icon {
    font-size: 1.75rem;
    line-height: 1;
}
.social-follow-label {
    line-height: 1.35;
}
.social-follow-wa { background: linear-gradient(135deg, #128c7e 0%, #25d366 100%); }
.social-follow-tg { background: linear-gradient(135deg, #0088cc 0%, #229ed9 100%); }
.social-follow-fb { background: linear-gradient(135deg, #1877f2 0%, #4267b2 100%); }
.social-follow-tw { background: linear-gradient(135deg, #111 0%, #333 100%); }
.social-follow-yt { background: linear-gradient(135deg, #c00 0%, #ff0000 100%); }
.social-follow-ig { background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%); }
.social-follow-tt { background: linear-gradient(135deg, #000 0%, #25f4ee 200%); }
.text-gold { color: var(--gold) !important; }

/* ===== WHATSAPP FLOAT ===== */
.wa-float { position: fixed; bottom: 30px; left: 30px; z-index: 9999; }
.wa-float a { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; background: #25d366; border-radius: 50%; color: #fff; font-size: 28px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); text-decoration: none; animation: pulse 2s infinite; transition: transform 0.2s; }
.wa-float a:hover { transform: scale(1.1); }
@keyframes pulse { 0%,100%{box-shadow:0 4px 15px rgba(37,211,102,0.4)} 50%{box-shadow:0 4px 25px rgba(37,211,102,0.7)} }

/* ===== ADMIN ===== */
.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 21, 18, 0.55);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.admin-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}
@media (min-width: 769px) {
    .admin-sidebar-overlay {
        display: none !important;
    }
}
body.admin-sidebar-open {
    overflow: hidden;
}
.admin-sidebar {
    background: linear-gradient(180deg, #1b4332 0%, #142e24 100%);
    width: 270px;
    max-width: 88vw;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: transform 0.3s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}
.admin-sidebar-brand {
    flex-shrink: 0;
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}
.admin-sidebar-logo {
    max-height: 52px;
    border-radius: 10px;
}
.admin-sidebar-brand h4 {
    color: var(--gold-light);
    font-size: 14px;
    margin: 10px 0 0;
    font-weight: 800;
    line-height: 1.35;
}
.admin-sidebar-role {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    margin-top: 6px;
}
.admin-sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 20px;
}
.admin-sidebar-hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 12px 16px;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    border-right: 3px solid transparent;
}
.admin-nav-link span {
    flex: 1;
    min-width: 0;
}
.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-right-color: var(--gold);
}
.admin-nav-link i {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.95;
}
.admin-nav-link-danger {
    color: #fca5a5 !important;
}
.admin-nav-link-danger:hover {
    color: #fecaca !important;
}
.admin-content {
    margin-right: 270px;
    min-height: 100vh;
    background: #f0f4f8;
}
.admin-topbar {
    background: #fff;
    padding: 14px 22px;
    border-bottom: 1px solid #e8ecf1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.admin-topbar-pro {
    min-height: 56px;
}
.admin-topbar-title {
    font-weight: 800;
    color: var(--green-dark);
    font-size: 1.05rem;
}
.btn-admin-menu {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important;
    border: 1px solid #dee2e6 !important;
    background: #fff !important;
    color: var(--green-dark) !important;
}
.btn-admin-menu:hover {
    background: #f8f9fa !important;
    border-color: #ced4da !important;
}
.admin-main { padding: 22px 24px; }
.admin-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.admin-table-search {
    max-width: 280px;
}
.data-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.data-card .card-header { padding: 18px 20px; background: #fff; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.data-card .card-header h5 { margin: 0; font-weight: 700; color: var(--green-dark); }
.table th { font-weight: 700; color: var(--green-dark); background: #f8f9fa; font-size: 13px; white-space: nowrap; }
.table td { font-size: 13px; vertical-align: middle; }
.badge-status { border-radius: 20px; padding: 4px 12px; font-size: 11px; font-weight: 700; }
.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-pending { background: #fff9e6; color: #f57f17; }
.badge-confirmed { background: #e3f2fd; color: #1565c0; }
.badge-delivered { background: #e8f5e9; color: #2e7d32; }
.badge-cancelled { background: #ffebee; color: #b71c1c; }
.badge-rejected { background: #ffebee; color: #b71c1c; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.admin-stat { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-right: 4px solid var(--green); margin-bottom: 15px; }
.admin-stat .stat-val { font-size: 28px; font-weight: 800; color: var(--green-dark); }
.admin-stat .stat-lbl { color: var(--text-muted); font-size: 13px; }
.admin-stat .stat-icon { font-size: 30px; color: var(--green-light); float: left; }

/* ===== MEMBER PORTAL ===== */
.member-header { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #fff; padding: 30px; border-radius: 16px; margin-bottom: 25px; }
.share-stat { background: rgba(255,255,255,0.15); border-radius: 12px; padding: 15px 20px; text-align: center; }
.share-stat .val { font-size: 24px; font-weight: 800; color: var(--gold-light); }
.share-stat .lbl { font-size: 12px; color: rgba(255,255,255,0.8); }

/* ===== STEPS ===== */
.steps-container { display: flex; gap: 10px; margin-bottom: 30px; }
.step { flex: 1; text-align: center; padding: 12px; border-radius: 10px; background: #eee; color: #888; font-weight: 700; font-size: 14px; transition: all 0.3s; }
.step.active { background: var(--green); color: #fff; }
.step.done { background: #e8f5e9; color: var(--green); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title { font-size: 26px; }
    .hero-stats { gap: 15px; flex-wrap: wrap; }
    .admin-sidebar { transform: translateX(100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-right: 0; }
    .admin-main { padding: 15px; }
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* وضع ليلي — يتزامن مع data-theme و data-bs-theme (Bootstrap 5.3) */
[data-theme="dark"] {
    color-scheme: dark;
    --green: #40916c;
    --green-dark: #1b4332;
    --cream: #121a16;
    --dark-text-title: #f8fffb;
    --dark-text-body: #edf5f1;
    --dark-text-muted: #d5dfda;
    --dark-text-soft: #b8c6bf;
    --dark-link: #8ee5b8;
    --dark-link-hover: #b9f3d5;
    --text-dark: #edf5f1;
    --text-muted: #d5dfda;
    --bs-body-bg: #121a16;
    --bs-body-color: #f1f5f3;
    --bs-secondary-color: #c8d0cc;
    --bs-border-color: #2d3d34;
    --bs-emphasis-color: #f7faf8;
    --bs-link-color: var(--dark-link);
    --bs-link-hover-color: var(--dark-link-hover);
}
[data-theme="dark"] body {
    background-color: var(--cream) !important;
    color: var(--dark-text-body) !important;
}

/* نظام ألوان موحّد لكل النصوص في الوضع الليلي */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .h5,
[data-theme="dark"] .h6 {
    color: var(--dark-text-title);
}
[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] label,
[data-theme="dark"] .form-label,
[data-theme="dark"] span {
    color: var(--dark-text-body);
}
[data-theme="dark"] small,
[data-theme="dark"] .small,
[data-theme="dark"] .text-muted,
[data-theme="dark"] .form-text {
    color: var(--dark-text-muted) !important;
}
[data-theme="dark"] a {
    color: var(--dark-link);
}
[data-theme="dark"] a:hover {
    color: var(--dark-link-hover);
}
[data-theme="dark"] .top-bar {
    background: #0d1510;
    color: #e2e8e4;
}
[data-theme="dark"] .top-bar a,
[data-theme="dark"] .top-social {
    color: #e2e8e4 !important;
}
[data-theme="dark"] .product-unit,
[data-theme="dark"] .product-packaging {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .section-title,
[data-theme="dark"] .contact-info h6,
[data-theme="dark"] .salepoint-name,
[data-theme="dark"] .product-name {
    color: var(--text-dark) !important;
}
[data-theme="dark"] .section-subtitle {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #c8d0cc;
    --bs-btn-border-color: #4a5c52;
    --bs-btn-hover-bg: #243029;
    --bs-btn-hover-border-color: #5a6c62;
}
[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .alert-info {
    background: #1a2830;
    border-color: #2d4a5c;
    color: #b8d4e8;
}
[data-theme="dark"] .alert-success {
    background: #1a2e22;
    border-color: #2d5c40;
    color: #c8e6d4;
}
[data-theme="dark"] .alert-danger {
    background: #2e1a1a;
    border-color: #5c2d2d;
    color: #f0c4c4;
}
[data-theme="dark"] .contact-card,
[data-theme="dark"] .salepoint-card {
    background: #1e2a24 !important;
    border-color: #2d3d34 !important;
}
[data-theme="dark"] .stat-box .value {
    color: var(--gold-light) !important;
}
[data-theme="dark"] .stat-box .label {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .product-card,
[data-theme="dark"] .stat-box,
[data-theme="dark"] .announcement-card,
[data-theme="dark"] .bg-white {
    background: #1e2a24 !important;
    border-color: #2d3d34 !important;
    color: var(--text-dark);
}
[data-theme="dark"] .main-navbar {
    background: var(--green-dark);
}
[data-theme="dark"] .main-navbar .nav-link {
    color: #eef5f1 !important;
}
[data-theme="dark"] .main-navbar .nav-link:hover,
[data-theme="dark"] .main-navbar .nav-link.active {
    color: #ffffff !important;
}
[data-theme="dark"] .brand-main {
    color: #f5fbf8;
}
[data-theme="dark"] .brand-sub {
    color: #f0c040;
}
[data-theme="dark"] .site-footer {
    background: #0d1510;
}
[data-theme="dark"] .footer-dev-credit {
    color: #6d7d75;
}
[data-theme="dark"] .footer-dev-credit-link {
    color: #8fa399;
}
[data-theme="dark"] .footer-dev-credit-link:hover {
    color: var(--gold-light);
}
[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* تحسين وضوح النص في الوضع الليلي للصفحات العامة */
[data-theme="dark"] .profit-distribution-section h2,
[data-theme="dark"] .profit-distribution-section h3,
[data-theme="dark"] .profit-distribution-section strong {
    color: var(--text-dark) !important;
}
[data-theme="dark"] .profit-year-list li {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .announcement-card p {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .announcement-date {
    color: var(--text-muted) !important;
}
/* لوحة الإدارة — وضع ليلي */
[data-theme="dark"] .admin-content {
    background: #0f1512;
}
[data-theme="dark"] .admin-topbar {
    background: #1e2a24;
    border-bottom-color: #2d3d34;
    box-shadow: none;
}
[data-theme="dark"] .admin-topbar h5 {
    color: var(--text-dark);
}
[data-theme="dark"] .admin-main {
    color: var(--text-dark);
}
[data-theme="dark"] .data-card,
[data-theme="dark"] .data-card .card-header,
[data-theme="dark"] .admin-stat {
    background: #1e2a24 !important;
    border-color: #2d3d34 !important;
    color: var(--text-dark);
}
[data-theme="dark"] .data-card .card-header h5 {
    color: var(--text-dark);
}
[data-theme="dark"] .table {
    color: var(--text-dark);
    --bs-table-bg: transparent;
}
[data-theme="dark"] .table th {
    background: #243029 !important;
    color: #dfe6e1;
    border-color: #2d3d34;
}
[data-theme="dark"] .table td {
    border-color: #2d3d34;
}
[data-theme="dark"] .modal-content {
    background: #1e2a24;
    color: var(--text-dark);
    border-color: #2d3d34;
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #2d3d34;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #243029;
    border-color: #3d4f44;
    color: var(--text-dark);
}
[data-theme="dark"] .form-control::placeholder {
    color: #b8c3bd;
}
[data-theme="dark"] .form-text {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .admin-sidebar {
    background: linear-gradient(180deg, #0d1510 0%, #0a1210 100%);
}
[data-theme="dark"] .btn-admin-menu {
    background: #243029 !important;
    border-color: #3d4f44 !important;
    color: #e8e8e8 !important;
}
[data-theme="dark"] .admin-sidebar-overlay.show {
    background: rgba(0, 0, 0, 0.65);
}

/* ===== منتجات: تبويبات التصنيفات ===== */
.category-filter-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.category-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--green-dark);
    background: rgba(45, 106, 79, 0.12);
    border: 1px solid rgba(45, 106, 79, 0.25);
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.category-filter-pill:hover {
    background: rgba(45, 106, 79, 0.2);
    color: var(--green-dark);
}
.category-filter-pill.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.category-filter-count {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 700;
}
.category-filter-muted {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
}
