﻿/* ---------- پایه ---------- */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: "IRANSans", Tahoma, "Vazir", Arial, sans-serif;
    background: #f4f8fb;
    direction: rtl;
    margin: 0;
    padding: 0 0 76px 0;
    min-height: 100vh;
}

/* ---------- عمومی ---------- */
.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;
}

/* ---------- فرم ---------- */
.center-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 90px 10px 0;
    box-sizing: border-box;
}

.service-form-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(11, 75, 138, 0.11);
    padding: 40px 48px 32px;
    width: 100%;
    max-width: 650px;
    direction: rtl;
    box-sizing: border-box;
    position: relative;
}

.form-title {
    color: #0b4b8a;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.service-form-box label,
.upload-label,
.form-check-label {
    color: #0b4b8a;
    font-size: 15px;
    font-weight: 500;
}

.service-form-box select,
.service-form-box textarea,
.service-form-box input[type=text] {
    background: #f5f7fa;
    border-radius: 8px;
    border: 1.2px solid #e9ecef;
    padding: 11px 13px;
    color: #222;
    font-size: 15px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.service-form-box textarea {
    min-height: 90px;
    resize: vertical;
}

.form-check-row {
    display: flex;
    align-items: center;
    margin: 10px 0 22px;
    gap: 9px;
}

.form-check-input {
    accent-color: #0b4b8a;
    width: 22px;
    height: 22px;
    margin-right: 2px;
}

.address-row, .phone-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.add-address-btn, .add-phone-btn {
    background: #0b4b8a;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 21px;
    width: 34px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.14s;
}

    .add-address-btn:hover, .add-phone-btn:hover {
        background: #165ea8;
    }

/* ---------- آپلود ---------- */
.upload-section {
    margin-bottom: 13px;
}

.custom-upload {
    display: flex;
    align-items: center;
    gap: 13px;
}

.custom-file-input {
    display: none;
}

.upload-btn {
    background: #f5f7fa;
    border: 1px solid #0b4b8a;
    color: #0b4b8a;
    border-radius: 7px;
    font-size: 16px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
}

    .upload-btn:hover {
        background: #0b4b8a;
        color: #fff;
    }

.file-name {
    font-size: 13px;
    color: #222;
    direction: ltr;
    font-family: Arial, Tahoma;
}

/* ---------- دکمه ثبت ---------- */
.btn-row {
    width: 100%;
    
    display: flex;
    justify-content: flex-end !important;
    margin-top: 38px;
}
.btn-row1 {
    width: 100%;
    direction: ltr !important; /* یا به صورت جدا به این دکمه بده */
    display: flex;
    justify-content: flex-end !important;
    margin-top: 38px;
}

.submit-btn {
    width: 150px;
    height: 44px;
    background: #0b4b8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.13s;
}

    .submit-btn:active, .submit-btn:hover {
        background: #165ea8;
    }

/* ---------- مدال ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 95%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    direction: rtl;
}

    .modal-content h3 {
        font-size: 18px;
        margin-bottom: 12px;
        color: #0b4b8a;
    }

    .modal-content textarea {
        width: 100%;
        min-height: 80px;
        padding: 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 14px;
        margin-bottom: 15px;
    }

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

    .modal-buttons button {
        padding: 8px 16px;
        font-size: 14px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }

#saveNewAddressBtn2 {
    background-color: #0b4b8a;
    color: white;
}

#closeModalBtn {
    background-color: #ccc;
    color: #000;
}

.styled-btn,
.submit-btn, /* دکمه ثبت درخواست */
/* دکمه اضافه کردن اطلاعات دستگاه */
#saveDeviceInfoBtn,
#closeDeviceInfoModalBtn {
    background-color: #205288;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 1rem;
    padding: 8px 24px;
    margin: 2px 0 2px 6px;
    cursor: pointer;
    transition: background 0.2s;
}

    .styled-btn:focus,
    .submit-btn:focus,
    .device-info-btn:focus,
    #saveDeviceInfoBtn:focus,
    #closeDeviceInfoModalBtn:focus {
        outline: none;
        box-shadow: 0 0 0 2px #aac5eb;
    }

    .styled-btn:hover,
    .submit-btn:hover,
    .device-info-btn:hover,
    #saveDeviceInfoBtn:hover,
    #closeDeviceInfoModalBtn:hover {
        background-color: #174071;
    }

