﻿@font-face {
    font-family: Cairo;
    src: url('../Fonts/Cairo-Regular.ttf') format('truetype');
}

:root {
    --primary: #51c9bb;
    --primary-dark: #1f776d;
    --secondary: #e9c46a;
    --dark: #264653;
    --red: #e76f51;
    --shadow: 0px 1px 5px rgba(104, 104, 104, 0.8);
    --shadow01: 0px 1px 5px rgba(192, 74, 74, 0.8);
    --buttonShadow: 1.5px 1.5px 3px -2px rgba(0, 0, 0, 0.66);
}

html {
    font-family: Cairo;
}

body {
    background-color: #f8fffe;
    margin: 10px; /* تقليل الهامش في الهواتف */
    font-family: Cairo;
}

/* أو الأفضل: */
@media (max-width: 600px) {
    body {
        margin: 5px;
    }
}

.association-ar {
    font-size: 1.7rem;
}

.association-en {
    font-size: 1.7rem;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 1rem 1rem;
    box-shadow: var(--shadow);
}

.icon-btn {
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.5);
    color: white;
    cursor: pointer;
    min-width: 70px;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    margin: 0.2rem;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    font-family: Cairo;
}

    .icon-btn i {
        font-size: 1.2rem;
    }

    .icon-btn span {
        font-size: 0.7rem;
        font-weight: bold;
        white-space: nowrap;
    }

    .icon-btn:hover {
        background: rgba(255,255,255,0.3);
        border-color: white;
        color: white;
        transform: translateY(-2px);
    }

    .icon-btn:active {
        transform: scale(0.95);
    }
/*
.login-btn {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

    .login-btn:hover {
        background: #155f57;
        border-color: #155f57;
        color: white;
    }*/

/*.logout-btn {
    background: rgba(231, 111, 81, 0.3);
    border-color: var(--red);
}

    .logout-btn:hover {
        background: var(--red);
        border-color: var(--red);
        color: white;
    }*/

.mobile-menu-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-family: Cairo;
    font-size: 1.1rem;
    width: 100%;
    text-align: right;
    cursor: pointer;
    transition: background 0.2s;
}

    .mobile-menu-btn:hover {
        background: rgba(255,255,255,0.2);
    }

.hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    display: none;
    padding: 0.25rem;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--primary-dark);
    padding: 1rem;
}

    .mobile-menu a {
        color: white;
        text-decoration: none;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }

        .mobile-menu a:hover {
            color: var(--secondary);
        }

.header-left {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    justify-content: center;
}

