/* =========================================================
   FiberFlow
   الملف: assets/css/style.css

   تنسيق الموقع العام + لوحة الإدارة
   Responsive / Mobile First
   ========================================================= */


/* =========================================================
   Reset + Variables
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #0b4f6c;
    --primary-dark: #083d56;
    --primary-light: #087e8b;

    --accent: #f4b942;

    --bg: #f5f7fa;
    --bg-soft: #eef4f7;

    --white: #ffffff;

    --text: #17212b;
    --muted: #667085;

    --border: #e4e7ec;

    --success: #1f9d55;
    --warning: #c98a00;
    --danger: #c0392b;

    --sidebar-width: 260px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --shadow-sm:
        0 4px 14px rgba(16, 24, 40, .05);

    --shadow-md:
        0 10px 30px rgba(16, 24, 40, .08);

    --transition:
        .2s ease;
}


/* =========================================================
   Base
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    background: var(--bg);

    color: var(--text);

    line-height: 1.8;
}

body,
input,
select,
textarea,
button {
    font-family:
        Tahoma,
        Arial,
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;

    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    padding-right: 20px;
}

.container {
    width: min(
        1180px,
        calc(100% - 32px)
    );

    margin-right: auto;
    margin-left: auto;
}


/* =========================================================
   Header
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: rgba(255, 255, 255, .97);

    border-bottom: 1px solid var(--border);

    box-shadow:
        0 2px 8px rgba(16, 24, 40, .03);
}

.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* =========================================================
   Brand
   ========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 11px;

    flex-shrink: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-light)
        );

    color: var(--white);

    font-size: 24px;
    font-weight: 700;

    box-shadow:
        0 5px 16px rgba(11, 79, 108, .2);
}

.brand-text {
    display: block;
}

.brand strong {
    display: block;

    color: var(--primary-dark);

    font-size: 19px;

    line-height: 1.3;
}

.brand small {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   Top Navigation
   ========================================================= */

.top-nav {
    display: flex;
    align-items: center;

    gap: 18px;
}

.top-nav > a:not(.btn) {
    position: relative;

    padding: 22px 0;

    color: #344054;

    font-size: 14px;

    transition: color var(--transition);
}

.top-nav > a:not(.btn):hover {
    color: var(--primary-light);
}

.top-nav > a:not(.btn)::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: 16px;

    width: 0;
    height: 2px;

    background: var(--primary-light);

    transition: width var(--transition);
}

.top-nav > a:not(.btn):hover::after {
    width: 100%;
}


/* =========================================================
   Buttons
   ========================================================= */

.btn {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 18px;

    border: 0;
    border-radius: 10px;

    background: var(--primary);

    color: var(--white);

    font-size: 14px;
    font-weight: 700;

    transition:
        background var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.btn:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(11, 79, 108, .18);
}

.btn-small {
    min-height: 38px;

    padding: 6px 14px;

    font-size: 13px;
}

.btn-outline {
    background: transparent;

    border: 1px solid rgba(255, 255, 255, .75);

    color: #fff;
}

.btn-outline:hover {
    background:
        rgba(255, 255, 255, .12);
}

.btn-light {
    background: var(--bg-soft);

    color: var(--primary);
}

.btn-light:hover {
    background: #dceaf0;

    color: var(--primary-dark);
}

.employee-login {
    white-space: nowrap;
}


/* =========================================================
   Menu Buttons
   ========================================================= */

.menu-toggle,
.sidebar-toggle {
    width: 42px;
    height: 42px;

    display: none;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 10px;

    background: var(--primary);

    color: var(--white);

    font-size: 22px;

    line-height: 1;
}


/* =========================================================
   Hero Slider
   ========================================================= */

.hero-slider {
    position: relative;

    min-height: 540px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            var(--primary-light)
        );

    color: var(--white);
}

.hero-slider::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    left: -180px;
    top: -160px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .04);
}