.device-info-btn-container {
    display: flex;
    justify-content: flex-end;  /* می‌برد دکمه به سمت راست */
    margin-bottom: 20px;        /* فاصله از المان بعدی در صورت نیاز */
}

.device-info-btn {
    background-color: #1976d2;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 3px rgba(60,60,60,0.07);
}
.device-info-btn:hover, .device-info-btn:focus {
    background-color: #1565c0;
}


/* مودال کلی */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 28px 18px 18px 18px;
    border-radius: 11px;
    min-width: 290px;

    box-shadow: 0 4px 16px rgba(58, 87, 153, .11);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .modal-content h3 {
        margin: 0 0 10px 0;
        color: #205288;
        font-size: 1.18rem;
        text-align: center;
        font-weight: 600;
    }

    .modal-content label {
        font-size: .95rem;
        margin-bottom: 4px;
        color: #205288;
        font-weight: 500;
    }

    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        font-family: inherit;
        font-size: 1rem;
        border: 1px solid #c8d8ee;
        border-radius: 5px;
        padding: 7px 10px;
        margin-bottom: 10px;
        background: #f5f8fd;
        transition: border 0.2s;
    }

        .modal-content input:focus,
        .modal-content select:focus,
        .modal-content textarea:focus {
            border-color: #205288;
            outline: none;
        }

.modal-buttons {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
}


/* ---------- سایر استایل ها ---------- */
@media (max-width: 900px) {
    .service-form-box {
        max-width: 98vw;
        padding: 24px 3vw 17px;
    }
}

@media (max-width: 700px) {
    .service-form-box {
        padding: 13px 2vw 10px;
    }

    .form-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .submit-btn {
        width: 93px;
        height: 33px;
        font-size: 15px;
    }

    .btn-row {
        margin-top: 20px;
    }
}

@media (max-width: 600px) {
    .phone-row, .address-row {
        gap: 4px;
    }

    .add-phone-btn, .add-address-btn {
        font-size: 1.05rem;
        padding: 0.15em 0.5em;
        border-radius: 50%;
        min-width: 2.1em;
        min-height: 2.1em;
        box-shadow: none;
        margin-right: 2px;
    }

    .custom-select {
        padding: 12px 32px 12px 12px;
        font-size: 0.95rem;
    }
}

/* ---------- مالی ---------- */
.finance-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 36px 0 60px 0;
}

.finance-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 20px rgba(11,75,138,0.11);
    max-width: 900px;
    width: 92vw;
    padding: 32px 20px 28px 20px;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.finance-title {
    font-size: 23px;
    color: #0b4b8a;
    font-weight: bold;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

/* ---------- لاگین ---------- */
html, body {
    background: #dddddd;
}

.full-page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    /*width: 100vw;*/
    overflow: hidden;
}

.login-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(11,75,138,0.11);
    padding: 44px 38px 38px 38px;
    width: 410px;
    max-width: 95vw;
    margin: 0 10px;
}

.login-title {
    color: #0b4b8a;
    font-weight: bold;
    font-size: 28px;
    margin-bottom: 34px;
    text-align: center;
}

.toggle-group {
    display: flex;
    justify-content: center;
    margin-bottom: 34px;
    gap: 18px;
    flex-wrap: wrap;
}

.toggle-btn {
    border: 1.5px solid #0b4b8a;
    background: transparent;
    color: #0b4b8a;
    border-radius: 9px;
    padding: 9px 28px;
    font-size: 18px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.16s;
    min-width: 70px;
}

    .toggle-btn.active {
        background: #0b4b8a;
        color: #fff;
    }

.form-label {
    color: #0b4b8a;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-control {
    background: #f8fafb;
    border-radius: 9px;
    font-size: 17px;
    border: 1.1px solid #dddddd;
    padding: 14px 16px;
    margin-bottom: 25px;
}

.btn-login {
    width: 100%;
    background: #0b4b8a;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 9px;
    padding: 11px 0;
    margin-top: 14px;
    transition: background 0.17s;
}

    .btn-login:hover {
        background: #09386a;
    }

.disable {
    background-color: #999 !important;
    color: white !important;
    text-shadow: 1px 1px 1px #666;
    border: none;
    cursor: not-allowed !important;
}

.code-input-element {
    margin: 4px;
    border-bottom: 1px solid black;
    padding: 0px;
    width: 50px;
    height: 48px;
    background: transparent;
}

.react-code-input {
    direction: ltr;
}

button {
    margin-top: 20px;
}

