/* ============================================
   Deutsch Club - التصميم العام
   ============================================ */

:root {
    --dc-yellow: #FFD400;
    --dc-yellow-dark: #E6BE00;
    --dc-yellow-soft: #FFF9DB;
    --dc-black: #111111;
    --dc-dark: #1A1A1A;
    --dc-gray: #2A2A2A;
    --dc-light: #F5F5F5;
    --dc-light-2: #EFEFF1;
    --dc-white: #FFFFFF;
    --dc-success: #2ECC71;
    --dc-success-bg: #E8F8EF;
    --dc-success-text: #1B7A47;
    --dc-danger: #E74C3C;
    --dc-danger-bg: #FDECEA;
    --dc-danger-text: #B3261E;
    --dc-warning: #F39C12;
    --dc-warning-bg: #FFF6E5;
    --dc-warning-text: #A36A00;
    --dc-info: #3498DB;
    --dc-info-bg: #E8F2FD;
    --dc-info-text: #1B5FA8;
    --dc-border: #E5E5E5;
    --dc-border-2: #DDDDE0;
    --dc-text: #222;
    --dc-text-2: #555;
    --dc-text-muted: #888;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dc-light);
    color: var(--dc-text);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ============ شاشة تسجيل الدخول ============ */
.login-page {
    background: linear-gradient(135deg, #FFD400 0%, #FFB800 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.25), transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(0,0,0,0.08), transparent 45%);
    pointer-events: none;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-top: -78px;
    margin-bottom: 16px;
}

.login-logo {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    object-fit: cover;
    background: #FFD400;
    border: 5px solid #FFFFFF;
}

.login-card {
    background: var(--dc-white);
    border-radius: 24px;
    padding: 24px 24px 32px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    margin-top: 62px;
    position: relative;
}

.login-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--dc-black);
    margin-bottom: 4px;
    text-align: center;
}

.login-sub {
    text-align: center;
    color: var(--dc-text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ============ الفورم ============ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--dc-black);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--dc-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: var(--dc-white);
    color: var(--dc-text);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--dc-yellow);
    box-shadow: 0 0 0 4px rgba(255,212,0,0.25);
}

.password-field {
    position: relative;
}

.toggle-pass {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
    padding: 6px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--dc-text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    margin-top: 20px;
}

/* ============ الأزرار ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    background: var(--dc-black);
    color: var(--dc-yellow);
}
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-block { width: 100%; }

.btn-yellow {
    background: var(--dc-yellow);
    color: var(--dc-black);
}
.btn-yellow:hover { background: var(--dc-yellow-dark); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--dc-border);
    color: var(--dc-text);
}
.btn-outline:hover { border-color: var(--dc-black); }

.btn-back {
    background: var(--dc-yellow);
    color: var(--dc-black);
    border: none;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255,212,0,0.30);
    transition: var(--transition);
}
.btn-back:hover {
    background: var(--dc-yellow-dark);
    transform: translateY(-1px);
}

.btn-danger { background: var(--dc-danger); color: #fff; }
.btn-success { background: var(--dc-success); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-xs { padding: 6px 10px; font-size: 12px; }

/* ============ أزرار الإجراءات (Action Buttons) ============ */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 800;
    transition: var(--transition);
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    min-height: 38px;
    line-height: 1;
}

.action-btn .action-icon { font-size: 15px; line-height: 1; }
.action-btn .action-label { line-height: 1; }

.action-edit {
    background: var(--dc-yellow-soft);
    color: #8A6D00;
    border-color: #FFE68A;
}
.action-edit:hover {
    background: #FFE68A;
    border-color: var(--dc-yellow);
    transform: translateY(-1px);
}

.action-add {
    background: var(--dc-yellow);
    color: var(--dc-black);
    border-color: var(--dc-yellow-dark);
}
.action-add:hover {
    background: var(--dc-yellow-dark);
    transform: translateY(-1px);
}

.action-stop {
    background: var(--dc-light-2);
    color: var(--dc-text-2);
    border-color: var(--dc-border-2);
}
.action-stop:hover {
    background: #E0E0E3;
    border-color: #CCC;
}

.action-activate {
    background: var(--dc-success-bg);
    color: var(--dc-success-text);
    border-color: #B8E6CC;
}
.action-activate:hover {
    background: #C8E6C9;
    border-color: var(--dc-success);
}

