html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* الصفحة الرئيسية */

.home-page {
    direction: rtl;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 15px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 35px;
}

    .welcome-section h1 {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .welcome-section p {
        color: #777;
        font-size: 17px;
        margin: 0;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.dashboard-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    }

.card-icon {
    font-size: 36px;
    width: 55px;
    min-width: 55px;
    text-align: center;
}

.card-content h2 {
    font-size: 19px;
    margin: 0 0 6px;
}

.card-content p {
    font-size: 14px;
    color: #777;
    margin: 0;
}

/* الموبايل */

@media (max-width: 768px) {

    .home-page {
        padding: 20px 12px;
    }

    .welcome-section {
        margin-bottom: 25px;
    }

        .welcome-section h1 {
            font-size: 27px;
        }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-card {
        padding: 18px;
    }

    .card-icon {
        font-size: 30px;
    }

    .card-content h2 {
        font-size: 18px;
    }
}
/* صفحة العملاء */

.customers-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 25px 15px;
}

.page-header {
    text-align: center;
    margin-bottom: 25px;
}

    .page-header h1 {
        margin: 0 0 8px;
        font-size: 30px;
    }

    .page-header p {
        margin: 0;
        color: #777;
    }

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

    .search-box input {
        flex: 1;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 13px 15px;
        font-size: 15px;
    }

    .search-box button {
        border: none;
        border-radius: 10px;
        padding: 0 22px;
        cursor: pointer;
        background: #333;
        color: white;
    }

.customer-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}

    .customer-header h2 {
        margin: 0 0 6px;
        font-size: 21px;
    }

    .customer-header span {
        color: #777;
    }

.customer-phone {
    color: #555;
    direction: ltr;
}

.customer-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

    .customer-summary div {
        background: #f7f7f7;
        border-radius: 12px;
        padding: 15px;
        text-align: center;
    }

    .customer-summary span {
        display: block;
        color: #777;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .customer-summary strong {
        font-size: 17px;
    }

.account-button {
    display: block;
    text-align: center;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    padding: 13px;
}

@media (max-width: 600px) {

    .customers-page {
        padding: 20px 12px;
    }

    .customer-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .customer-summary {
        grid-template-columns: 1fr;
    }

    .search-box button {
        padding: 0 16px;
    }
}
/* =========================
   صفحة العملاء
   ========================= */

.customers-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 25px 15px;
}

.customers-header {
    text-align: center;
    margin-bottom: 25px;
}

    .customers-header h1 {
        margin: 0 0 8px;
        font-size: 32px;
        font-weight: 700;
    }

    .customers-header p {
        margin: 0;
        color: #777;
        font-size: 16px;
    }

/* البحث */

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

    .search-box input {
        flex: 1;
        padding: 13px 15px;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 15px;
        direction: rtl;
    }

    .search-box button {
        border: none;
        background: #333;
        color: white;
        border-radius: 10px;
        padding: 0 22px;
        font-size: 15px;
        cursor: pointer;
    }

/* بطاقة العميل */

.customer-card {
    background: white;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    .customer-card h2 {
        margin: 0 0 5px;
        font-size: 22px;
    }

.customer-code {
    color: #777;
    margin-top: 0;
}

.customer-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* المبالغ */

.amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

    .amount span {
        color: #666;
    }

    .amount strong {
        font-size: 17px;
    }

/* زر الحساب */

.account-button {
    display: block;
    margin-top: 20px;
    padding: 13px;
    text-align: center;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
}

    .account-button:hover {
        background: #222;
    }

/* =========================
   الموبايل
   ========================= */

@media (max-width: 600px) {

    .customers-page {
        padding: 20px 12px;
    }

    .customers-header h1 {
        font-size: 27px;
    }

    .search-box {
        gap: 7px;
    }

        .search-box button {
            padding: 0 15px;
        }

    .customer-card {
        padding: 18px;
        border-radius: 15px;
    }

        .customer-card h2 {
            font-size: 20px;
        }

    .amount {
        padding: 13px 0;
    }

        .amount strong {
            font-size: 15px;
        }
}
/* =========================
   صفحة العملاء
   ========================= */

.customers-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 25px 15px;
}

