﻿@font-face {
    font-family: 'Almarai';
    src: url('../fonts/Almarai-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Almarai';
    src: url('../fonts/Almarai-Bold.ttf') format('truetype');
    font-weight: 700;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary-color: #170C79;
    --secondary-color: #DDD2B6;
    --accent-color: #59ADBD;
    --light-color: #8BC3C9;
    --white-color: #ffffff;
    --text-color: #222222;
}

body {
    font-family: 'Almarai', sans-serif;
    background-color: #f5f7fa;
    direction: rtl;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

/* LOGIN */
/**********************************************************************/
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient( 135deg, var(--primary-color), #24149c );
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--white-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.login-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
}

.custom-input {
    height: 50px;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 16px;
}

    .custom-input:focus {
        border-color: var(--accent-color);
        box-shadow: none;
    }

.btn-login {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 18px;
    font-weight: bold;
    transition: 0.3s;
}

    .btn-login:hover {
        background-color: #24149c;
    }

.validation-message {
    color: red;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

@media (max-width: 576px) {
    .login-page {
        padding: 20px;
        align-items: center;
    }

    .login-card {
        max-width: 100%;
        padding: 28px 22px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .custom-input {
        height: 46px;
        font-size: 15px;
    }

    .btn-login {
        height: 46px;
        font-size: 16px;
    }
}

/*Branches MASTER PAGE*/
/*****************************************************************************/
.branch-navbar {
    min-height: 70px;
    background-color: var(--primary-color);
    color: white;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.branch-navbar-title {
    font-size: 22px;
    font-weight: 700;
}

.branch-navbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
}

.logout-link {
    color: white;
    text-decoration: none;
    background-color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 10px;
    transition: 0.3s;
}

    .logout-link:hover {
        color: white;
        background-color: var(--light-color);
    }

.branch-main {
    padding: 32px;
    min-height: calc(100vh - 70px);
    background-color: #f5f7fa;
}

@media (max-width: 576px) {
    .branch-navbar {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .branch-navbar-title {
        font-size: 18px;
    }

    .branch-navbar-user {
        flex-direction: column;
        gap: 10px;
    }

    .branch-main {
        padding: 16px;
    }
}
/*Monthly Sales Page*/
/**************************************************/
.page-header h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 2px;
}

.page-header p {
    color: #777;
    margin-bottom: 0;
    font-size: 13px;
}

.btn-main {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s;
}

    .btn-main:hover {
        background-color: #24149c;
    }

.status-label {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 13px;
}

.sales-entry-box {
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px;
}

.custom-input,
.form-select {
    height: 38px;
    border-radius: 8px;
    font-size: 14px;
    padding: 4px 10px;
}

.form-label {
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 700;
    color: #444;
}

.btn-add {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 700;
    transition: 0.2s;
}

    .btn-add:hover {
        background-color: var(--light-color);
    }

.custom-grid {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
    margin-bottom: 0;
}

    .custom-grid th {
        background-color: var(--primary-color);
        color: white;
        text-align: center;
        vertical-align: middle;
        padding: 10px 6px !important;
        font-size: 13px;
    }

    .custom-grid td {
        text-align: center;
        vertical-align: middle;
        padding: 8px 6px !important;
    }

.validation-message {
    font-size: 13px;
}

.page-card {
    background-color: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

hr {
    margin: 14px 0;
}

@media (max-width: 768px) {

    .page-card {
        padding: 14px;
    }

    .sales-entry-box {
        padding: 12px;
    }

    .btn-main,
    .btn-add,
    .custom-input,
    .form-select {
        height: 36px;
        font-size: 13px;
    }

    .custom-grid {
        font-size: 12px;
    }

    .page-header h2 {
        font-size: 18px;
    }
}

.sales-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* =========================================
   Summary
========================================= */

.summary-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.summary-inline-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-inline-title {
    font-size: 12px;
    color: #666;
    font-weight: 700;
}

.summary-inline-value {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
}
.bonus-item {
    padding: 4px 10px;
    border-radius: 8px;
    background-color: #fff4e5;
}

.bonus-value {
    color: #d97706 !important;
}

.net-total-item {
    padding: 4px 12px;
    border-radius: 8px;
    background-color: #ecfdf3;
}

.net-total-value {
    color: #198754 !important;
    font-size: 16px !important;
}
/* =========================================
   Status
========================================= */

.sales-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-title {
    font-size: 12px;
    font-weight: 700;
    color: #555;
}

.sales-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.status-draft {
    background-color: #6c757d;
}

.status-submitted {
    background-color: #198754;
}

/* =========================================
   Submit Button
========================================= */

.btn-submit-sales {
    height: 22px;
    border: none;
    border-radius: 6px;
    background-color: #198754;
    color: white;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    transition: 0.2s;
}

    .btn-submit-sales:hover {
        background-color: #157347;
    }

/* =========================================
   Mobile
========================================= */

@media (max-width: 768px) {

    .sales-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-bar,
    .sales-status-bar {
        width: 100%;
    }

    .summary-bar {
        gap: 10px;
    }
}



   


.btn-delete-grid {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

    .btn-delete-grid:hover {
        color: white;
        background-color: #bb2d3b;
    }

.btn-edit-grid {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

    .btn-edit-grid:hover {
        color: white;
        background-color: var(--light-color);
    }

/* =========================================
   Select2 Bootstrap Style
========================================= */

.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    display: flex !important;
    align-items: center !important;
    background-color: #fff !important;
    font-size: 14px !important;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #212529 !important;
        line-height: normal !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
        left: 8px !important;
        right: auto !important;
    }

.select2-dropdown {
    border-radius: 8px !important;
    border: 1px solid #ced4da !important;
    overflow: hidden !important;
    font-size: 14px !important;
}

.select2-search--dropdown {
    padding: 8px !important;
}

    .select2-search--dropdown .select2-search__field {
        border-radius: 6px !important;
        border: 1px solid #ced4da !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.select2-results__option--highlighted {
    background-color: var(--primary-color) !important;
}

.select2-container {
    width: 100% !important;
}

/* Focus */

.select2-container--default.select2-container--focus
.select2-selection--single {
    border-color: var(--accent-color) !important;
    box-shadow: none !important;
}

/* RTL */

.select2-container--default .select2-selection--single .select2-selection__rendered {
    text-align: right !important;
}

/* Mobile */

@media (max-width: 768px) {

    .select2-container--default .select2-selection--single {
        height: 36px !important;
        font-size: 13px !important;
    }

    .select2-results__option {
        font-size: 12px !important;
    }
}

.sales-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.status-title {
    font-size: 13px;
    font-weight: 700;
    color: #555;
}

.sales-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background-color: #6c757d;
    color: white;
}

.btn-submit-sales {
    height: 38px;
    border: none;
    border-radius: 8px;
    background-color: #198754;
    color: white;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
}

    .btn-submit-sales:hover {
        background-color: #157347;
    }

/*Admin Dashboard Styles*/
/*************************************************************/
.admin-navbar {
    min-height: 58px;
    background-color: var(--primary-color);
    color: white;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-navbar-title {
    font-size: 18px;
    font-weight: 700;
}

.admin-navbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.admin-main {
    padding: 22px;
    min-height: calc(100vh - 58px);
    background-color: #f5f7fa;
}

@media (max-width: 768px) {
    .admin-navbar {
        padding: 14px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .admin-main {
        padding: 14px;
    }
}

.dashboard-header h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 2px;
}

.dashboard-header p {
    color: #777;
    font-size: 13px;
    margin-bottom: 0;
}

.grid-status {
    display: inline-block;
    min-width: 80px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.status-draft {
    background-color: #6c757d;
}

.status-submitted {
    background-color: #198754;
}

.status-approved {
    background-color: #0d6efd;
}

.status-rejected {
    background-color: #dc3545;
}

.btn-open-grid {
    background-color: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

    .btn-open-grid:hover {
        background-color: var(--light-color);
        color: white;
    }

/*Review Monthly Sales Styles*/
/*********************************************************************/
.review-overview {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr 1fr;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 16px;
}

.review-store-block,
.review-summary-block,
.review-status-block {
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 14px;
}

.review-store-name {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.review-store-meta {
    color: #666;
    font-size: 12px;
    font-weight: 700;
}

.meta-separator {
    margin: 0 8px;
    color: #bbb;
}

.review-summary-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.review-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .review-summary-item span {
        color: #777;
        font-size: 11px;
        font-weight: 700;
    }

    .review-summary-item label,
    .review-summary-item .summary-value {
        color: var(--primary-color);
        font-size: 15px;
        font-weight: 700;
    }

    .review-summary-item.total label {
        font-size: 17px;
    }

.review-status-block {
    text-align: center;
}

.review-status-title {
    color: #777;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
}

.review-status-text label,
.review-status-text span {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
}

.review-submitted-date {
    margin-top: 6px;
    color: #666;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 992px) {
    .review-overview {
        grid-template-columns: 1fr;
    }

    .review-status-block {
        text-align: right;
    }
}

.btn-back {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

    .btn-back:hover {
        color: white;
        background-color: #5c636a;
    }

.review-info-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background-color: #f8f9fb;
    border: 1px solid #e9e9e9;
    border-radius: 10px;
    padding: 12px;
}

.review-info-item span {
    display: block;
    font-size: 11px;
    color: #777;
    margin-bottom: 3px;
    font-weight: 700;
}

.review-info-item label,
.review-info-item .aspNetDisabled {
    font-size: 14px;
    color: #222;
    font-weight: 700;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-approve {
    height: 34px;
    border: none;
    border-radius: 7px;
    background-color: #0d6efd;
    color: white;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
}

.btn-reject {
    height: 34px;
    border: none;
    border-radius: 7px;
    background-color: #dc3545;
    color: white;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .review-info-box {
        grid-template-columns: 1fr;
    }
}