.action-delete {
    background: var(--dc-danger-bg);
    color: var(--dc-danger-text);
    border-color: #F5C6C2;
}
.action-delete:hover {
    background: #FADBD8;
    border-color: var(--dc-danger);
    transform: translateY(-1px);
}

/* ============ التنبيهات ============ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.alert-success { background: #E8F8EF; color: #1B7A47; border: 1px solid #B8E6CC; }
.alert-error   { background: #FDECEA; color: #B3261E; border: 1px solid #F5C6C2; }
.alert-warning { background: #FFF6E5; color: #A36A00; border: 1px solid #FFE1A8; }
.alert-info    { background: #E8F2FD; color: #1B5FA8; border: 1px solid #B8D6F5; }

/* ============ زر تثبيت التطبيق ============ */
.install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background: var(--dc-black);
    color: var(--dc-yellow);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: var(--transition);
}
.install-btn:hover { transform: translateY(-2px); }

/* ============ الصور الافتراضية ============ */
.placeholder-img {
    background: linear-gradient(135deg, #f5f5f5 25%, #e9e9e9 25%, #e9e9e9 50%, #f5f5f5 50%, #f5f5f5 75%, #e9e9e9 75%);
    background-size: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dc-text-muted);
    font-size: 28px;
}

/* ============================================
   مكونات الصفحات الداخلية
   ============================================ */

.page-header {
    margin-bottom: 20px;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--dc-black);
    margin-bottom: 4px;
}

.page-count-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--dc-yellow-soft);
    color: #8A6D00;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.page-sub {
    font-size: 14px;
    color: var(--dc-text-muted);
}

/* ============ شبكة الإحصائيات ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 700px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(6, 1fr); }
}

.stat-card {
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #FFD400 0%, #FFB800 100%);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.stat-icon.yellow  { background: #FFF6CC; }
.stat-icon.pink    { background: #FCE4EC; }
.stat-icon.blue    { background: #E3F2FD; }
.stat-icon.purple  { background: #EDE7F6; }
.stat-icon.orange  { background: #FFE0B2; }
.stat-icon.green   { background: #C8E6C9; }

.stat-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--dc-black);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--dc-text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* ============ بانر النقاط ============ */
.points-banner {
    background: linear-gradient(135deg, #111111 0%, #2A2A2A 100%);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.points-banner::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 60%;
    height: 160%;
    background: radial-gradient(circle, rgba(255,212,0,0.15), transparent 60%);
    pointer-events: none;
}

.points-banner-label {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.points-banner-value {
    color: var(--dc-yellow);
    font-size: 26px;
    font-weight: 900;
}

.points-banner-icon {
    font-size: 44px;
    opacity: 0.9;
}

/* ============ الكارد ============ */
.card {
    background: var(--dc-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px;
}

.card-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--dc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--dc-black);
}

.card-link {
    font-size: 13px;
    color: var(--dc-yellow-dark);
    font-weight: 700;
}

.card-body {
    padding: 18px;
}

/* ============ قائمة العناصر ============ */
.list {
    display: flex;
    flex-direction: column;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--dc-border);
    transition: background 0.2s;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #FAFAFA;
}

.list-item-main {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dc-black);
    margin-bottom: 2px;
}

.list-item-sub {
    font-size: 12px;
    color: var(--dc-text-muted);
}