.customers-header {
    text-align: center;
    margin-bottom: 25px;
}

    .customers-header h1 {
        margin: 0 0 8px;
        font-size: 32px;
        font-weight: 700;
    }

    .customers-header p {
        margin: 0;
        color: #777;
        font-size: 16px;
    }

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

    .search-box input {
        flex: 1;
        padding: 13px 15px;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 15px;
        direction: rtl;
    }

    .search-box button {
        border: none;
        background: #333;
        color: white;
        border-radius: 10px;
        padding: 0 22px;
        font-size: 15px;
        cursor: pointer;
    }

.customer-card {
    background: white;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    .customer-card h2 {
        margin: 0 0 5px;
        font-size: 22px;
    }

.customer-code {
    color: #777;
    margin-top: 0;
}

.customer-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

    .amount span {
        color: #666;
    }

    .amount strong {
        font-size: 17px;
    }

.account-button {
    display: block;
    margin-top: 20px;
    padding: 13px;
    text-align: center;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
}

    .account-button:hover {
        background: #222;
    }

@media (max-width: 600px) {

    .customers-page {
        padding: 20px 12px;
    }

    .customers-header h1 {
        font-size: 27px;
    }

    .customer-card {
        padding: 18px;
        border-radius: 15px;
    }

        .customer-card h2 {
            font-size: 20px;
        }

    .customer-summary {
        grid-template-columns: 1fr;
    }

    .amount {
        padding: 13px 0;
    }

        .amount strong {
            font-size: 15px;
        }
}
/* =========================
   حساب العميل
   ========================= */

.customer-account-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 25px 15px;
}

.account-header {
    text-align: center;
    margin-bottom: 25px;
}

    .account-header h1 {
        margin: 0 0 8px;
        font-size: 30px;
    }

    .account-header p {
        margin: 0;
        color: #777;
    }

.account-card,
.transactions-card {
    background: white;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.customer-info h2 {
    margin: 0 0 5px;
}

.customer-info p {
    margin: 5px 0;
    color: #666;
}

.account-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.account-amount {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

    .account-amount span {
        color: #666;
    }

    .account-amount strong {
        font-size: 17px;
    }

.transactions-card h2 {
    margin-top: 0;
}

.transaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

    .transaction div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .transaction small {
        color: #777;
    }

.back-button {
    display: block;
    text-align: center;
    padding: 13px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
}

@media (max-width: 600px) {

    .customer-account-page {
        padding: 20px 12px;
    }

    .account-card,
    .transactions-card {
        padding: 18px;
    }

    .account-amount {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .transaction {
        align-items: flex-start;
        gap: 10px;
    }
}
/* =========================
   تحسين حساب العميل للموبايل
   ========================= */

.customer-account-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}

.account-header {
    text-align: center;
    margin-bottom: 20px;
}

    .account-header h1 {
        margin: 0 0 6px;
        font-size: 30px;
        font-weight: 700;
    }

    .account-header p {
        margin: 0;
        color: #777;
        font-size: 17px;
    }

.account-card,
.transactions-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.customer-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.customer-info p {
    margin: 6px 0;
    color: #666;
}

.account-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 18px 0;
}

/* المبالغ */

.account-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

    .account-amount:last-child {
        border-bottom: none;
    }

    .account-amount span {
        color: #666;
        font-size: 15px;
    }

    .account-amount strong {
        font-size: 18px;
    }

/* حركة الحساب */

.transactions-card h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.transaction {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

    .transaction:last-child {
        border-bottom: none;
    }

    .transaction div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .transaction strong {
        font-size: 16px;
    }

    .transaction small {
        color: #777;
        font-size: 13px;
    }

    .transaction > strong {
        white-space: nowrap;
        font-size: 16px;
    }

/* زر العودة */

.back-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 14px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
}

/* الموبايل */

@media (max-width: 600px) {

    .customer-account-page {
        padding: 15px 10px;
    }

    .account-header h1 {
        font-size: 26px;
    }

    .account-card,
    .transactions-card {
        padding: 17px;
        border-radius: 15px;
    }

    .customer-info h2 {
        font-size: 20px;
    }

    .account-amount {
        padding: 13px 0;
    }

        .account-amount span {
            font-size: 14px;
        }

        .account-amount strong {
            font-size: 16px;
        }

    .transaction {
        flex-direction: column;
        gap: 8px;
    }

        .transaction > strong {
            align-self: flex-start;
            font-size: 17px;
        }
}
.search-result {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
}

.no-results {
    text-align: center;
}

    .no-results h2 {
        margin-bottom: 8px;
    }
/* =========================
   صفحة الطلبات
   ========================= */

.orders-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}

