:root {
    --primary-color: #1a5f7a;
    --secondary-color: #159895;
    --accent-color: #57c5b6;
    --dark-color: #002B5B;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--light-color);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.logo span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 600;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 0.8;
}

.main-nav .user-btn {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.main-nav .user-btn:hover {
    background-color: var(--light-color);
    opacity: 1;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-full {
    width: 100%;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

/* Features */
.features {
    padding: 4rem 0;
    background-color: var(--white);
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background-color: var(--light-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
}

/* Products Section */
.products-section {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.products-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.product-card h4 {
    font-size: 1rem;
    color: var(--dark-color);
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.contact-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.contact-info {
    text-align: center;
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--secondary-color);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.faq-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

#home-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

#home-faq-list .faq-item {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

#home-faq-list .faq-question {
    color: var(--dark-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#home-faq-list .faq-answer {
    color: var(--gray-color);
    line-height: 1.6;
}

#home-faq-list .no-faq {
    text-align: center;
    color: var(--gray-color);
    padding: 2rem;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light-color), var(--white));
}

.auth-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.owner-link {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.owner-link a {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Social Login */
.social-login {
    margin-top: 1rem;
}

.btn-google {
    background-color: #4285f4;
    color: white;
    border: none;
}

.btn-google:hover {
    background-color: #3574e4;
}

/* Section Description */
.section-desc {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

/* Dashboard */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 280px;
    background-color: var(--dark-color);
    color: var(--white);
    padding: 2rem 0;
    flex-shrink: 0;
}

.sidebar .seller-info,
.sidebar .owner-info {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.sidebar p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-right: 3px solid var(--secondary-color);
}

.sidebar-nav i {
    width: 20px;
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--light-color);
    overflow-y: auto;
}

.dashboard-content h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* Seller Dashboard */
.seller-section,
.owner-section {
    display: none;
}

.seller-section.active,
.owner-section.active {
    display: block;
}

/* PDF Upload Styles */
.pdf-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pdf-upload-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.pdf-upload-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.pdf-upload-card input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed var(--secondary-color);
    border-radius: 8px;
}

.pdf-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.pdf-status.success {
    color: var(--success-color);
}

.pdf-status.error {
    color: var(--danger-color);
}

.uploaded-files {
    margin-top: 2rem;
}

.uploaded-files h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.pdf-file-item {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-file-item .file-name {
    font-weight: 600;
    color: var(--dark-color);
}

.pdf-file-item .file-actions button {
    margin-right: 0.5rem;
}

/* FAQ Styles */
.faq-item {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.faq-question {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--gray-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.faq-actions {
    display: flex;
    gap: 0.5rem;
}

/* PDF Download Grid */
.pdf-download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.pdf-download-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
}

.pdf-download-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.pdf-download-card i {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.pdf-download-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.pdf-download-card p {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pdf-download-card .btn {
    width: 100%;
}

/* Profile Card */
.profile-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 500px;
}

/* Owner Dashboard - Company Form */
#company-form h3 {
    margin: 1.5rem 0 1rem;
    color: var(--dark-color);
    font-size: 1.3rem;
}

#company-form .btn {
    margin-top: 1rem;
    margin-right: 0.5rem;
}

.bank-account-card {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.bank-account-card .remove-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2rem;
}

.bank-account-card input {
    margin-bottom: 0.5rem;
}

/* Tables */
.offers-table,
.sellers-table {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--primary-color);
    color: var(--white);
}

th, td {
    padding: 1rem;
    text-align: right;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background-color: var(--light-color);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin-bottom: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.pdf-modal-content {
    max-width: 700px;
}

.close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
}

.close:hover {
    color: var(--dark-color);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* PDF Preview */
#pdf-preview {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    min-height: 300px;
}

#pdf-preview .pdf-header {
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

#pdf-preview .pdf-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

#pdf-preview .pdf-header p {
    color: var(--gray-color);
}

#pdf-preview .pdf-section {
    margin-bottom: 1rem;
}

#pdf-preview .pdf-section h3 {
    color: var(--dark-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3rem;
}

#pdf-preview .pdf-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
    text-align: center;
}

/* Statistics */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stats-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stats-card h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.stats-card:nth-child(1) {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stats-card:nth-child(2) {
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

.stats-card:nth-child(3) {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

/* Stats Tabs */
.stats-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.stats-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

.stats-tab:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.stats-tab.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.stats-tab-content {
    animation: fadeIn 0.3s ease-out;
}

/* Table Controls */
.table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.table-controls input[type="text"],
.table-controls input[type="date"],
.table-controls select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    min-width: 150px;
}

.table-controls input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.table-controls .btn {
    margin: 0;
}

.table-controls .btn-success {
    background-color: #27ae60;
}

.table-controls .btn-danger {
    background-color: #e74c3c;
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.main-footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav a {
        margin: 0 0.5rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: fadeIn 0.5s ease-out;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}