.colored-corners {
    border: 1px solid;
    border-image: linear-gradient(to bottom right, #98971d, transparent, #98971d, transparent) 1;
}

@media (max-width: 659px) {
    .login-box {
        width: 98vw;
        max-width: 99vw;
        padding: 28px 8vw 18px 8vw;
    }

    .login-title {
        font-size: 21px;
        margin-bottom: 22px;
    }

    .toggle-group {
        margin-bottom: 22px;
        gap: 9px;
    }

    .toggle-btn {
        font-size: 15px;
        padding: 7px 14px;
    }

    .form-label, .form-control {
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    .login-box {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        padding: 13vw 4vw 9vw 4vw;
        box-shadow: none;
    }

    .toggle-btn {
        padding: 5px 4vw;
        min-width: 65px;
        border-radius: 7px;
        font-size: 13px;
    }

    .form-control {
        font-size: 14px;
        padding: 11px 8px;
    }

    .btn-login {
        font-size: 14px;
        padding: 8px 0;
    }
}

.One {
    width: 100% !important;
}

.two {
    width: 49% !important;
}

.three {
    width: 32% !important;
}
/* ---------- Navbar Base Styles ---------- */
.navbar-rtl {
    direction: rtl;
}

.navbar {
    background-color: #0b4b8a !important;
    min-height: 60px;
}

    /* ---------- Nav Links ---------- */
    .navbar .nav-link,
    .navbar .nav-link:visited {
        color: #dddddd !important;
        font-weight: 500;
        font-size: 1rem;
        transition: color 0.15s, border-bottom 0.15s, background 0.15s;
        border-bottom: 2.5px solid transparent;
        padding-bottom: 5px;
        margin-left: 0.65rem;
    }

        .navbar .nav-link:hover,
        .navbar .nav-link:focus {
            color: #fff !important;
            background-color: rgba(13,75,138,0.08);
            border-bottom: 2.5px solid #fff;
            text-decoration: none;
        }

        .navbar .nav-link.active,
        .navbar .nav-link[aria-current="page"] {
            color: #fff !important;
            font-weight: bold;
            border-bottom: 2.5px solid #fff;
        }

        /* ---------- Special Nav Item: Title ---------- */
        .navbar .nav-link.font-weight-bold {
            color: #fff !important;
            font-size: 1.15rem !important;
            font-weight: bold;
            cursor: default;
            background: transparent !important;
            border-bottom: none !important;
            margin-left: 32px;
        }

/* ---------- Profile Avatar ---------- */
.profile-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    margin-left: 6px;
    margin-right: 2px;
}

/* ---------- Navbar Layout ---------- */
.navbar-nav {
    flex-direction: row !important;
    justify-content: flex-start !important;
}

.nav-item {
    margin-left: 10px;
}

/* ---------- Toggler Button ---------- */
.navbar-toggler {
    border-color: #fff !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 767px) {
    .navbar-nav {
        flex-direction: column !important;
        align-items: flex-start;
    }

    .nav-item {
        margin-left: 0;
    }
}

.tracking-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 85vh;
    margin-top: 50px;
}

.tracking-box {
    width: 98%;
    max-width: 1000px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(11, 75, 138, 0.11);
    padding: 35px 32px 30px 32px;
    position: relative;
}

@media (max-width: 900px) {
    .tracking-box {
        max-width: 99vw;
    }
}


.tracking-title {
    font-size: 24px;
    color: #0b4b8a;
    font-weight: 700;
    letter-spacing: .5px;
    text-align: center;
    margin-bottom: 44px;
}

/* --- مرحله ها/Stepper --- */
.status-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 38px;
    direction: rtl;
    flex-wrap: wrap;
    gap: 1vw;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 85px;
    flex: 1 1 0;
    position: relative;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #cfd8e3;
    color: #5477b2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 5px;
    border: 2px solid #e0eaff;
    transition: background .18s;
}