.orders-header {
    text-align: center;
    margin-bottom: 25px;
}

    .orders-header h1 {
        margin: 0 0 8px;
        font-size: 30px;
    }

    .orders-header p {
        margin: 0;
        color: #777;
    }

.order-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

    .order-header h2 {
        margin: 0 0 6px;
        font-size: 21px;
    }

.order-customer {
    margin: 0;
    color: #666;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    background: #f1f1f1;
    font-size: 13px;
    white-space: nowrap;
}

.order-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

    .order-info div {
        background: #f7f7f7;
        border-radius: 12px;
        padding: 14px;
    }

    .order-info span {
        display: block;
        color: #777;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .order-info strong {
        font-size: 16px;
    }

.order-description {
    margin: 0;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.no-results {
    text-align: center;
}

@media (max-width: 600px) {

    .orders-page {
        padding: 15px 10px;
    }

    .order-card {
        padding: 17px;
        border-radius: 15px;
    }

    .order-header {
        flex-direction: column;
    }

    .order-status {
        align-self: flex-start;
    }

    .order-info {
        grid-template-columns: 1fr;
    }
}
/* =========================
   تفاصيل الطلب
   ========================= */

.order-details-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}

.order-details-header {
    text-align: center;
    margin-bottom: 20px;
}

    .order-details-header h1 {
        margin: 0 0 5px;
        font-size: 30px;
    }

    .order-details-header p {
        margin: 0;
        color: #777;
    }

.order-details-card,
.order-money-card,
.payments-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.details-row,
.money-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

    .details-row:last-child,
    .money-row:last-child {
        border-bottom: none;
    }

    .details-row span,
    .money-row span {
        color: #777;
    }

.details-description {
    padding: 15px 0;
    border-top: 1px solid #eee;
}

    .details-description span {
        color: #777;
    }

    .details-description p {
        margin: 8px 0 0;
    }

.order-money-card h2,
.payments-card h2 {
    margin-top: 0;
    font-size: 21px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

    .payment-row:last-child {
        border-bottom: none;
    }

    .payment-row div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .payment-row small {
        color: #777;
    }

.details-buttons {
    margin-top: 10px;
}

@media (max-width: 600px) {

    .order-details-page {
        padding: 15px 10px;
    }

    .order-details-card,
    .order-money-card,
    .payments-card {
        padding: 17px;
        border-radius: 15px;
    }

    .details-row,
    .money-row {
        padding: 13px 0;
    }

    .payment-row {
        flex-direction: column;
    }

        .payment-row > strong {
            align-self: flex-start;
        }
}
/* =========================
   صفحة الطلبات
   ========================= */

.orders-page {
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}

.orders-header {
    text-align: center;
    margin-bottom: 25px;
}

    .orders-header h1 {
        margin: 0 0 8px;
        font-size: 30px;
    }

    .orders-header p {
        margin: 0;
        color: #777;
    }

.order-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

    .order-header h2 {
        margin: 0 0 6px;
        font-size: 21px;
    }

.order-customer {
    margin: 0;
    color: #666;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    background: #f1f1f1;
    font-size: 13px;
    white-space: nowrap;
}

.order-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

    .order-info div {
        background: #f7f7f7;
        border-radius: 12px;
        padding: 14px;
    }

    .order-info span {
        display: block;
        color: #777;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .order-info strong {
        font-size: 16px;
    }

.order-description {
    margin: 0;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.order-details-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 15px;
    padding: 13px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
}

    .order-details-button:hover {
        color: white;
        text-decoration: none;
    }

.no-results {
    text-align: center;
}

.search-result {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 600px) {

    .orders-page {
        padding: 15px 10px;
    }

    .order-card {
        padding: 17px;
        border-radius: 15px;
    }

    .order-header {
        flex-direction: column;
    }

    .order-status {
        align-self: flex-start;
    }

    .order-info {
        grid-template-columns: 1fr;
    }
}
/* =========================
   تسجيل دفعة جديدة
   ========================= */

.payment-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 15px;
}