.hero-slider::after {
    content: "";

    position: absolute;

    width: 440px;
    height: 440px;

    right: -160px;
    bottom: -230px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .045);
}

.hero-slide {
    position: relative;
    z-index: 2;

    min-height: 540px;

    display: none;
    align-items: center;
}

.hero-slide.active {
    display: flex;
}

.hero-content {
    padding-top: 80px;
    padding-bottom: 80px;
}

.eyebrow {
    display: inline-block;

    color: var(--primary-light);

    font-size: 13px;
    font-weight: 700;

    letter-spacing: .2px;
}

.hero-slider .eyebrow {
    color: #b8f0ef;
}

.hero-content h1,
.hero-content h2 {
    max-width: 880px;

    margin-top: 12px;
    margin-bottom: 18px;

    font-size:
        clamp(
            34px,
            6vw,
            66px
        );

    line-height: 1.25;
}

.hero-content p {
    max-width: 760px;

    margin: 0;

    color: #e6f4f5;

    font-size: 18px;

    line-height: 2;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 26px;
}

.hero-dots {
    position: absolute;
    z-index: 4;

    bottom: 24px;
    left: 50%;

    display: flex;

    gap: 8px;

    transform:
        translateX(-50%);
}

.hero-dots button {
    width: 12px;
    height: 12px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background:
        rgba(255, 255, 255, .38);

    transition:
        transform var(--transition),
        background var(--transition);
}

.hero-dots button.active {
    background: #fff;

    transform: scale(1.15);
}


/* =========================================================
   Sections
   ========================================================= */

.section {
    padding-top: 72px;
    padding-bottom: 72px;
}

.section-alt {
    background: var(--white);
}

.section-heading {
    max-width: 780px;

    margin-bottom: 30px;
}

.section-heading > span {
    color: var(--primary-light);

    font-size: 13px;
    font-weight: 700;
}

.section-heading h2 {
    margin-top: 6px;
    margin-bottom: 10px;

    color: var(--primary-dark);

    font-size: 34px;

    line-height: 1.4;
}

.section-heading p {
    margin: 0;

    color: var(--muted);
}


/* =========================================================
   Cards
   ========================================================= */

.cards {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.card {
    padding: 24px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-md);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 8px;

    color: var(--primary-dark);
}

.card p {
    margin: 0;

    color: var(--muted);
}


/* =========================================================
   Login Page
   ========================================================= */

.auth-page {
    min-height:
        calc(100vh - 160px);

    display: grid;
    place-items: center;

    padding: 42px 16px;
}

.auth-card {
    width: min(
        520px,
        100%
    );

    padding: 30px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    margin-top: 6px;
    margin-bottom: 8px;

    color: var(--primary-dark);
}

.muted {
    color: var(--muted);
}

.hint {
    margin-top: 18px;

    padding: 12px 14px;

    border-radius: var(--radius-md);

    background: var(--bg-soft);

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   Forms
   ========================================================= */

.form-grid {
    display: grid;

    gap: 16px;

    margin-top: 20px;
}

label {
    display: grid;

    gap: 6px;

    color: #344054;

    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;

    min-height: 46px;

    padding: 10px 12px;

    border: 1px solid var(--border);
    border-radius: 10px;

    outline: none;

    background: var(--white);

    color: var(--text);

    transition:
        border var(--transition),
        box-shadow var(--transition);
}

textarea {
    min-height: 120px;

    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-light);

    box-shadow:
        0 0 0 3px rgba(8, 126, 139, .1);
}


/* =========================================================
   App Shell
   ========================================================= */

.app-shell {
    min-height: 100vh;

    display: flex;

    background: var(--bg);
}

.app-main {
    min-width: 0;

    flex: 1;
}


/* =========================================================
   Sidebar
   ========================================================= */

.sidebar {
    width: var(--sidebar-width);

    flex:
        0 0 var(--sidebar-width);

    min-height: 100vh;

    padding: 18px 12px;

    background: #102a3a;

    color: var(--white);
}

