﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --app-bg: #eef3fb;
    --app-surface: rgba(255, 255, 255, 0.9);
    --app-surface-strong: #ffffff;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-primary: #0f766e;
    --app-primary-strong: #0b5f58;
    --app-secondary: #0ea5e9;
    --app-success: #16a34a;
    --app-warning: #d97706;
    --app-danger: #dc2626;
    --app-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --app-radius-lg: 1.1rem;
    --app-radius-md: 0.85rem;
    --app-radius-sm: 0.6rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    color: var(--app-text);
    background:
        radial-gradient(circle at 15% 10%, rgba(14, 165, 233, 0.2), transparent 35%),
        radial-gradient(circle at 85% 10%, rgba(15, 118, 110, 0.18), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 40%, #e7edf7 100%);
    line-height: 1.5;
}

a {
    color: var(--app-primary);
    text-decoration: none;
}

a:hover {
    color: var(--app-primary-strong);
}

.container,
.container-fluid {
    position: relative;
    z-index: 1;
}

.container-fluid {
    max-width: 1320px;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-layout .sidebar {
    width: 280px;
    border: 0;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(175deg, #0f172a 0%, #0b2848 40%, #0a4e6e 100%);
    color: #e2e8f0;
}

.app-layout .sidebar .navbar-brand-custom {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.2px;
}

.app-layout .sidebar hr {
    border-color: rgba(255, 255, 255, 0.14);
}

.app-layout .sidebar .nav-link {
    margin-bottom: 0.35rem;
    border-radius: 0.8rem;
    color: rgba(226, 232, 240, 0.76);
    font-weight: 700;
    transition: all 0.2s ease;
}

.app-layout .sidebar .nav-link:hover,
.app-layout .sidebar .nav-link:focus {
    color: #fff;
    background: rgba(14, 165, 233, 0.2);
}

.app-layout .sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.38), rgba(15, 118, 110, 0.4));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.app-layout .sidebar .dropdown-toggle strong {
    font-size: 0.95rem;
}

.app-layout .content {
    flex: 1;
    padding: 1.5rem;
}

.app-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.app-mobile-bar .btn {
    border-radius: 0.85rem;
    font-weight: 700;
}

.card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card .card-header {
    border-bottom: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.card .card-body,
.card .card-footer {
    background: transparent;
}

.shadow,
.shadow-sm,
.shadow-lg {
    box-shadow: var(--app-shadow) !important;
}

.border-left-primary {
    border-inline-start: 0.35rem solid #0284c7 !important;
}

.border-left-success {
    border-inline-start: 0.35rem solid var(--app-success) !important;
}

.border-left-info {
    border-inline-start: 0.35rem solid var(--app-secondary) !important;
}

.border-left-warning {
    border-inline-start: 0.35rem solid var(--app-warning) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #0b1f38;
    font-weight: 800;
}

.text-gray-800 {
    color: #132238 !important;
}

.text-gray-300 {
    color: #9aa6b8 !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

.font-weight-bold {
    font-weight: 800 !important;
}

.form-label {
    margin-bottom: 0.45rem;
    font-weight: 700;
    color: #16324f;
}

.form-control,
.form-select,
textarea.form-control {
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: var(--app-radius-md);
    min-height: 46px;
    background: #fff;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    border-color: rgba(15, 118, 110, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.12);
}

textarea.form-control {
    min-height: 110px;
}

.input-group > .btn,
.input-group > .form-control,
.input-group > .form-select {
    border-radius: var(--app-radius-md);
}

.btn {
    border-radius: 0.8rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--app-primary), #0d9488);
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #0d6962, #0b7f76) !important;
    border-color: transparent !important;
}

.btn-info {
    color: #fff;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-color: transparent;
}

.btn-success {
    background: linear-gradient(135deg, #15803d, #16a34a);
    border-color: transparent;
}

.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, #ea580c, #d97706);
    border-color: transparent;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: transparent;
}

.btn-outline-primary {
    border-color: rgba(14, 116, 144, 0.35);
    color: #0f5f8d;
}

.btn-outline-primary:hover {
    background: #0f5f8d;
    color: #fff;
}

.table-responsive {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: #fff;
    overflow: auto;
}

.table {
    margin-bottom: 0;
    min-width: 680px;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 0.82rem 0.78rem;
    border-color: rgba(15, 23, 42, 0.08);
}

.table thead th {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.06));
    color: #1e3554;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: rgba(14, 165, 233, 0.055);
}