.payment-header {
    text-align: center;
    margin-bottom: 20px;
}

    .payment-header h1 {
        margin: 0 0 8px;
    }

    .payment-header p {
        margin: 0;
        color: #777;
    }

.payment-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

    .payment-summary div {
        background: white;
        border-radius: 12px;
        padding: 15px;
        text-align: center;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    }

    .payment-summary span {
        display: block;
        color: #777;
        font-size: 13px;
        margin-bottom: 7px;
    }

    .payment-summary strong {
        font-size: 15px;
    }

.payment-form-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        margin-bottom: 7px;
        font-weight: 600;
    }

.form-control {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 15px;
    background: white;
}

    .form-control:focus {
        outline: none;
        border-color: #777;
    }

.validation-message {
    display: block;
    color: #b00020;
    margin-top: 5px;
    font-size: 13px;
}

.payment-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.save-payment-button,
.cancel-payment-button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 13px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
}

.save-payment-button {
    background: #333;
    color: white;
}

.cancel-payment-button {
    background: #eee;
    color: #333;
}

.save-payment-button:hover {
    color: white;
}

.cancel-payment-button:hover {
    color: #333;
    text-decoration: none;
}

.payments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

    .payments-header h2 {
        margin: 0;
    }

.add-payment-button {
    background: #333;
    color: white;
    padding: 9px 14px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

    .add-payment-button:hover {
        color: white;
        text-decoration: none;
    }

@media (max-width: 600px) {

    .payment-summary {
        grid-template-columns: 1fr;
    }

    .payment-form-card {
        padding: 17px;
    }

    .payment-buttons {
        flex-direction: column;
    }

    .payments-header {
        flex-direction: column;
        align-items: stretch;
    }

    .add-payment-button {
        text-align: center;
    }
}
/* =========================
   صفحة العملاء
   ========================= */

.customers-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}

.customers-header {
    text-align: center;
    margin-bottom: 25px;
}

    .customers-header h1 {
        margin: 0 0 7px;
        font-size: 30px;
    }

    .customers-header p {
        margin: 0;
        color: #777;
    }

.customer-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

    .customer-search input {
        flex: 1;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 12px 15px;
        font-size: 15px;
        text-align: right;
    }

    .customer-search button {
        border: none;
        background: #333;
        color: white;
        border-radius: 10px;
        padding: 0 25px;
        cursor: pointer;
    }

.search-message {
    margin-bottom: 15px;
    color: #777;
}

.customer-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.customer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

    .customer-card-header h2 {
        margin: 0 0 5px;
        font-size: 21px;
    }

.customer-code {
    color: #777;
    font-size: 14px;
}

.customer-phone,
.customer-address {
    margin-top: 12px;
    color: #555;
}

.customer-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.customer-stat {
    background: #f7f7f7;
    border-radius: 12px;
    padding: 13px;
}

    .customer-stat span {
        display: block;
        color: #777;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .customer-stat strong {
        font-size: 15px;
    }

.customer-account-button {
    display: block;
    text-align: center;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    padding: 13px;
    margin-top: 18px;
}

    .customer-account-button:hover {
        color: white;
        text-decoration: none;
    }

.no-customers {
    text-align: center;
}

