/* الألوان والمتغيرات */
:root {
    --gold: #f1c40f;
    --bg-dark: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --green-tax: #2ecc71;
    --red-lock: #e74c3c;
    --owner-color: #95a5a6;
}

.legal-page {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Arial', sans-serif;
    padding-bottom: 50px;
}

/* إصلاح قسم الضرائب للموبايل */
.tax-card {
    background: linear-gradient(135deg, #16222a, #1a2a5a);
    border: 1px solid var(--green-tax);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.tax-badges {
    display: flex;
    flex-wrap: wrap; /* يمنع التداخل في الجوال */
    gap: 10px;
}

.badge {
    background: var(--green-tax);
    color: #000;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap; /* يمنع انقسام الكلمة */
}

/* تنسيق الرسم البياني */
.distribution-bar {
    display: flex;
    height: 35px;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.liq { background: var(--gold); }
.bnk { background: #3498db; }
.rwd { background: var(--green-tax); }
.tea { background: var(--red-lock); }
.own { background: var(--owner-color); }
.res { background: #9b59b6; }

.chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    font-size: 0.85rem;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

/* بطاقات التفاصيل */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.detail-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--gold);
}

.detail-card.locked {
    border-left-color: var(--red-lock);
}

/* التجاوب مع الجوال */
@media (max-width: 768px) {
    .tax-card {
        flex-direction: column;
        text-align: center;
    }
    .tax-badges {
        justify-content: center;
        width: 100%;
    }
    .badge {
        flex: 1; /* جعل الأزرار متساوية في العرض */
        min-width: 110px;
    }
}






/* المتغيرات الأساسية */
:root {
    --gold: #f1c40f;
    --bg-dark: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --green-tax: #2ecc71;
    --red-lock: #e74c3c;
    --blue-bank: #3498db;
    --purple-res: #9b59b6;
    --gray-own: #95a5a6;
}

.legal-page {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 20px;
    line-height: 1.6;
}

/* زر العودة */
.back-btn {
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
}

/* كارت الضرائب - حل مشكلة التداخل */
.tax-card {
    background: linear-gradient(135deg, #16222a, #1a2a5a);
    border: 1px solid var(--green-tax);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.tax-info { flex: 1; min-width: 250px; }

.tax-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    background: var(--green-tax);
    color: #000;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* الرسم البياني المستطيل */
.distribution-bar {
    display: flex;
    height: 35px;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* الألوان داخل الرسم البياني */
.liq { background: var(--gold); }
.bnk { background: var(--blue-bank); }
.rwd { background: var(--green-tax); }
.res { background: var(--purple-res); }
.own { background: var(--gray-own); }
.tea { background: var(--red-lock); }

.chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

/* شبكة البطاقات */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.detail-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--gold);
    transition: 0.3s;
}

.detail-card.locked { border-left-color: var(--red-lock); }
.detail-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.08); }

/* قسم الرؤية */
.vision-engine {
    background: rgba(241, 196, 15, 0.05);
    padding: 30px;
    border-radius: 20px;
    margin-top: 40px;
    border: 1px dashed var(--gold);
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

/* ميديا كويري للهاتف */
@media (max-width: 768px) {
    .tax-card { flex-direction: column; text-align: center; }
    .tax-badges { justify-content: center; width: 100%; }
    .badge { flex: 1; text-align: center; }
}