.sidebar-title {
    padding:
        10px 12px
        16px;

    color: #9fc6d6;

    font-size: 13px;
}

.sidebar a {
    display: block;

    margin-bottom: 4px;

    padding: 11px 12px;

    border-radius: 9px;

    color: #e8f1f5;

    font-size: 14px;

    transition:
        background var(--transition),
        color var(--transition);
}

.sidebar a:hover {
    background:
        rgba(255, 255, 255, .08);

    color: var(--white);
}


/* =========================================================
   App Topbar
   ========================================================= */

.app-topbar {
    min-height: 64px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 10px 18px;

    background: var(--white);

    border-bottom: 1px solid var(--border);
}

.app-topbar > div {
    flex: 1;
}

.app-topbar strong {
    display: block;

    color: var(--primary-dark);
}

.app-topbar small {
    display: block;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   App Content
   ========================================================= */

.page-card {
    margin: 20px;

    padding: 26px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}

.page-card h1 {
    margin-top: 4px;
    margin-bottom: 8px;

    color: var(--primary-dark);

    font-size: 30px;
}

.page-card p {
    color: var(--muted);
}


/* =========================================================
   Under Construction
   ========================================================= */

.under-construction {
    margin-top: 22px;

    padding: 16px;

    border: 1px solid #f1d58a;
    border-radius: var(--radius-md);

    background: #fff9e9;

    color: #795d0a;
}


/* =========================================================
   Dashboard Stats
   ========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-top: 24px;
}

.stat-card {
    padding: 20px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}

.stat-card small {
    display: block;

    color: var(--muted);

    font-size: 12px;
}

.stat-card strong {
    display: block;

    margin-top: 6px;

    color: var(--primary-dark);

    font-size: 30px;
}


/* =========================================================
   Tables - للصفحات القادمة
   ========================================================= */

.table-responsive {
    width: 100%;

    overflow-x: auto;

    border:
        1px solid var(--border);

    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;

    min-width: 700px;

    border-collapse: collapse;

    background: var(--white);
}

.data-table th,
.data-table td {
    padding: 12px 14px;

    border-bottom:
        1px solid var(--border);

    text-align: right;

    vertical-align: middle;
}

.data-table th {
    background: #f8fafc;

    color: #344054;

    font-size: 13px;
}

.data-table td {
    color: #475467;

    font-size: 13px;
}

.data-table tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   Badges - للصفحات القادمة
   ========================================================= */

.badge {
    display: inline-flex;

    align-items: center;

    padding: 4px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
}

.badge-success {
    background: #e9f8ef;

    color: #19743e;
}

.badge-warning {
    background: #fff5d9;

    color: #916600;
}

.badge-danger {
    background: #fdecea;

    color: #a83228;
}

.badge-info {
    background: #e9f4f7;

    color: var(--primary);
}


/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    margin-top: 50px;

    background: #102a3a;

    color: #dbe8ee;
}

.footer-grid {
    display: grid;

    grid-template-columns:
        2fr 1fr 1.4fr 1.3fr;

    gap: 35px;

    padding-top: 48px;
    padding-bottom: 48px;
}

.footer-column {
    min-width: 0;
}

.footer-title {
    margin-top: 0;
    margin-bottom: 16px;

    color: var(--white);

    font-size: 18px;
}

.footer-text {
    margin: 0 0 12px;

    color: #c7d6dd;

    font-size: 14px;

    line-height: 2;
}

.footer-note {
    margin-top: 12px;

    color: #8faab7;

    font-size: 13px;
}

.footer-links {
    margin: 0;
    padding: 0;

    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    display: inline-block;

    color: #dbe8ee;

    font-size: 14px;

    transition:
        color var(--transition),
        transform var(--transition);
}

.footer-links a:hover {
    color: var(--white);

    transform: translateX(-3px);
}

.footer-contact-item {
    display: flex;
    flex-direction: column;

    margin-bottom: 12px;
}

