:root {
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Admin Layout */
.admin-body {
    background-color: #f8fafc;
}

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

.sidebar {
    width: 260px;
    background: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.sidebar-nav a.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-link {
    width: 100%;
    background: transparent;
    border: none;
    color: #ef4444;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
}

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-info h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-content p {
    font-size: 24px;
    font-weight: 700;
}

.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.table-search {
    position: relative;
    width: 300px;
}

.table-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.table-search input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: var(--font-main);
}

.table-scroll {
    overflow-x: auto;
}

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

.admin-table th {
    background: #f8fafc;
    text-align: left;
    padding: 16px 24px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

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

.btn-group {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

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

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-header h2,
    .sidebar-nav span,
    .sidebar-footer span {
        display: none;
    }

    .dashboard-main {
        margin-left: 80px;
    }
}


/* Main Content Area */
.main-content {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    /* Fill screen minus padding */
    overflow: hidden;
}

/* Brand */
.brand {
    padding: 24px 24px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid transparent;
}

.header-actions {
    margin-left: auto;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.brand h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Search Area */
.search-container {
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
    background: #f8fafc;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: white;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Results List */
.results-header {
    padding: 20px 24px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h2 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sort-options select {
    border: none;
    background: transparent;
    font-family: var(--font-main);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.results-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}

/* Scrollbar */
.results-list::-webkit-scrollbar {
    width: 6px;
}

.results-list::-webkit-scrollbar-track {
    background: transparent;
}

.results-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

/* Business Card Component */
.business-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    display: flex;
    gap: 20px;
}

.business-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.card-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #e2e8f0;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.card-category {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-address {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #f59e0b;
    /* Amber 500 */
    margin-top: auto;
}

.card-rating span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 13px;
    margin-left: 4px;
}

.card-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f1f5f9;
}

.status-open {
    color: #10b981;
    background: #ecfdf5;
}

.status-closed {
    color: #ef4444;
    background: #fef2f2;
}

/* Footer */
.footer {
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .app-container {
        padding: 0;
    }

    .main-content {
        border-radius: 0;
        height: 100vh;
        max-width: 100%;
    }

    .business-card {
        padding: 16px;
        gap: 16px;
    }

    .card-image {
        width: 80px;
        height: 80px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-header {
    height: 200px;
    background: #e2e8f0;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.modal-title-row h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-right: 12px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-text {
    color: #f59e0b;
    font-weight: 600;
}

.modal-info-section {
    margin-bottom: 20px;
}

.modal-info-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-info-section p {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

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

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

.secondary-btn {
    background: #eff6ff;
    color: var(--primary-color);
}

.secondary-btn:hover {
    background: #dbeafe;
}

/* Add Button */
.add-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.add-btn:hover {
    background: #334155;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

textarea.form-input {
    resize: vertical;
}

/* Featured Listings Styles */
/* Featured & Sponsored Listings Styles */
.featured-item {
    border: 2px solid var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.03) !important;
    position: relative;
    overflow: hidden;
}

.sponsored-item {
    border: 2px solid #10b981 !important;
    background: rgba(16, 185, 129, 0.03) !important;
    position: relative;
    overflow: hidden;
}

.featured-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sponsored-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-featured {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.btn-featured.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.btn-featured:hover {
    background: rgba(245, 158, 11, 0.2);
}

.btn-sponsored {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.btn-sponsored.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.btn-sponsored:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* Analytics Section Styles */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.chart-container-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-container-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.chart-container-card canvas {
    flex: 1;
    width: 100% !important;
}