/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - Constant across themes */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --gradient-orange: linear-gradient(135deg, #FFA85C 0%, #F97316 40%, #C86A34 100%);

    /* Light Theme Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    /* Legacy compatibility */
    --dark-color: #1e293b;
    --light-color: #f1f5f9;
    --text-color: var(--text-primary);
    --text-muted: var(--text-secondary);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);

    /* Legacy compatibility */
    --dark-color: #f1f5f9;
    --light-color: #334155;
    --text-color: var(--text-primary);
    --text-muted: var(--text-secondary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    bottom: -10vw;
    right: -10vw;
    width: 60vw;
    height: 60vw;
    background-image: url('/assets/logo3sq-light.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100%;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* Utility Classes */
.bg-gradient-orange {
    background: var(--gradient-orange);
}

/* Header */
.main-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
}


.nav-brand-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: #C86A34;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    background-color: var(--bg-tertiary);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    margin-top: 0;
    padding-top: 0.5rem;
}

/* Show dropdown on hover (fallback for non-JS) and with .show class (JS enhanced) */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.show .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.notification-dropdown .dropdown-menu {
    min-width: 400px;
    max-width: 500px;
}

.notification-menu {
    max-height: 500px;
    overflow-y: auto;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 1;
}

.mark-all-read-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.mark-all-read-btn:hover {
    background-color: var(--bg-tertiary);
}

.notification-list {
    padding: 0;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    cursor: pointer;
    position: relative;
}

.notification-item:hover {
    background-color: var(--bg-tertiary);
}

.notification-item.unread {
    background-color: rgba(37, 99, 235, 0.05);
}