.footer-contact-item strong {
    margin-bottom: 2px;

    color: var(--white);

    font-size: 13px;
}

.footer-contact-item span {
    color: #b8cad2;

    font-size: 13px;
}

.footer-login-btn {
    margin-top: 8px;
}

.footer-bottom {
    border-top:
        1px solid rgba(255, 255, 255, .10);
}

.footer-bottom-inner {
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    color: #91aab5;

    font-size: 13px;
}


/* =========================================================
   Utilities
   ========================================================= */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1000px) {

    .footer-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   Mobile / Tablet Navigation
   ========================================================= */

@media (max-width: 900px) {

    .menu-toggle,
    .sidebar-toggle {
        display: grid;
    }

    .top-nav {
        position: absolute;

        top: 72px;
        right: 16px;
        left: 16px;

        display: none;

        flex-direction: column;
        align-items: stretch;

        gap: 3px;

        padding: 12px;

        background: var(--white);

        border:
            1px solid var(--border);

        border-radius: var(--radius-md);

        box-shadow: var(--shadow-md);
    }

    .top-nav.open {
        display: flex;
    }

    .top-nav > a:not(.btn) {
        padding: 10px 12px;

        border-radius: 8px;
    }

    .top-nav > a:not(.btn)::after {
        display: none;
    }

    .top-nav > a:not(.btn):hover {
        background: var(--bg-soft);
    }

    .top-nav .btn {
        width: 100%;

        margin-top: 5px;
    }


    /* Sidebar */

    .sidebar {
        position: fixed;

        z-index: 1500;

        top: 0;
        right: -280px;
        bottom: 0;

        width: var(--sidebar-width);

        min-height: 100vh;

        transition:
            right .25s ease;

        box-shadow:
            -10px 0 30px rgba(0, 0, 0, .15);
    }

    .sidebar.open {
        right: 0;
    }

    .app-main {
        width: 100%;
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .container {
        width:
            min(
                100% - 22px,
                1180px
            );
    }


    /* Header */

    .header-inner {
        min-height: 66px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;

        border-radius: 11px;

        font-size: 21px;
    }

    .brand strong {
        font-size: 16px;
    }

    .brand small {
        display: none;
    }

    .top-nav {
        top: 66px;

        right: 11px;
        left: 11px;
    }


    /* Hero */

    .hero-slider,
    .hero-slide {
        min-height: 500px;
    }

    .hero-content {
        padding-top: 58px;
        padding-bottom: 72px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;

        line-height: 1.9;
    }

    .hero-actions {
        flex-direction: column;

        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }


    /* Sections */

    .section {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .cards {
        grid-template-columns: 1fr;
    }


    /* Login */

    .auth-page {
        padding: 25px 11px;
    }

    .auth-card {
        padding: 22px 17px;

        border-radius: 14px;
    }


    /* App */

    .app-topbar {
        min-height: 60px;

        padding:
            9px 12px;
    }

    .app-topbar .btn {
        padding-right: 10px;
        padding-left: 10px;

        font-size: 11px;
    }

    .page-card {
        margin: 12px;

        padding: 18px;

        border-radius: 14px;
    }

    .page-card h1 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .stat-card {
        padding: 17px;
    }


    /* Footer */

    .site-footer {
        margin-top: 35px;
    }

    .footer-grid {
        grid-template-columns: 1fr;

        gap: 28px;

        padding-top: 34px;
        padding-bottom: 34px;
    }

    .footer-column {
        text-align: right;
    }

    .footer-bottom-inner {
        flex-direction: column;

        justify-content: center;

        gap: 5px;

        padding-top: 14px;
        padding-bottom: 14px;

        text-align: center;
    }

}


/* =========================================================
   Very Small Mobile
   ========================================================= */

@media (max-width: 380px) {

    .hero-content h1,
    .hero-content h2 {
        font-size: 31px;
    }

    .page-card {
        margin: 8px;

        padding: 15px;
    }

    .app-topbar strong {
        font-size: 13px;
    }

}