
/*
Theme Name: Bouztat
Theme URI: https://bouztat.store
Author: Bouztat
Description: قالب عربي مخصص لإدارة المسجلين في الوكالة.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: bouztat
*/


/* ========================================
   1. المتغيرات الأساسية والألوان
======================================== */

:root {
    --primary: #E99A26;
    --primary-hover: #D8891B;

    --secondary: #344054;

    --success: #198754;
    --danger: #DC3545;
    --warning: #F0AD4E;

    --text: #344054;
    --text-muted: #7B8492;

    --background: #F5F6F8;
    --surface: #FFFFFF;
    --border: #E5E7EB;

    --radius: 8px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

    --container-width: 1200px;
}


/* ========================================
   2. الإعدادات العامة
======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    direction: rtl;
    text-align: right;

    font-family: Arial, Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.7;

    color: var(--text);
    background: var(--background);

    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--secondary);
    font-weight: 600;
}

p {
    margin-top: 0;
}

.text-muted {
    color: var(--text-muted);
}


/* ========================================
   3. التركيز وإمكانية الوصول
======================================== */

:focus-visible {
    outline: 3px solid rgba(233, 154, 38, 0.45);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    right: 15px;
    z-index: 9999;

    padding: 10px 16px;

    color: #FFFFFF;
    background: var(--secondary);

    border-radius: var(--radius);
}

.skip-link:focus {
    top: 15px;
}


/* ========================================
   4. الحاويات والمساحات الرئيسية
======================================== */

.container {
    width: 100%;
    max-width: var(--container-width);

    margin-right: auto;
    margin-left: auto;

    padding-right: 20px;
    padding-left: 20px;
}

.site-main {
    min-height: calc(100vh - 130px);
    padding: 30px 0;
}

.bouztat-main-container {
    width: 100%;
}


/* ========================================
   5. البطاقات والصناديق العامة
======================================== */

.card {
    padding: 22px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.card-title {
    margin-bottom: 18px;

    font-size: 18px;
    font-weight: 600;
}


/* ========================================
   6. الأزرار العامة
======================================== */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 9px 20px;

    border: 1px solid transparent;
    border-radius: var(--radius);

    font-size: 14px;
    font-weight: 600;

    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    color: #FFFFFF;
    background: var(--primary);
}

.btn-primary:hover {
    color: #FFFFFF;
    background: var(--primary-hover);
}

.btn-secondary {
    color: #FFFFFF;
    background: var(--secondary);
}

.btn-secondary:hover {
    color: #FFFFFF;
    opacity: 0.9;
}

.btn-danger {
    color: #FFFFFF;
    background: var(--danger);
}

.btn-danger:hover {
    color: #FFFFFF;
    opacity: 0.9;
}

.btn-outline {
    color: var(--secondary);
    background: transparent;
    border-color: var(--border);
}

.btn-outline:hover {
    background: #F8F9FA;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ========================================
   7. النماذج وحقول الإدخال العامة
======================================== */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;

    margin-bottom: 7px;

    color: var(--secondary);

    font-size: 14px;
    font-weight: 600;
}

.form-control {
    display: block;

    width: 100%;
    min-height: 44px;

    padding: 10px 13px;

    color: var(--text);
    background: #FFFFFF;

    border: 1px solid #D5D9E0;
    border-radius: 6px;

    outline: none;

    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(233, 154, 38, 0.12);
}

.form-control::placeholder {
    color: #A0A7B2;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}


/* ========================================
   8. الجداول العامة
======================================== */

.table-wrapper {
    width: 100%;
    overflow-x: auto;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 13px 15px;

    text-align: right;

    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--secondary);
    background: #F8F9FA;

    font-size: 13px;
    font-weight: 600;
}

.data-table td {
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: none;
}


/* ========================================
   9. شارات الحالة العامة
======================================== */

.badge {
    display: inline-block;

    padding: 4px 10px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    color: #198754;
    background: #E8F5EC;
}

.badge-warning {
    color: #946200;
    background: #FFF4D6;
}

.badge-danger {
    color: #B42318;
    background: #FEECEB;
}


/* ========================================
   10. رسائل التنبيه العامة
======================================== */

.notice {
    padding: 13px 16px;
    margin-bottom: 18px;

    border-radius: 6px;

    font-size: 14px;
}

.notice-success {
    color: #146C43;
    background: #D1E7DD;
}

.notice-error {
    color: #B02A37;
    background: #F8D7DA;
}

.notice-warning {
    color: #856404;
    background: #FFF3CD;
}


/* ========================================
   11. رأس الموقع والشعار
======================================== */

.site-header {
    padding: 16px 0;

    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: inline-flex;
    align-items: center;

    color: var(--secondary);

    font-size: 21px;
    font-weight: 700;
}

