/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* Color Palette - Formal Corporate (Light & Navy) */
    --primary-color: #ffffff;
    --secondary-color: #f1f5f9;
    --accent-color: #0f172a;
    --accent-glow: rgba(15, 23, 42, 0.15);
    --gold-accent: #0ea5e9;

    --text-light: #1e293b;
    --text-dim: #64748b;

    --success-color: #10B981;
    --danger-color: #EF4444;

    /* Spacing */
    --section-padding: 6rem 1rem;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    direction: inherit;
}

.container,
.btn,
.card,
.logo-img,
.nav-links,
.dropdown,
.dropdown-menu,
.dropdown-item,
.hero,
.hero-content,
.hero-title,
.hero-description,
.hero-btns,
.hero-visual,
.shield-container {
    direction: inherit;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #0EA5E9);
    color: var(--primary-color);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover,
.btn-outline.active {
    background: var(--accent-color);
    color: #fff;
}

/* Header & Nav */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: flex-start;
    /* Align items to the start (Right in RTL) */
    align-items: center;
    padding: 15px 0;
    gap: 40px;
    /* Space between logo and nav links */
}

/* Admin Nav */
.admin-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-nav {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 24px;
    padding: 12px 0;
    flex-wrap: nowrap;
}

.admin-nav-links {
    display: flex;
    list-style: none;
    gap: 18px;
    align-items: center;
    margin: 0;
    padding: 0 0 0 24px;
    flex-wrap: nowrap;
    border-right: 2px solid #dc2626;
    white-space: nowrap;
}

.admin-nav-links a {
    font-weight: 700;
}

.admin-nav-links .logout-link {
    color: var(--danger-color);
}

.logo-img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}

/* Hover Effect: Red Line Animation */
.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
    /* Keep color constant */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--danger-color);
    /* Red Line */
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* === Language-based navbar direction === */
/* Arabic: Logo right, nav items right-to-left */
body.lang-ar header nav {
    flex-direction: row;
    justify-content: flex-start !important;
}

body.lang-ar .nav-links {
    flex-direction: row;
    direction: rtl;
}

body.lang-ar .nav-links a::after {
    right: 0;
    left: auto;
}

/* English: Logo left, nav items left-to-right */
body.lang-en header nav {
    flex-direction: row-reverse;
    justify-content: flex-start !important;
}

body.lang-en .nav-links {
    flex-direction: row;
    direction: ltr;
}

body.lang-en .nav-links a::after {
    left: 0;
    right: auto;
}

body.lang-ar .dropdown-menu {
    right: 0;
    left: auto;
}

body.lang-en .dropdown-menu {
    left: 0;
    right: auto;
}

/* Logo section spacing per language */
body.lang-ar .logo-section {
    padding-left: 25px;
    border-left: 1px solid #e2e8f0;
    margin-left: 25px;
    padding-right: 0;
    border-right: none;
    margin-right: 0;
}

body.lang-en .logo-section {
    padding-right: 25px;
    border-right: 1px solid #e2e8f0;
    margin-right: 25px;
    padding-left: 0;
    border-left: none;
    margin-left: 0;
}

/* ============================================ */
/* === Content Direction Based on Language === */
/* ============================================ */

/* Arabic (RTL) - Default styling */
body.lang-ar {
    text-align: right;
}

body.lang-ar .hero .container {
    flex-direction: row;
}

body.lang-ar .hero-content {
    text-align: right;
}

body.lang-ar .service-card {
    text-align: right;
}

body.lang-ar .service-card span {
    left: 20px;
    right: auto;
}

body.lang-ar .service-card .service-icon {
    right: 20px;
    left: auto;
}

body.lang-ar .section-header {
    text-align: center;
}

body.lang-ar .footer-content {
    direction: rtl;
}

body.lang-ar .footer-col {
    text-align: right;
}

body.lang-ar .footer-links {
    text-align: right;
}

body.lang-ar ul li i {
    margin-left: 10px;
    margin-right: 0;
}

/* English (LTR) */
body.lang-en {
    text-align: left;
}

body.lang-en .hero .container {
    flex-direction: row-reverse;
}

body.lang-en .hero-content {
    text-align: left;
}

body.lang-en .hero-btns {
    justify-content: flex-start;
}

body.lang-en .services-grid {
    direction: ltr;
}

body.lang-en .service-card {
    text-align: left;
}

body.lang-en .service-card span {
    left: 20px;
    right: auto;
}

body.lang-en .service-card .service-icon {
    right: 20px;
    left: auto;
}

body.lang-en .service-card h3,
body.lang-en .service-card p {
    text-align: left;
}

body.lang-en .section-header {
    text-align: center;
}

body.lang-en .section-title {
    direction: ltr;
}

body.lang-en #about > .container > div {
    flex-direction: row-reverse;
}

body.lang-en #about p,
body.lang-en #about ul {
    text-align: left;
    direction: ltr;
}

body.lang-en #about ul li {
    direction: ltr;
}

body.lang-en #contact > .container > div {
    direction: ltr;
}

body.lang-en #contact-form {
    direction: ltr;
}

body.lang-en .footer-content {
    direction: ltr;
}

body.lang-en .footer-col {
    text-align: left;
}

body.lang-en .footer-col h4::after {
    right: auto;
    left: 0;
}

body.lang-en .footer-links {
    text-align: left;
}

body.lang-en ul li i {
    margin-right: 10px;
    margin-left: 0;
}

body.lang-en .form-group {
    text-align: left;
}

body.lang-en #contact-form label {
    text-align: left;
}