@media (max-width: 600px) {

    .customers-page {
        padding: 15px 10px;
    }

    .customer-search {
        flex-direction: column;
    }

        .customer-search button {
            padding: 12px;
        }

    .customer-stats {
        grid-template-columns: 1fr;
    }

    .customer-card {
        padding: 17px;
    }
}
/* =========================
   طلبات العميل داخل الحساب
   ========================= */

.customer-orders-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.customer-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

    .customer-orders-header h2 {
        margin: 0;
    }

    .customer-orders-header span {
        color: #777;
        font-size: 14px;
    }

.customer-order {
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 17px;
    margin-bottom: 15px;
}

    .customer-order:last-child {
        margin-bottom: 0;
    }

.customer-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

    .customer-order-header h3 {
        margin: 0 0 5px;
        font-size: 19px;
    }

    .customer-order-header span {
        color: #777;
        font-size: 13px;
    }

    .customer-order-header .order-status {
        background: #f1f1f1;
        color: #333;
        padding: 6px 10px;
        border-radius: 20px;
        white-space: nowrap;
    }

.customer-order-description {
    border-top: 1px solid #eee;
    margin-top: 14px;
    padding-top: 14px;
    color: #666;
}

.customer-order-money {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

    .customer-order-money div {
        background: #f7f7f7;
        border-radius: 10px;
        padding: 12px;
    }

    .customer-order-money span {
        display: block;
        color: #777;
        font-size: 12px;
        margin-bottom: 5px;
    }

    .customer-order-money strong {
        font-size: 14px;
    }

.customer-order-payments {
    margin-top: 18px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

    .customer-order-payments h4 {
        margin: 0 0 10px;
    }

.customer-payment {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

    .customer-payment:last-child {
        border-bottom: none;
    }

    .customer-payment div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .customer-payment small {
        color: #777;
    }

.customer-order-details-button {
    display: block;
    text-align: center;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    padding: 12px;
    margin-top: 15px;
}

    .customer-order-details-button:hover {
        color: white;
        text-decoration: none;
    }

.no-customer-orders {
    text-align: center;
    padding: 25px 10px;
}

    .no-customer-orders h3 {
        margin-bottom: 7px;
    }

    .no-customer-orders p {
        color: #777;
    }

@media (max-width: 600px) {

    .customer-orders-card {
        padding: 17px;
    }

    .customer-orders-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .customer-order-header {
        flex-direction: column;
    }

    .customer-order-money {
        grid-template-columns: 1fr;
    }

    .customer-payment {
        flex-direction: column;
    }
}
/* =========================
   إنشاء طلب جديد
   ========================= */

.create-order-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 15px;
}

.create-order-header {
    text-align: center;
    margin-bottom: 20px;
}

    .create-order-header h1 {
        margin: 0 0 7px;
    }

    .create-order-header p {
        margin: 0;
        color: #777;
    }

.create-order-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        margin-bottom: 7px;
        font-weight: 600;
    }

.form-control {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 15px;
    background: white;
}

    .form-control:focus {
        outline: none;
        border-color: #777;
    }

textarea.form-control {
    resize: vertical;
}

.validation-message {
    display: block;
    color: #b00020;
    margin-top: 5px;
    font-size: 13px;
}

.create-order-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.save-order-button,
.cancel-order-button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 13px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
}

.save-order-button {
    background: #333;
    color: white;
}

.cancel-order-button {
    background: #eee;
    color: #333;
}

.save-order-button:hover {
    color: white;
}

.cancel-order-button:hover {
    color: #333;
    text-decoration: none;
}

@media (max-width: 600px) {

    .create-order-page {
        padding: 15px 10px;
    }

    .create-order-card {
        padding: 17px;
    }

    .create-order-buttons {
        flex-direction: column;
    }
}
/* =========================
   زر طلب جديد
   ========================= */

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.new-order-button {
    display: inline-block;
    background: #333;
    color: white;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
}

    .new-order-button:hover {
        color: white;
        text-decoration: none;
    }

@media (max-width: 600px) {

    .orders-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .new-order-button {
        text-align: center;
    }
}
/* =========================
   نجاح إنشاء الطلب
   ========================= */