/* مراحل انجام شده */
.step-done .step-circle {
    background: linear-gradient(135deg,#165ea8 70%,#235088 100%);
    color: #fff;
    border: 2px solid #125fad;
    box-shadow: 0 1px 4px #cbd2e8bb;
}

.step-done .step-title {
    color: #174d7c;
}

.step-active .step-circle {
    background: linear-gradient(135deg,#1a75c5 55%, #62b0fd 100%);
    color: #fff;
    border: 2px solid #156ae3;
    box-shadow: 0 2px 16px #84bafa44;
}

.step-active .step-title {
    color: #0b4b8a;
    font-weight: bold;
}

.step-upcoming .step-circle {
    background: #e7edf6;
    color: #abbad6;
    border: 2px solid #d3e0f3;
}

.step-upcoming .step-title {
    color: #aaa;
}

.step-title {
    font-size: 13px;
    text-align: center;
    line-height: 1.66;
    min-width: 60px;
    font-weight: 500;
    margin-top: 3px;
}

/* خطوط بین دایره‌ها */
.step-item:not(:last-child)::after {
    content: "";
    display: block;
    position: absolute;
    top: 20px;
    right: 46%;
    width: 105%;
    height: 3.5px;
    z-index: -1;
    background: #e4eefd;
}

.step-done:not(:last-child)::after {
    background: linear-gradient(90deg,#165ea8 50%,#82aaff 100%);
}

.step-active:not(:last-child)::after {
    background: linear-gradient(90deg,#1a75c5 50%,#e4eefd 100%);
}

/* --- جدول سفارش‌ها --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    direction: rtl;
    background: #fff;
    font-size: 15px;
    box-shadow: 0 2px 12px #e2eafc44;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    text-align: center;
    padding: 11px 6px;
}

thead th {
    background: #e7edf6;
    color: #0b4b8a;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 1.8px solid #c2cee6;
}

tbody td {
    background: #f9fbfe;
    border-bottom: 1.2px solid #e9edfb;
    color: #205288;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* دکمه های جدول */
.table-btn {
    background: #0b4b8a;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 17px;
    cursor: pointer;
    min-width: 80px;
    box-shadow: 0 2px 7px #b3c6ee19;
    transition: background .14s;
}

    .table-btn:disabled {
        background: #b8c8de;
        color: #fff;
        cursor: not-allowed;
        box-shadow: none;
    }

    .table-btn.comment-btn {
        background: linear-gradient(90deg,#156ae3 80%,#196a99 100%);
        color: #fff;
    }

        .table-btn.comment-btn:hover {
            background: #09386a;
        }

    .table-btn:hover:not(:disabled) {
        background: #10529a;
    }

/* --- باکس ثبت نظر --- */
.comment-form-bottom {
    position: fixed;
    bottom: 22px;
    right: 12px;
    left: 12px;
    z-index: 80;
    max-width: 440px;
    margin: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 34px #23508825, 0 1px 1px #e2eafd85;
    border: 1.5px solid #d9e6f8;
    padding: 22px 18px 17px 18px;
    display: none;
    flex-direction: column;
    gap: 13px;
    animation: popform .28s cubic-bezier(.36,2.05,.54,.99);
}

@keyframes popform {
    0% {
        transform: translateY(30px) scale(0.85);
        opacity: 0;
    }

    100% {
        transform: none;
        opacity: 1;
    }
}

.comment-form-bottom label {
    font-weight: bold;
    color: #205288;
    font-size: 1.01rem;
    margin-bottom: 3px;
}

.order-info {
    color: #777;
    font-size: 0.98rem;
    margin-bottom: 3px;
}

.close-comment-form {
    position: absolute;
    left: 12px;
    top: 7px;
    border: none;
    background: #e8ecf7;
    color: #215;
    font-size: 22px;
    border-radius: 7px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: background .13s;
    box-shadow: 0 1px 4px #eee;
}

    .close-comment-form:hover {
        background: #e74c3c;
        color: #fff;
    }

#commentTextarea {
    width: 100%;
    border-radius: 8px;
    border: 1.2px solid #cdd8ea;
    background: #f4f8fb;
    padding: 10px 12px;
    font-size: 15px;
    min-height: 73px;
    resize: vertical;
}

.comment-form-actions {
    text-align: left;
}

.comment-submit-btn {
    background: #1976d2;
    color: #fff;
    border-radius: 7px;
    padding: 7px 22px 7px 22px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 10px #bcd6f622;
    transition: background .15s;
}

    .comment-submit-btn:hover {
        background: #144980;
    }

/* --- رسپانسیو --- */
@media (max-width: 700px) {
    .tracking-box {
        padding: 16px 3vw 13px 3vw;
        max-width: 99vw;
    }

    .comment-form-bottom {
        max-width: 99vw;
        right: 3vw;
        left: 3vw;
        padding: 14px 2vw 12px 2vw;
    }

    table,
    thead,
    tbody, th, td, tr {
        font-size: 12px !important;
    }

    .status-steps {
        gap: 2vw;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }
}