.list-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* ============ Pill النقاط ============ */
.points-pill {
    display: inline-block;
    background: #FFF6CC;
    color: #8A6D00;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* ============ حالة الفاتورة ============ */
.status {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-pending  { background: #FFF6E5; color: #A36A00; }
.status-accepted { background: #E8F8EF; color: #1B7A47; }
.status-rejected { background: #FDECEA; color: #B3261E; }
.status-approved { background: #E8F8EF; color: #1B7A47; }

/* ============ حالة فاضية ============ */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--dc-text-muted);
}

.empty-icon {
    font-size: 42px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    font-weight: 600;
}

/* ============ فلاتر (تابات) ============ */
.filter-tabs {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 14px;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 20px;
    background: var(--dc-white);
    color: var(--dc-text);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border: 1.5px solid var(--dc-border);
    transition: var(--transition);
    min-height: 38px;
    flex-shrink: 0;
    cursor: pointer;
}

.filter-tab:hover {
    border-color: var(--dc-yellow);
    background: var(--dc-yellow-soft);
}

.filter-tab.active {
    background: var(--dc-yellow);
    color: var(--dc-black);
    border-color: var(--dc-yellow);
    box-shadow: 0 2px 8px rgba(255,212,0,0.30);
}

/* ============ صندوق البحث ============ */
.search-box {
    margin-bottom: 14px;
}

.search-box input {
    padding: 13px 16px;
}

/* ============ دور المستخدم ============ */
.role-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.role-admin     { background: #FFE0B2; color: #8A4B00; }
.role-sanay3i   { background: #E3F2FD; color: #1565C0; }
.role-telesales { background: #EDE7F6; color: #5E35B1; }

/* ============ صف المستخدم ============ */
.user-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--dc-white);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #EEEEEE;
    transition: var(--transition);
}

.user-item:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    border-color: #DDDDDD;
}

.user-item .list-item-main {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.user-item .list-item-title {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    margin-bottom: 4px;
    display: block;
}

.user-item .list-item-sub {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    display: block;
}

/* ============ أزرار الأيقونات ============ */
.user-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #F5F5F5;
    font-size: 16px;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.icon-btn:hover { background: #E8E8E8; }
.icon-btn.danger:hover { background: #FDECEA; }

/* ============ كروت المنتجات ============ */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}

@media (min-width: 700px) {
    .products-grid { grid-template-columns: 1fr 1fr; }
}

.product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    border: 1px solid #EEEEEE;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--dc-yellow);
}

.product-image {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: #FFF6CC;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .placeholder-img {
    width: 100%;
    height: 100%;
    font-size: 28px;
}

.product-status-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #FDECEA;
    color: #B3261E;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
}

.product-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
}

.product-name-en {
    font-size: 11px;
    color: #999;
    line-height: 1.2;
}

.product-points { margin-top: 2px; }

.product-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* ============ كروت الهدايا ============ */
.gifts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}

@media (min-width: 700px) {
    .gifts-grid { grid-template-columns: 1fr 1fr; }
}

.gift-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    border: 1px solid #EEEEEE;
    transition: var(--transition);
}

.gift-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--dc-yellow);
}

.gift-image {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: #FFF6CC;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gift-image .placeholder-img {
    width: 100%;
    height: 100%;
    font-size: 28px;
}

.gift-status-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #FDECEA;
    color: #B3261E;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
}

.gift-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gift-name {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
}

.gift-points { margin-top: 2px; }

.gift-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* ============================================
   Responsive - موبايل
   ============================================ */

@media (max-width: 480px) {
    .login-card { padding: 22px 20px 28px; border-radius: 20px; margin-top: 56px; }
    .login-logo { width: 100px; height: 100px; }
    .login-brand { margin-top: -68px; }
    .login-title { font-size: 22px; }
}

@media (max-width: 600px) {
    .page-title { font-size: 20px; }
    .stat-value { font-size: 20px; }
    .points-banner-value { font-size: 22px; }
    .points-banner-icon { font-size: 36px; }

    .product-card,
    .gift-card {
        padding: 10px;
        gap: 10px;
    }
    .product-image,
    .gift-image {
        width: 60px;
        height: 60px;
    }
    .product-image .placeholder-img,
    .gift-image .placeholder-img {
        font-size: 24px;
    }
    .product-name,
    .gift-name {
        font-size: 14px;
    }
    .product-actions .btn,
    .gift-actions .btn {
        padding: 6px 8px;
        font-size: 11px;
    }

    .action-btn {
        flex: 1;
        padding: 10px 8px;
        font-size: 12px;
    }
    .action-btn .action-icon { font-size: 14px; }
    .action-btn .action-label { font-size: 12px; }

    .user-item {
        flex-wrap: wrap;
    }
    .user-item .user-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #EEEEEE;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   فلتر التاريخ
   ============================================ */
.date-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--dc-white);
    border-radius: var(--radius);
    border: 1px solid var(--dc-border);
    flex-wrap: wrap;
}

.date-filter-item {
    flex: 1;
    min-width: 140px;
}

.date-filter-item label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--dc-text-2);
    margin-bottom: 4px;
}

.date-filter-item .form-control {
    padding: 9px 12px;
    font-size: 14px;
}

.date-filter-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

@media (max-width: 600px) {
    .date-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .date-filter-item {
        min-width: 100%;
    }
    .date-filter-actions {
        justify-content: stretch;
    }
    .date-filter-actions .btn {
        flex: 1;
    }
}

/* ============================================
   كارت عنصر قابل للنقر (لينك)
   ============================================ */