.badge {
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.45em 0.72em;
}

.alert {
    border: 0;
    border-radius: var(--app-radius-md);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.modal-content {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
}

.modal-header,
.modal-footer {
    border-color: rgba(15, 23, 42, 0.09);
}

.offcanvas {
    border: 0;
    background: #f8fbff;
}

.pagination .page-link {
    border-radius: 0.65rem;
    margin: 0 0.18rem;
    border-color: rgba(15, 23, 42, 0.12);
    color: #1e3a5f;
}

.pagination .page-item.active .page-link {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.page-link:hover {
    color: #fff;
    background: #0f5d78;
    border-color: #0f5d78;
}

.chart-area {
    position: relative;
    min-height: 320px;
}

.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.6rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.qr-preview-image {
    max-width: 250px;
}

.select-col {
    width: 72px;
}

.action-form-inline {
    display: inline-block;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.25rem;
}

.login-container,
.register-container {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 1.6rem;
    border: 1px solid var(--app-border);
    border-radius: 1.1rem;
    background: var(--app-surface-strong);
    box-shadow: var(--app-shadow);
}

.login-container h3,
.register-container h3 {
    font-size: clamp(1.35rem, 1.4vw, 1.75rem);
}

.public-navbar {
    border-bottom: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.public-navbar .navbar-brand {
    font-size: 1.15rem;
    color: #0d3b66;
}

.footer {
    margin-top: 3rem;
    background: #0f172a;
    color: #d1deef;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.customer-portal-hero {
    max-width: 680px;
    margin: 4rem auto;
    padding: 2rem;
    border-radius: 1.1rem;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--app-shadow);
}

.product-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.16);
}

.product-card img {
    height: 220px;
    object-fit: cover;
    background: #f1f5f9;
}

.customer-store-hero {
    margin-top: 0.5rem;
}

.cart-fab {
    position: fixed;
    bottom: 1.25rem;
    left: 1rem;
    z-index: 1040;
    border-radius: 999px;
    padding: 0.74rem 1.08rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}

.cart-item-controls .btn {
    width: 34px;
    height: 34px;
    padding: 0;
}

.offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--app-border);
}

.offcanvas .offcanvas-title {
    font-weight: 800;
}

#checkoutSummary ul {
    padding-inline-start: 1.1rem;
    margin-bottom: 0.6rem;
}

@media (min-width: 992px) {
    .app-layout .sidebar.offcanvas-lg {
        position: sticky;
        top: 0;
        height: 100vh;
        transform: none;
        visibility: visible;
    }

    .app-layout .sidebar .offcanvas-header {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-layout {
        display: block;
    }

    .app-layout .content {
        padding: 1rem;
    }

    .app-layout .sidebar {
        width: min(82vw, 330px);
    }

    .table {
        min-width: 620px;
    }

    .card .card-header h6,
    .card .card-header .h6 {
        font-size: 0.92rem;
    }

    .chart-area {
        min-height: 260px;
    }

    .cart-fab {
        left: 0.8rem;
        bottom: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .container,
    .container-fluid {
        padding-inline: 0.78rem;
    }

    .h3,
    h1.h3 {
        font-size: 1.2rem;
    }

    .login-container,
    .register-container,
    .customer-portal-hero {
        padding: 1.2rem;
    }

    .btn {
        padding: 0.56rem 0.82rem;
        font-size: 0.9rem;
    }

    .table {
        font-size: 0.87rem;
    }

    .product-card img {
        height: 185px;
    }

    .table-responsive {
        border-radius: 0.72rem;
    }

    .card {
        border-radius: 0.92rem;
    }
}

@media (max-width: 575.98px) {
    .app-layout .content {
        padding: 0.8rem;
    }

    .card .card-body,
    .card .card-header,
    .card .card-footer {
        padding-inline: 0.85rem;
    }

    .input-group.input-group-lg > .form-control,
    .input-group.input-group-lg > .form-select,
    .input-group.input-group-lg > .btn {
        font-size: 0.92rem;
    }

    .customer-portal-hero {
        margin-top: 2.2rem;
    }

    .cart-fab {
        right: 0.8rem;
        left: 0.8rem;
        width: auto;
        display: inline-flex;
        justify-content: center;
    }
}