.header-right {
    flex: 0 0 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.logo-section .logo {
    max-height: 60px;
    width: auto;
    margin-left: 30px;
}

.main-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 1rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.footer-center {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.4;
}

.main-footer p {
    margin: 0.2rem 0;
}

.rtl-label {
    direction: rtl;
    text-align: right;
}

.form-control.rtl-input {
    direction: rtl;
    text-align: right;
}

.form-control {
    direction: rtl;
    text-align: right;
    border: #1f776d solid 1px;
    background-color: #81b6b0;
}

    .form-control:focus {
        border: #1f776d solid 1px;
        box-shadow: var(--shadow);
    }

.form-floating > label {
    direction: rtl;
    text-align: right;
    right: 0;
    left: auto;
    color: #264653;
    font-weight: bold;
}

.form-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background-color: transparent !important;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-wrapper input {
        flex: 1;
    }

.toggle-password {
    position: absolute;
    left: 20px;
    top: 18px;
    cursor: pointer;
    color: var(--dark);
}

.btn01 {
    background-color: var(--primary-dark);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: Cairo;
    font-weight: bold;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.15s;
}

    .btn01:hover {
        background-color: #155f57;
        transform: translateY(-2px);
    }

    .btn01:active {
        transform: scale(0.96);
    }

.user-info {
    font-size: 1.5rem;
}

.index-text {
    margin-top: 20px;
    font-size: 1.2rem;
    color: rgb(10, 10, 143);
}

.index-input {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .main-header {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        text-align: center;
    }

    .header-left,
    .header-right {
        justify-content: center;
    }

    .header-center {
        font-size: 1rem;
        flex-direction: column;
    }

    .icon-btn {
        padding: 0.4rem;
        min-width: 60px;
    }

        .icon-btn span {
            font-size: 0.6rem;
        }

    .header-right {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .association-en {
        font-size: 1.2rem;
    }

    .association-ar {
        font-size: 1.2rem;
    }

    .logo-section .logo {
        margin-left: 10px;
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .header-center {
        font-size: 0.9rem;
    }

    .icon-btn {
        padding: 0.3rem;
        min-width: 55px;
    }
}


.cp-page {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.cp-welcome {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.cp-title {
    text-align: center;
    font-size: 1.8rem; /* قد تحتاج لتصغيره قليلاً في الهواتف */
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 0.5rem;
    /* الإضافات المطلوبة لحل مشكلة السطر الواحد */
    display: block; /* لضمان أنه يتعامل ككتلة كاملة */
    width: 100%; /* ليأخذ عرض الشاشة المتاح فقط */
    white-space: normal; /* السماح للنص بالنزول لسطر جديد (الأهم) */
    line-height: 1.4; /* لجعل المسافة بين السطرين مريحة للقراءة */
    padding: 0 15px; /* لضمان عدم التصاق النص بحواف الشاشة */
}

.cp-sub {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.cp-field {
    margin-bottom: 1.5rem;
}

.cp-label {
    display: block;
    color: var(--dark);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    text-align: right;
}

.cp-confirm {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
    margin-bottom: 0.5rem;
}

.cp-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-dark);
    cursor: pointer;
    flex-shrink: 0;
}

.cp-confirm-label {
    color: var(--red);
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
}

.cp-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: Cairo;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.15s;
}

    .cp-btn:hover {
        background: #155f57;
        transform: translateY(-2px);
    }

    .cp-btn:active {
        transform: scale(0.97);
    }

.cp-hint {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 0.4s ease;
    background: white;
    border-right: 5px solid var(--primary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem 1.2rem;
    z-index: 1000;
    width: 85%;
    max-width: 440px;
    display: flex;
    align-items: center;
    gap: 12px;
    direction: rtl;
}

    .cp-hint.cp-hint-show {
        bottom: 30px;
    }

.cp-hint-icon {
    color: var(--secondary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cp-hint p {
    color: var(--dark);
    margin: 0;
    font-size: 0.9rem;
}

.alert-success-cp {
    background: #e8f8f5;
    border-right: 4px solid var(--primary-dark);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--primary-dark);
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error-cp {
    background: #fff5f3;
    border-right: 4px solid var(--red);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--red);
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}


.cp-toast {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-right: 5px solid var(--primary-dark);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: Cairo;
    font-size: 1rem;
    font-weight: bold;
    color: var(--dark);
    direction: rtl;
    transition: top 0.4s ease;
    min-width: 280px;
    justify-content: center;
}

    .cp-toast i {
        color: var(--primary-dark);
        font-size: 1.3rem;
    }

.cp-toast-show {
    top: 20px;
}

.complaints-table-wrapper {
    background: white;
    border-radius: 16px;
    border: 1px solid #c8ece8;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 1.5rem;
}

.complaints-table {
    width: 100%;
    margin: 0;
    text-align: right;
}

    .complaints-table thead {
        background: var(--primary);
        color: white;
    }

        .complaints-table thead th {
            padding: 1rem;
            font-weight: bold;
            border: none;
        }

    .complaints-table tbody tr:hover {
        background: #f0faf8;
    }

    .complaints-table tbody td {
        padding: 0.85rem 1rem;
        vertical-align: middle;
        border-bottom: 1px solid #e8f5f3;
    }

.complaint-url {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

    .complaint-url:hover {
        text-decoration: underline;
    }

.check-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    font-size: 0.9rem;
}

.check-done {
    background: #e8f8f5;
    color: var(--primary-dark);
}

.check-pending {
    background: #f5f5f5;
    color: #aaa;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #aaa;
}

    .no-data i {
        font-size: 3rem;
        margin-bottom: 1rem;
        display: block;
    }


.dataTables_filter input {
    border: 1px solid var(--primary-dark) !important;
    background-color: #51c9bb !important;
    color: var(--dark) !important;
    border-radius: 8px;
}

.dataTables_filter label,
.dataTables_length label,
.dataTables_info {
    color: var(--dark) !important;
    font-family: Cairo;
}

.dataTables_length select {
    border: 1px solid var(--primary-dark) !important;
    background-color: #51c9bb !important;
    color: var(--dark) !important;
    border-radius: 8px;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
    border-radius: 6px;
}

.dataTables_paginate .paginate_button:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    border-radius: 6px;
}

/* للهواتف التي عرضها أقل من 600 بكسل */
@media (max-width: 600px) {
    .cp-title {
        font-size: 1.4rem !important;
        white-space: normal !important;
        display: block !important;
        text-align: center !important;
        line-height: 1.4 !important;
        padding: 0 10px !important;
    }
}