.list-item-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #EEEEEE;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.list-item-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    border-color: var(--dc-yellow);
}

.list-item-card .list-item-title {
    font-size: 15px;
    font-weight: 900;
    color: #111;
    margin-bottom: 4px;
}

.list-item-card .list-item-sub {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.list-item-card .list-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .list-item-card {
        flex-wrap: wrap;
    }
    .list-item-card .list-item-side {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #EEEEEE;
    }
}

/* ============================================
   زر التثبيت ورسالة مثبت + نافذة الآيفون
   ============================================ */
.installed-msg {
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background: #E8F8EF;
    color: #1B7A47;
    border: 1.5px solid #B8E6CC;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 15px;
    text-align: center;
}

.install-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    padding: 20px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.install-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.install-modal {
    background: var(--dc-white);
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.30);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.install-modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--dc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dc-black);
    color: var(--dc-yellow);
    border-radius: var(--radius) var(--radius) 0 0;
}

.install-modal-header h3 {
    font-size: 16px;
    font-weight: 900;
}

.install-modal-close {
    color: var(--dc-yellow);
    font-size: 18px;
    padding: 4px 8px;
    line-height: 1;
}

.install-modal-body {
    padding: 20px 18px;
}

.ios-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--dc-light);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.ios-step-num {
    width: 30px;
    height: 30px;
    background: var(--dc-yellow);
    color: var(--dc-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0;
}

.ios-step-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dc-text);
    padding-top: 3px;
}

.ios-hint {
    margin-top: 14px;
    padding: 10px 12px;
    background: #FFF6E5;
    border: 1px solid #FFE1A8;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #A36A00;
    font-weight: 700;
    text-align: center;
}

.install-modal-footer {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--dc-border);
}

/* ============================================
   سجل العمليات
   ============================================ */
.log-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #EEEEEE;
}

.log-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--dc-yellow-soft);
    color: #8A6D00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.log-body {
    flex: 1;
    min-width: 0;
}

.log-action {
    font-size: 13px;
    font-weight: 900;
    color: var(--dc-black);
    margin-bottom: 4px;
}

.log-desc {
    font-size: 12px;
    color: var(--dc-text-2);
    line-height: 1.5;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--dc-text-muted);
    font-weight: 600;
    align-items: center;
}

.log-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 500px) {
    .log-item {
        padding: 10px 12px;
        gap: 10px;
    }
    .log-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .log-action { font-size: 12px; }
    .log-desc { font-size: 11px; }
}

/* ============================================
   التقارير
   ============================================ */
.report-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 700px) {
    .report-stats { grid-template-columns: repeat(4, 1fr); }
}

.report-stat {
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #EEEEEE;
}

.report-stat-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.report-stat-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--dc-black);
    line-height: 1;
    margin-bottom: 4px;
}

.report-stat-label {
    font-size: 11px;
    color: var(--dc-text-muted);
    font-weight: 700;
}

.report-section {
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #EEEEEE;
    overflow: hidden;
}

.report-section-header {
    padding: 14px 16px;
    border-bottom: 1px solid #EEEEEE;
    font-size: 15px;
    font-weight: 900;
    color: var(--dc-black);
    background: #FAFAFA;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #F5F5F5;
}

.report-row:last-child { border-bottom: none; }

.report-row-rank {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--dc-yellow-soft);
    color: #8A6D00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
}

.report-row-main {
    flex: 1;
    min-width: 0;
}

.report-row-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--dc-black);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-row-sub {
    font-size: 11px;
    color: var(--dc-text-muted);
}

.report-row-value {
    font-size: 13px;
    font-weight: 900;
    color: #8A6D00;
    white-space: nowrap;
    flex-shrink: 0;
}

.report-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--dc-text-muted);
}

@media (max-width: 500px) {
    .report-stat-value { font-size: 18px; }
    .report-row { padding: 10px 14px; gap: 8px; }
    .report-row-name { font-size: 12px; }
    .report-row-value { font-size: 12px; }
}

/* ============================================
   معلومات النظام (صفحة الإعدادات)
   ============================================ */
.system-info {
    padding: 4px 0;
}

.system-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--dc-border);
    font-size: 13px;
}

.system-info-row:last-child {
    border-bottom: none;
}

.system-info-label {
    color: var(--dc-text-muted);
    font-weight: 700;
}

.system-info-value {
    font-weight: 800;
    color: var(--dc-black);
}