body.lang-en .login-card .form-group {
    text-align: left;
}

body.lang-en .filter-container {
    direction: ltr;
}

body.lang-en #search-input {
    direction: ltr;
    text-align: left;
}

body.lang-en #search-input + i {
    right: auto;
    left: 20px;
}

/* Login dropdown styling for English */
body.lang-en .dropdown-toggle {
    flex-direction: row-reverse;
}

body.lang-en .dropdown-item {
    direction: ltr;
    text-align: left;
}

/* Admin Page English Styles */
body.lang-en .admin-container {
    direction: ltr;
}

/* Admin Header for English */
body.lang-en .admin-nav {
    flex-direction: row-reverse;
}

body.lang-en .admin-nav-logo {
    flex-direction: row-reverse;
}

body.lang-en .admin-nav-actions {
    flex-direction: row-reverse;
}

body.lang-en .admin-card {
    direction: ltr;
    text-align: left;
}

body.lang-en .admin-card h3,
body.lang-en .admin-card h4,
body.lang-en .admin-card p,
body.lang-en .admin-card label {
    text-align: left;
}

body.lang-en .form-row {
    direction: ltr;
}

body.lang-en .form-col {
    text-align: left;
}

body.lang-en .form-col label {
    text-align: left;
}

body.lang-en .form-col input,
body.lang-en .form-col select,
body.lang-en .form-col textarea {
    direction: ltr;
    text-align: left;
}

body.lang-en .product-table th,
body.lang-en .product-table td {
    text-align: left;
}

body.lang-en .admin-product-card {
    direction: ltr;
    text-align: left;
}

body.lang-en .admin-product-actions {
    justify-content: flex-start;
}

body.lang-en .modal-card {
    direction: ltr;
    text-align: center;
}

body.lang-en .products-grid {
    direction: ltr;
}

body.lang-en #dynamic-fields-container {
    direction: ltr;
}

body.lang-en #generic-specs-container {
    direction: ltr;
}

body.lang-en .dropdown-item i {
    margin-left: 8px;
    margin-right: 0;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 200;
    border: 1px solid #f1f5f9;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--secondary-color);
    color: var(--accent-color);
}

.dropdown-item i {
    margin-left: 10px;
    /* Space for icon in RTL */
    font-size: 1rem;
    color: var(--gold-accent);
}

/* Reset hover line for dropdown items */
.dropdown-item::after {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: radial-gradient(circle at top left, #f8fafc, #fff);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    flex: 1;
    padding-left: 50px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.hero-title span {
    color: var(--danger-color);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shield-container {
    width: 300px;
    height: 350px;
    background: linear-gradient(135deg, var(--accent-color), #1e293b);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3); - Doesn't work well with clip-path */
    filter: drop-shadow(0 20px 30px rgba(15, 23, 42, 0.4));
    animation: hexagonFloat 6s ease-in-out infinite;
}

@keyframes hexagonFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.shield-icon {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
}

/* Sections */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--gold-accent);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin: 10px 0;
}

/* Grid & Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    padding-top: 80px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card span {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2.5rem;
    font-weight: 900;
    color: #eee;
    line-height: 1;
}

.service-icon {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 0;
    display: inline-block;
    line-height: 1;
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.service-card p {
    margin: 0;
}

/* Footer */
footer {
    background: var(--accent-color);
    color: #fff;
    padding: 80px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--gold-accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
    padding-right: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        padding-left: 0;
    }

    .nav-links {
        display: none;
        /* Add toggle logic if needed, simple hide for now or mobile menu styles */
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* --- Helper Classes & Modal (Added) --- */

.form-group-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.form-group-title {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.spec-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }

    #product-detail-modal,
    #product-detail-modal * {
        visibility: visible;
    }

    #product-detail-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: white;
    }

    .modal-card {
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }

    button {
        display: none !important;
    }
}

/* ============================================
   Admin Dashboard Styles
   ============================================ */

/* Dashboard Cards */
.dashboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(145deg, #fff, #f8fafc);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
}

.stat-icon.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.stat-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
}

.stat-icon.teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: #fff;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #1e40af);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.btn-success:hover {
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: var(--text-light);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--accent-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 15px 18px;
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
}

.data-table th {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8fafc;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.badge-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.form-control:hover {
    border-color: #cbd5e1;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 20px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, #f8fafc, #fff);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
}

/* Navigation Links */
.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    color: var(--accent-color);
    background: #f8fafc;
}

.nav-links a.active {
    color: var(--accent-color);
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

/* Balance Colors */
.balance-positive {
    color: #16a34a !important;
    font-weight: 700;
}

.balance-negative {
    color: #dc2626 !important;
    font-weight: 700;
}

.balance-zero {
    color: var(--text-dim);
}

/* Customer Type Pills */
.customer-type {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.customer-type.type-individual {
    background: #dbeafe;
    color: #1d4ed8;
}

.customer-type.type-company {
    background: #f0fdf4;
    color: #16a34a;
}

.customer-type.type-government {
    background: #fef3c7;
    color: #b45309;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Actions Cell */
.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Page Title */
.page-title {
    font-size: 1.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.page-title i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 15px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.search-box input {
    border: none;
    outline: none;
    padding: 12px 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    width: 200px;
    background: transparent;
}

.search-box i {
    color: var(--text-dim);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover,
.filter-pill.active {
    border-color: var(--accent-color);
    background: #eef2ff;
    color: var(--accent-color);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Adjustments for Admin */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .nav-links {
        display: none !important;
    }
}