:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3ff;
    --text: #172235;
    --text-muted: #5f6f89;
    --primary: #0f4c81;
    --primary-2: #1670bf;
    --accent: #f39b31;
    --danger: #d23a45;
    --ring: rgba(22, 112, 191, 0.18);
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 8px 22px rgba(23, 34, 53, 0.06);
    --shadow: 0 14px 32px rgba(23, 34, 53, 0.11);
    --container: 1200px;
    --anim-fast: 180ms ease;
    --anim-medium: 280ms ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    direction: rtl;
    background: radial-gradient(circle at 0% 0%, #eaf2ff 0%, var(--bg) 38%, #f5f8ff 100%);
    color: var(--text);
    font-family: 'Cairo', 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: pageFadeIn 0.45s ease;
}

.site-main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.site-main> :last-child {
    margin-bottom: 0;
}

.site-main>main,
.site-main>section,
.site-main .container,
.site-main .form-container,
.site-main .panel-section,
.site-main .maintenance-section,
.site-main .order-page-wrap {
    width: min(var(--container), calc(100% - 2rem));
    margin-inline: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--anim-fast), opacity var(--anim-fast), transform var(--anim-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    margin: 0.8rem auto 0;
    width: min(calc(100% - 1.2rem), var(--container));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(15, 76, 129, 0.11);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1.1rem;
    transition: box-shadow var(--anim-medium), transform var(--anim-medium), background-color var(--anim-medium);
}

.site-header:hover {
    box-shadow: 0 14px 30px rgba(23, 34, 53, 0.12);
}

.img-and-text-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: fit-content;
}

.img-and-text-header p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--primary);
}

.header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    width: 100%;
}

.outher-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.outher-header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    transition: all var(--anim-fast);
}

.outher-header a:hover,
.outher-header a.active-link {
    color: var(--primary);
    background: var(--surface-soft);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-user-name {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.Emergency-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), #f6b668);
    color: #fff;
    font-size: 0.93rem;
    font-weight: 800;
    letter-spacing: 0.1px;
    box-shadow: 0 8px 16px rgba(243, 155, 49, 0.28);
    transition: transform var(--anim-fast), box-shadow var(--anim-fast), filter var(--anim-fast);
}

.Emergency-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(243, 155, 49, 0.34);
    filter: brightness(1.03);
}

.header-auth-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 8px 16px rgba(15, 76, 129, 0.28);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(15, 76, 129, 0.2);
    background: #fff;
    cursor: pointer;
    padding: 10px 8px;
    gap: 5px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

.flash-message {
    width: min(var(--container), calc(100% - 2rem));
    margin: 1rem auto;
    animation: slideInDown 0.36s ease;
}

input,
select,
textarea,
button {
    font-family: inherit;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d6dfeb;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 0.96rem;
    padding: 0.65rem 0.8rem;
    transition: border-color var(--anim-fast), box-shadow var(--anim-fast), transform var(--anim-fast);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #bdd0e8;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-2);
    box-shadow: 0 0 0 4px var(--ring);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: #354560;
    font-weight: 700;
}

button,
.primary-submit-btn,
.button-add-part,
.part-order-link,
.create-request-btn {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--anim-fast), box-shadow var(--anim-fast), opacity var(--anim-fast), filter var(--anim-fast);
}

button:hover,
.primary-submit-btn:hover,
.button-add-part:hover,
.part-order-link:hover,
.create-request-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.24);
}

button:disabled,
.button-add-part:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.container,
.requests-cards,
.test2,
.test3-div,
.icon-marketing {
    gap: 1rem;
}

.card,
.test-border,
.request-card,
.order-panel,
.maintenance-section,
.panel-section,
.search-container,
.form-container,
.login-container {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid #e4ebf4;
    box-shadow: var(--shadow-sm);
}

.site-footer,
footer {
    width: 100%;
    margin-top: auto;
    background: linear-gradient(160deg, #0a1424 0%, #102138 100%);
    color: #f3f6fb;
    padding: 2.1rem 1rem;
}

.site-footer-inner {
    width: min(1200px, calc(100% - 1rem));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(250px, 1.4fr) repeat(3, minmax(170px, 1fr));
    gap: 1.2rem;
    align-items: start;
    text-align: right;
}

.footer-col,
.footer1,
.test-footer {
    min-width: 0;
}

.footer11 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
}

.footer-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer-text {
    margin: 0;
    line-height: 1.8;
}

.footer-col a,
.footer-col p {
    color: rgba(243, 246, 251, 0.82);
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.footer-list a,
.footer-contact-item {
    display: inline-block;
    line-height: 1.75;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-list a:hover,
.footer-contact-item:hover {
    color: #ffffff;
    transform: translateX(-2px);
}

.links {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0.9rem;
}

.links a {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.links a:nth-child(1) {
    background: linear-gradient(135deg, #1877f2, #0f5fd4);
    border-color: rgba(24, 119, 242, 0.8);
}

.links a:nth-child(2) {
    background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
    border-color: rgba(245, 133, 41, 0.7);
}

.links a:nth-child(3) {
    background: linear-gradient(135deg, #0a66c2, #004182);
    border-color: rgba(10, 102, 194, 0.75);
}

.links a:nth-child(4) {
    background: linear-gradient(135deg, #111111, #1f1f1f);
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

.footer-img:hover {
    transform: translateY(-2px) scale(1.05);
}

.footer-img1 {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #f39b31, #f6b668);
    box-shadow: 0 6px 14px rgba(243, 155, 49, 0.3);
}

.footer-contact-item {
    margin: 0;
    line-height: 1.8;
    color: rgba(243, 246, 251, 0.9);
    word-break: break-word;
}

/* Mobile */
@media (max-width: 576px) {
    .site-header {
        width: calc(100% - 0.7rem);
        margin-top: 0.35rem;
        padding: 0.65rem 0.75rem;
        border-radius: 14px;
        flex-wrap: wrap;
    }

    .img-and-text-header p {
        font-size: 0.96rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .header-shell {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border-top: 1px solid #ebf0f8;
        padding-top: 0.7rem;
        margin-top: 0.4rem;
    }

    .header-shell.is-open {
        display: flex;
    }

    .outher-header {
        width: 100%;
        flex-direction: column;
    }

    .outher-header a {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-user-name {
        width: 100%;
        order: 3;
    }

    .site-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.1rem;
    }

    .footer11,
    .links {
        justify-content: center;
    }

    .footer-list a,
    .footer-contact-item {
        width: 100%;
    }

    .site-main {
        padding-bottom: 0.75rem;
    }
}

/* Tablet */
@media (min-width: 577px) and (max-width: 768px) {
    .site-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Laptop */
@media (min-width: 769px) and (max-width: 992px) {
    .site-header {
        width: min(calc(100% - 1rem), var(--container));
    }

    .header-shell {
        gap: 0.7rem;
    }

    .outher-header {
        gap: 0.2rem;
    }

    .site-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop */
@media (min-width: 1200px) {
    body {
        font-size: 16px;
    }

    .site-header {
        padding-inline: 1.25rem;
    }
}