.site-logo-text {
    display: inline-block;
}


/* ========================================
   12. الصفحة الرئيسية - واجهة الترحيب
======================================== */

.bouztat-welcome {
    max-width: 650px;

    margin: 70px auto;
    padding: 45px 25px;

    background: #FFFFFF;

    border: 1px solid var(--border);
    border-radius: 12px;

    text-align: center;

    box-shadow: var(--shadow);
}

.welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 65px;
    height: 65px;

    margin: 0 auto 20px;

    color: var(--success);
    background: #E8F5EC;

    border-radius: 50%;

    font-size: 30px;
}

.bouztat-welcome h1 {
    margin-bottom: 10px;
    font-size: 25px;
}

.bouztat-welcome p {
    color: var(--text-muted);
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-top: 15px;
    padding: 9px 16px;

    color: #946200;
    background: #FFF4D6;

    border-radius: 20px;

    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;

    background: var(--primary);

    border-radius: 50%;
}


/* ========================================
   13. صفحات WordPress العادية
======================================== */

.page-content {
    margin-bottom: 25px;
}

.page-article,
.content-article {
    margin-bottom: 25px;
}

.page-header,
.entry-header {
    margin-bottom: 20px;
    padding-bottom: 15px;

    border-bottom: 1px solid var(--border);
}

.page-title,
.entry-title {
    margin-bottom: 0;

    font-size: 24px;
    line-height: 1.5;
}

.entry-title a {
    color: var(--secondary);
}

.entry-title a:hover {
    color: var(--primary);
}

.entry-content {
    color: var(--text);
    overflow-wrap: anywhere;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content img {
    border-radius: var(--radius);
}

.entry-content ul,
.entry-content ol {
    margin: 0 20px 18px 0;
}

.entry-content li {
    margin-bottom: 7px;
}

.page-links {
    margin-top: 20px;
}

.content-empty,
.page-not-found {
    padding: 25px 10px;
    text-align: center;
    color: var(--text-muted);
}


/* ========================================
   14. صفحة الخطأ 404
======================================== */

.error-404 {
    max-width: 700px;

    margin: 35px auto;
    padding: 45px 25px;

    text-align: center;
}

.error-404-content {
    max-width: 520px;
    margin: 0 auto;
}

.error-404-number {
    margin-bottom: 15px;

    color: var(--primary);

    font-size: 85px;
    font-weight: 800;
    line-height: 1.2;
}

.error-404 h1 {
    margin-bottom: 12px;
    font-size: 25px;
}

.error-404 p {
    margin-bottom: 22px;
}

.error-404-search {
    margin-bottom: 20px;
}

.error-404-actions {
    display: flex;
    justify-content: center;
}


/* ========================================
   15. نموذج البحث العام في WordPress
======================================== */

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form label {
    flex: 1;
    min-width: 0;
}

.search-form .search-field {
    width: 100%;
    min-height: 42px;

    padding: 9px 12px;

    border: 1px solid #D5D9E0;
    border-radius: 6px;
}

.search-form .search-submit {
    min-height: 42px;
    padding: 9px 15px;

    color: #FFFFFF;
    background: var(--secondary);

    border: 0;
    border-radius: 6px;
}


/* ========================================
   16. تذييل الموقع
======================================== */

.site-footer {
    padding: 18px 15px;

    color: var(--text-muted);
    background: #FFFFFF;

    border-top: 1px solid var(--border);

    text-align: center;
    font-size: 12px;
}


/* ========================================
   17. تحسينات الأجهزة اللوحية
======================================== */

@media (max-width: 768px) {

    .container {
        padding-right: 15px;
        padding-left: 15px;
    }

    .site-main {
        padding: 20px 0;
    }

    .card {
        padding: 16px;
    }

    .bouztat-welcome {
        margin: 30px auto;
        padding: 30px 18px;
    }

    .bouztat-welcome h1 {
        font-size: 21px;
    }

    .page-title,
    .entry-title {
        font-size: 21px;
    }

    .error-404 {
        margin: 25px auto;
        padding: 35px 20px;
    }

}


/* ========================================
   18. تحسينات الهواتف الصغيرة
======================================== */

@media (max-width: 480px) {

    body {
        font-size: 14px;
    }

    .container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .error-404 {
        margin: 20px auto;
        padding: 30px 18px;
    }

    .error-404-number {
        font-size: 65px;
    }

    .error-404 h1 {
        font-size: 21px;
    }

    .error-404-actions {
        flex-direction: column;
    }

    .error-404-actions .btn {
        width: 100%;
    }

    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form .search-submit {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

}


/* ========================================
   19. احترام إعداد تقليل الحركة
======================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}