[data-theme="dark"] .notification-item.unread {
    background-color: rgba(59, 130, 246, 0.1);
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.mark-read-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.mark-read-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.notification-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

.notification-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.notification-empty p {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--dark-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
    background-color: #475569;
}

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

.btn-success:hover {
    background-color: #16a34a;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

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

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

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

.btn-outline-secondary:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2, .card-header h3 {
    font-size: 1.25rem;
    color: var(--dark-color);
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: var(--light-color);
    cursor: not-allowed;
}

small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.checkbox input[type="checkbox"] {
    width: auto;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert ul {
    list-style-position: inside;
    margin: 0;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: var(--light-color);
}

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

.text-right {
    text-align: right;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #e2e8f0;
    color: #475569;
}

.badge-dark {
    background-color: #1e293b;
    color: white;
}

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

.stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.3s ease;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
}

.dashboard-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

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

.section-header h2 {
    font-size: 1.25rem;
    color: var(--dark-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--gradient-orange);
    position: relative;
}

.auth-container::before {
    content: '';
    position: fixed;
    bottom: -10vw;
    right: -10vw;
    width: 60vw;
    height: 60vw;
    background-image: url('/assets/logo3sq-light.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100%;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.auth-theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.3);
    display: none;
}

.auth-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.auth-box {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #C86A34;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.link-secondary {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.link-secondary:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-primary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.product-header h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.product-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-pricing {
    padding: 1.5rem;
    text-align: center;
    background-color: var(--light-color);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.price .period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.setup-fee {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.product-features {
    padding: 1.5rem;
}

.product-features h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.product-features ul, .feature-list {
    list-style: none;
}

.product-features li, .feature-list li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.product-footer {
    padding: 1.5rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.625rem 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tab:hover, .filter-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-info {
    color: var(--text-muted);
}

/* Invoice */
.invoice-container {
    background: white;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.invoice-company h1 {
    font-size: 2rem;
    color: var(--primary-color);
}

.invoice-details {
    text-align: right;
}

.invoice-details h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.invoice-to {
    margin-bottom: 2rem;
}

.invoice-to h3 {
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.invoice-items {
    margin-bottom: 2rem;
}

.invoice-summary {
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-total {
    font-size: 1.25rem;
    padding-top: 1rem;
    border-top: 2px solid var(--dark-color);
}

.invoice-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.invoice-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

/* Profile Grid */
.profile-grid {
    display: grid;
    gap: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Admin Panel */
.admin-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-secondary);
}

.admin-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
}

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

.admin-header-content h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-logo {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.admin-user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.admin-nav-link {
    padding: 0.875rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background-color: var(--light-color);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-dashboard-grid {
    display: grid;
    gap: 1.5rem;
}

/* Footer */
.main-footer {
    background-color: #475569;
    color: white;
    margin-top: 3rem;
    transition: background-color 0.3s ease;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.6rem 0;
}

.footer-brand {
    font-weight: 700;
    font-size: 0.95rem;
    color: #C86A34;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.8rem;
    color: #94a3b8;
}

.footer-contact a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-contact a:hover { color: white; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }

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

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

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .invoice-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .invoice-details {
        text-align: left;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

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

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

.about-stat {
    text-align: center;
    padding: 1.5rem 1rem;
}

.about-stat .stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.about-stat h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: rotate(20deg);
}

.theme-toggle:active {
    transform: rotate(20deg) scale(0.95);
}

/* Icon transitions */
.theme-icon {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon.hidden {
    opacity: 0;
    transform: scale(0);
    position: absolute;
}

/* Admin Panel Dark Mode Fixes */
.admin-header {
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.admin-sidebar {
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.admin-nav-link {
    color: var(--text-primary);
    transition: all 0.2s;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

/* Stats and Dashboard Cards */
.stat-info h3 {
    color: var(--text-primary);
}

.dashboard-section {
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.section-header h2 {
    color: var(--text-primary);
}

/* Product Cards Dark Mode */
.product-card {
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.product-header h3 {
    color: var(--text-primary);
}

.product-pricing {
    background-color: var(--bg-tertiary);
}

.price {
    color: var(--text-primary);
}

.product-features li {
    color: var(--text-primary);
}

/* Tables Dark Mode */
.table th {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

/* Invoice Dark Mode */
.invoice-container {
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.invoice-company h1 {
    color: var(--primary-color);
}

.invoice-details h2,
.invoice-to h3,
.page-header h1 {
    color: var(--text-primary);
}

/* Filter Tabs Dark Mode */
.filter-tab {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

/* Auth Pages Dark Mode */
.auth-box {
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.auth-header h2 {
    color: var(--text-primary);
}

/* Form Inputs Dark Mode */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: var(--bg-tertiary);
}

label {
    color: var(--text-primary);
}

/* Footer Dark Mode */
[data-theme="dark"] .main-footer {
    background-color: #0f172a;
}

/* Hero Section (Home Page) */
.hero {
    background: var(--gradient-orange);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

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

.features-section {
    padding: 4rem 2rem;
    background: var(--bg-primary);
}

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

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
}

.pricing-section {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-header p {
    color: var(--text-secondary);
}

/* Global Search Widget Styles */
.nav-search {
    position: relative;
}

.search-toggle {
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}

.search-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    z-index: 1000;
}

.search-popup input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #ddd;
    font-size: 1rem;
    outline: none;
    border-radius: 8px 8px 0 0;
}

.search-suggestions {
    max-height: 400px;
    overflow-y: auto;
}

.suggestion-section {
    border-bottom: 1px solid #eee;
}

.suggestion-header {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    background: #f8f9fa;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-icon {
    font-size: 1.2rem;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9rem;
}

.suggestion-type {
    font-size: 0.75rem;
    color: #666;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.suggestion-count {
    font-size: 0.75rem;
    color: #666;
}

.suggestion-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.suggestion-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #ddd;
    text-align: center;
}

.suggestion-footer a {
    color: var(--primary-color, #0066cc);
    text-decoration: none;
    font-size: 0.9rem;
}

.suggestion-footer a:hover {
    text-decoration: underline;
}

/* Dark theme support for search widget */
[data-theme="dark"] .search-popup {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .search-popup input {
    background: #2d3748;
    color: #e2e8f0;
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .suggestion-header {
    background: #1a202c;
    color: #a0aec0;
}

[data-theme="dark"] .suggestion-item:hover {
    background: #1a202c;
}

[data-theme="dark"] .suggestion-type {
    background: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .suggestion-footer {
    border-top-color: #4a5568;
}

[data-theme="dark"] .suggestion-footer a {
    color: #63b3ed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-popup {
        width: 90vw;
        right: -50px;
    }
}