@media (max-width: 500px) {
    .system-info-row {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* ============================================
   زر الإشعارات في السايدبار (لللاب)
   ============================================ */
.sidebar-notif {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    margin: 8px;
    background: rgba(255,212,0,0.12);
    color: var(--dc-yellow);
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 14px;
    position: relative;
    transition: var(--transition);
}

.sidebar-notif:hover {
    background: rgba(255,212,0,0.20);
}

.sidebar-notif-icon {
    font-size: 18px;
    line-height: 1;
}

.sidebar-notif .notif-badge {
    position: static;
    margin-right: auto;
    background: var(--dc-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

@media (min-width: 901px) {
    .sidebar-notif {
        display: flex;
    }
}

/* ============================================
   كروت إحصائيات الصنايعي + التلي سيلز
   ============================================ */
.san-stats,
.tls-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 700px) {
    .san-stats,
    .tls-stats { grid-template-columns: repeat(4, 1fr); }
}

.san-stat,
.tls-stat {
    background: var(--dc-white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #EEEEEE;
    display: flex;
    align-items: center;
    gap: 10px;
}

.san-stat-icon,
.tls-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.san-stat-icon.yellow,
.tls-stat-icon.yellow { background: #FFF6CC; }
.san-stat-icon.orange { background: #FFE0B2; }
.san-stat-icon.green,
.tls-stat-icon.green  { background: #C8E6C9; }
.san-stat-icon.red,
.tls-stat-icon.red    { background: #FDECEA; }
.tls-stat-icon.blue   { background: #E3F2FD; }

.san-stat-value,
.tls-stat-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--dc-black);
    line-height: 1;
}

.san-stat-label,
.tls-stat-label {
    font-size: 11px;
    color: var(--dc-text-muted);
    font-weight: 700;
    margin-top: 4px;
}

/* ============ أزرار سريعة ============ */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.quick-actions .btn {
    padding: 16px;
    font-size: 15px;
}

@media (max-width: 500px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   فاتورة جديدة (صنايعي)
   ============================================ */
.invoice-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .invoice-products-grid { grid-template-columns: 1fr 1fr; }
}

.inv-product {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: var(--dc-white);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1.5px solid #EEEEEE;
    transition: all 0.2s;
    cursor: pointer;
}

.inv-product:hover {
    border-color: var(--dc-yellow);
}

.inv-product.selected {
    border-color: var(--dc-black);
    background: #FFFDF0;
}

.inv-product-image {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #FFF6CC;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inv-product-image .placeholder-img {
    width: 100%;
    height: 100%;
    font-size: 22px;
}

.inv-product-info {
    flex: 1;
    min-width: 0;
}

.inv-product-name {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    margin-bottom: 2px;
}

.inv-product-points {
    font-size: 11px;
    font-weight: 700;
    color: #8A6D00;
}

.inv-qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--dc-black);
    color: var(--dc-yellow);
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    width: 46px;
    height: 32px;
    text-align: center;
    border: 1.5px solid #E5E5E5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    padding: 0;
}

.invoice-notes {
    margin-bottom: 100px;
}

@media (max-width: 600px) {
    .inv-product {
        padding: 8px;
        gap: 8px;
    }
    .inv-product-image {
        width: 48px;
        height: 48px;
    }
    .inv-product-name {
        font-size: 13px;
    }
    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    .qty-input {
        width: 38px;
        height: 28px;
        font-size: 13px;
    }
    .invoice-summary {
        padding: 12px 14px;
    }
    .invoice-summary-value {
        font-size: 20px;
    }
    .btn-save-invoice {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   شريط ملخص الفاتورة (Sticky Bottom)
   ============================================ */
.invoice-summary {
    position: sticky;
    bottom: 80px;
    background: linear-gradient(135deg, var(--dc-black) 0%, var(--dc-dark) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 50;
}

.invoice-summary-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invoice-summary-label {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    font-weight: 600;
}

.invoice-summary-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--dc-yellow);
}

.invoice-summary-items {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}

.btn-save-invoice {
    background: var(--dc-yellow);
    color: var(--dc-black);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 900;
    font-size: 15px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255,212,0,0.35);
    transition: var(--transition);
}

.btn-save-invoice:hover {
    background: var(--dc-yellow-dark);
    transform: translateY(-1px);
}

.btn-save-invoice:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 600px) {
    .invoice-summary {
        bottom: 80px;
        padding: 12px 14px;
    }
    .invoice-summary-value {
        font-size: 20px;
    }
    .btn-save-invoice {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   الهدايا (صنايعي) + طلب الاستبدال
   ============================================ */
.gift-locked {
    opacity: 0.6;
    background: #FAFAFA;
}

.gift-status-ok {
    font-size: 11px;
    color: var(--dc-success-text);
    font-weight: 700;
    margin-top: 4px;
}

.gift-status-no {
    font-size: 11px;
    color: var(--dc-danger-text);
    font-weight: 700;
    margin-top: 4px;
}

.inv-product-locked {
    opacity: 0.5;
    background: #FAFAFA;
    cursor: not-allowed;
}

.inv-product-locked-text {
    font-size: 11px;
    color: var(--dc-danger-text);
    font-weight: 700;
    margin-top: 4px;
}

/* ============================================
   كارت البروفايل (للصنايعي والأدمن والتلي سيلز)
   ============================================ */
.profile-hero {
    background: linear-gradient(135deg, #111 0%, #2A2A2A 100%);
    border-radius: 18px;
    padding: 24px 20px;
    color: #fff;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--dc-yellow);
    color: var(--dc-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    margin: 0 auto 12px;
    border: 4px solid rgba(255,255,255,0.15);
}

.profile-name {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
}

.profile-role-badge {
    display: inline-block;
    background: rgba(255,212,0,0.15);
    color: var(--dc-yellow);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.profile-stat-val {
    font-size: 20px;
    font-weight: 900;
    color: var(--dc-yellow);
    line-height: 1;
}

.profile-stat-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

.btn-logout {
    background: #FDECEA;
    color: #B3261E;
    padding: 16px;
    margin-bottom: 20px;
}

.btn-logout:hover {
    background: #FADBD8;
}

/* ============================================
   كارت مراجعة الفاتورة / الاستبدال
   ============================================ */
.review-hero {
    background: linear-gradient(135deg, #111 0%, #2A2A2A 100%);
    border-radius: 18px;
    padding: 20px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.review-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.review-hero-num {
    font-size: 20px;
    font-weight: 900;
    color: var(--dc-yellow);
    line-height: 1;
}

.review-hero-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 14px;
    line-height: 1.8;
    font-weight: 700;
}

.review-hero-meta .meta-name {
    font-size: 18px;
    font-weight: 900;
    display: block;
    margin-bottom: 4px;
}

.review-hero-meta .meta-phone {
    font-size: 15px;
    font-weight: 800;
    color: var(--dc-yellow);
    display: block;
    margin-bottom: 4px;
}

.review-hero-meta .meta-date {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    display: block;
    font-weight: 600;
}

.review-hero-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.review-hero-total-val {
    font-size: 32px;
    font-weight: 900;
    color: var(--dc-yellow);
    line-height: 1;
}

.review-hero-total-lbl {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
}

.review-hero-balance {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.review-hero-balance strong {
    color: var(--dc-yellow);
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #EEEEEE;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item-name {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    margin-bottom: 2px;
}

.review-item-meta {
    font-size: 12px;
    color: #888;
}

.review-item-total {
    font-size: 14px;
    font-weight: 900;
    color: #8A6D00;
    white-space: nowrap;
}

.review-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.review-actions .btn {
    flex: 1;
    padding: 16px;
    font-size: 15px;
}

@media (max-width: 500px) {
    .review-actions {
        flex-direction: column;
    }
}

/* ============================================
   بانر النقاط - رابط + سطر فرعي
   ============================================ */
.points-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.points-banner-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* كارد بمسافة فوق */
.card-margin-top {
    margin-top: 16px;
}

/* ============================================
   كلاسات مساعدة للبروفايل
   ============================================ */
.card-margin-bottom {
    margin-bottom: 16px;
}

.card-title-spaced {
    margin-bottom: 16px;
}

/* ============================================
   الشعار في السايدبار (كبير + عمودي)
   ============================================ */
.sidebar-brand {
    padding: 24px 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.sidebar-logo {
    width: 100%;
    max-width: 220px;
    height: 220px;
    border-radius: 20px;
    object-fit: cover;
    border: 4px solid var(--dc-yellow);
    background: var(--dc-yellow);
    flex-shrink: 0;
    box-shadow: 0 6px 24px rgba(255,212,0,0.30);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sidebar-brand-text strong {
    color: var(--dc-yellow);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.sidebar-brand-text small {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 700;
}