.order-created-message {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 18px;
    text-align: center;
}

    .order-created-message strong {
        display: block;
        font-size: 16px;
        margin-bottom: 5px;
    }

    .order-created-message span {
        color: #666;
        font-size: 14px;
    }

.first-payment-button,
.main-payment-button {
    display: block;
    text-align: center;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
}

    .first-payment-button:hover,
    .main-payment-button:hover {
        color: white;
        text-decoration: none;
    }

.no-payments-message {
    text-align: center;
    padding: 15px 0;
}

    .no-payments-message p {
        color: #777;
    }
/* =========================
   مواعيد الدفعات
   ========================= */

.payment-schedules-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.payment-schedules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

    .payment-schedules-header h2 {
        margin: 0 0 5px;
    }

    .payment-schedules-header p {
        margin: 0;
        color: #777;
        font-size: 13px;
    }

.schedule-button {
    display: inline-block;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    padding: 11px 15px;
    white-space: nowrap;
}

    .schedule-button:hover {
        color: white;
        text-decoration: none;
    }

.payment-schedule-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

    .payment-schedule-row:last-child {
        border-bottom: none;
    }

.schedule-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .schedule-main small {
        color: #777;
    }

.schedule-date {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .schedule-date span {
        color: #777;
        font-size: 12px;
    }

.schedule-status {
    text-align: left;
}

.payment-status {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 13px;
}

    .payment-status small {
        font-size: 11px;
    }

    .payment-status.paid {
        background: #e9f7ed;
    }

    .payment-status.late {
        background: #fdeaea;
    }

    .payment-status.due-today {
        background: #fff7d6;
    }

    .payment-status.upcoming {
        background: #eaf3ff;
    }

.no-schedules-message {
    text-align: center;
    padding: 20px 10px;
}

    .no-schedules-message p {
        color: #777;
        margin-bottom: 10px;
    }

@media (max-width: 600px) {

    .payment-schedules-header {
        flex-direction: column;
        align-items: stretch;
    }

    .schedule-button {
        text-align: center;
    }

    .payment-schedule-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .schedule-status {
        text-align: right;
    }
}
/* =========================
   صفحة مواعيد الدفعات
   ========================= */

.payment-schedules-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.payment-schedules-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

    .payment-schedules-page-header h1 {
        margin: 0 0 8px;
    }

    .payment-schedules-page-header p {
        margin: 4px 0;
        color: #777;
    }

.payment-schedule-form-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

.schedule-intro {
    margin-bottom: 20px;
}

    .schedule-intro h2 {
        margin-bottom: 8px;
    }

    .schedule-intro p {
        margin: 5px 0;
        color: #777;
    }

.schedule-input-card {
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 15px;
}

.schedule-number {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

    .schedule-number span {
        color: #777;
    }

    .schedule-number strong {
        font-size: 20px;
    }

.schedule-information {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.schedule-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .schedule-field label {
        font-size: 13px;
        color: #555;
    }

.readonly-field {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 9px;
    padding: 10px;
    min-height: 20px;
}

.date-input,
.notes-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 9px;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
}

    .date-input:focus,
    .notes-input:focus {
        outline: none;
        border-color: #333;
    }

.schedule-summary {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    background: #f7f7f7;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

    .schedule-summary div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .schedule-summary span {
        color: #777;
        font-size: 13px;
    }

.schedule-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.save-schedules-button,
.cancel-schedules-button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

.save-schedules-button {
    background: #333;
    color: white;
    flex: 1;
}

.cancel-schedules-button {
    background: #eee;
    color: #333;
}

    .cancel-schedules-button:hover {
        color: #333;
        text-decoration: none;
    }

.schedule-errors {
    background: #fdeaea;
    border: 1px solid #f0b5b5;
    color: #a00000;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

    .schedule-errors div {
        margin: 4px 0;
    }

@media (max-width: 600px) {

    .payment-schedules-page-header {
        flex-direction: column;
        align-items: stretch;
    }

        .payment-schedules-page-header .back-button {
            text-align: center;
        }

    .schedule-information {
        grid-template-columns: 1fr;
    }

    .schedule-summary {
        flex-direction: column;
    }

    .schedule-actions {
        flex-direction: column;
    }

    .cancel-schedules-button {
        width: auto;
    }
}
/* =========================
   تنبيه الدفعات المتأخرة
   ========================= */

.overdue-alert {
    background: #fff5f5;
    border: 1px solid #e7b5b5;
    border-right: 5px solid #c62828;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
}

.overdue-alert-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.overdue-icon {
    font-size: 25px;
}

.overdue-alert-header h2 {
    margin: 0 0 4px;
    color: #a51d1d;
    font-size: 20px;
}

.overdue-alert-header p {
    margin: 0;
    color: #777;
}

.overdue-payment {
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    gap: 15px;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
    border: 1px solid #eee;
}

.overdue-payment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .overdue-payment-info strong {
        font-size: 16px;
    }

    .overdue-payment-info span {
        color: #777;
        font-size: 13px;
    }

.overdue-payment-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
}

    .overdue-payment-details span {
        color: #666;
    }

.late-days {
    color: #c62828;
}

.overdue-details-button {
    background: #333;
    color: white;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 9px;
    text-align: center;
    white-space: nowrap;
}

    .overdue-details-button:hover {
        color: white;
        text-decoration: none;
    }

@media (max-width: 700px) {

    .overdue-payment {
        grid-template-columns: 1fr;
    }

    .overdue-details-button {
        width: 100%;
        box-sizing: border-box;
    }
}
/* ========================================
   تنبيه الدفعات المتأخرة في حساب العميل
   ======================================== */

.customer-overdue-alert {
    background: #fff5f5;
    border: 1px solid #e7b5b5;
    border-right: 5px solid #c62828;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
}

.customer-overdue-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

    .customer-overdue-title > span {
        font-size: 25px;
    }

    .customer-overdue-title h2 {
        margin: 0 0 5px;
        color: #a51d1d;
        font-size: 19px;
    }

    .customer-overdue-title p {
        margin: 0;
        color: #777;
        font-size: 13px;
    }

.customer-overdue-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 15px;
    align-items: center;
}

.customer-overdue-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .customer-overdue-info span {
        color: #777;
        font-size: 13px;
    }

.customer-overdue-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
}

    .customer-overdue-details span {
        color: #666;
    }

.customer-late-days {
    color: #c62828;
}

.customer-overdue-button {
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 9px;
    padding: 10px 14px;
    text-align: center;
    white-space: nowrap;
}

    .customer-overdue-button:hover {
        color: white;
        text-decoration: none;
    }


/* ========================================
   الهاتف
   ======================================== */

@@media (max-width: 700px) {

    .customer-overdue-item {
        grid-template-columns: 1fr;
    }

    .customer-overdue-button {
        width: 100%;
        box-sizing: border-box;
    }
}
/* ==========================================
   طباعة تقرير الصندوق
   ========================================== */

@media print {

    body {
        background: white !important;
    }

    nav,
    header,
    footer {
        display: none !important;
    }

    .report-actions {
        display: none !important;
    }

    .report-filter {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    table {
        width: 100% !important;
        font-size: 11px !important;
    }

    th,
    td {
        padding: 5px !important;
    }

    h1 {
        font-size: 22px !important;
    }

    .text-success {
        color: black !important;
    }

    .text-danger {
        color: black !important;
    }

    .text-muted {
        color: #555 !important;
    }

    .alert {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}
/* =========================================================
   تفاصيل الطلب الإضافية
   ========================================================= */

.order-extra-details {
    margin-top: 12px;
}

.details-section-title {
    background: #f7f1e7;
    color: #5b381d;
    border-right: 4px solid #6b451f;
    border-radius: 5px;
    padding: 9px 12px;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: right;
}

.order-details-grid {
    width: 100%;
}

    .order-details-grid .details-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        min-height: 32px;
        padding: 6px 8px;
        border-bottom: 1px solid #eadfce;
    }

        .order-details-grid .details-row:last-child {
            border-bottom: none;
        }

        .order-details-grid .details-row span {
            color: #6b451f;
            font-size: 13px;
            font-weight: 600;
        }

        .order-details-grid .details-row strong {
            color: #333;
            font-size: 13px;
            font-weight: 500;
            text-align: left;
        }

    .order-details-grid .details-row-full {
        display: block;
    }

        .order-details-grid .details-row-full strong {
            display: block;
            margin-top: 5px;
            text-align: right;
            line-height: 1.7;
        }


@media (max-width: 600px) {

    .order-details-grid .details-row {
        gap: 8px;
    }

        .order-details-grid .details-row span,
        .order-details-grid .details-row strong {
            font-size: 12px;
        }
}
/* =========================================================
   تحسينات عامة للهاتف والكمبيوتر
   Milla Accounting System
   ========================================================= */

/* منع خروج أي عنصر عن عرض الشاشة */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* تحسين اتجاه البرنامج */
body {
    direction: rtl;
    text-align: right;
}

/* جعل الحاويات تستفيد من عرض الشاشة */
main {
    width: 100%;
    box-sizing: border-box;
}

/* تحسين الروابط والأزرار للمس */
button,
.btn,
a.btn,
.nav-link,
.navbar-toggler {
    touch-action: manipulation;
}

/* =========================================================
   تحسين شريط القائمة
   ========================================================= */

.navbar {
    min-height: 56px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
}

.navbar-nav .nav-link {
    padding: 10px 14px;
}

/* =========================================================
   الهاتف
   ========================================================= */

@media (max-width: 767.98px) {

    body {
        font-size: 15px;
        margin-bottom: 70px;
    }

    /* مساحة مناسبة للمحتوى */
    main > .container {
        width: 100%;
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* شريط القائمة */
    .navbar {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .navbar-toggler {
        padding: 7px 10px;
        border-radius: 8px;
    }

    .navbar-collapse {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #eee;
    }

    .navbar-nav {
        width: 100%;
    }

        .navbar-nav .nav-item {
            width: 100%;
        }

        .navbar-nav .nav-link {
            display: block;
            width: 100%;
            box-sizing: border-box;
            padding: 12px 10px;
            border-radius: 8px;
            margin-bottom: 3px;
        }

    /* الأزرار */
    button,
    .btn,
    a.btn,
    input[type="submit"] {
        min-height: 44px;
    }

    /* الحقول */
    input,
    select,
    textarea,
    .form-control,
    .form-select {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* البطاقات */
    .card {
        max-width: 100%;
    }

    /* منع الجداول من كسر الشاشة */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    /* البحث */
    .search-box,
    .customer-search {
        width: 100%;
        box-sizing: border-box;
    }

    /* الأزرار الموجودة بجانب بعضها */
    .payment-buttons,
    .create-order-buttons,
    .schedule-actions {
        width: 100%;
    }

    /* جعل الزر بعرض مناسب */
    .save-payment-button,
    .cancel-payment-button,
    .save-order-button,
    .cancel-order-button,
    .save-schedules-button,
    .cancel-schedules-button {
        min-height: 46px;
    }

    /* تحسين العناوين */
    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 21px;
    }

    h3 {
        font-size: 19px;
    }

    /* Footer */
    .footer {
        position: static;
        width: 100%;
        line-height: normal;
        padding: 15px 10px;
        text-align: center;
        white-space: normal;
        margin-top: 20px;
    }
}

/* =========================================================
   الهواتف الصغيرة جدًا
   ========================================================= */

@media (max-width: 400px) {

    .navbar-brand {
        font-size: 17px;
    }

    main > .container {
        padding-left: 7px;
        padding-right: 7px;
    }

    h1 {
        font-size: 23px;
    }

    h2 {
        font-size: 20px;
    }

    .dashboard-card,
    .customer-card,
    .order-card,
    .create-order-card,
    .payment-form-card,
    .account-card,
    .transactions-card {
        border-radius: 13px;
    }
}