/* style.css */
:root {
    --primary: #e23744;
    --primary-dark: #cb202d;
    --secondary: #1c1c1c;
    --light: #f8f9fa;
    --dark: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.dashboard-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.header-left .subtitle {
    opacity: 0.9;
    font-size: 14px;
}

.header-right {
    display: flex;
    gap: 15px;
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

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

.btn-primary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-info {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 30px;
    background: var(--light-gray);
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.card-1 .stat-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.card-2 .stat-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.card-3 .stat-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.card-4 .stat-icon { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

.stat-content p {
    color: var(--gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 30px;
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    background: var(--light);
    padding: 20px 25px;
    border-bottom: 1px solid var(--light-gray);
}

.card-header h3 {
    color: var(--secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* Restaurant List */
.restaurant-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.restaurant-item {
    padding: 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.restaurant-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(226, 55, 68, 0.1);
}

.restaurant-info h4 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 16px;
}

.restaurant-details {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--gray);
}

.restaurant-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(226, 55, 68, 0.1);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 14px;
}

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

#restaurantTable {
    width: 100%;
    border-collapse: collapse;
}

#restaurantTable thead {
    background: var(--light);
}

#restaurantTable th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary);
    border-bottom: 2px solid var(--light-gray);
}

#restaurantTable td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

#restaurantTable tbody tr:hover {
    background: rgba(226, 55, 68, 0.05);
}

.rating-badge {
    background: #ffc107;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .restaurant-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* Restaurant Grid Styles */
.full-width {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.restaurant-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.restaurant-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.restaurant-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.restaurant-card:hover .restaurant-card-image img {
    transform: scale(1.05);
}

.card-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.restaurant-card-content {
    padding: 20px;
}

.restaurant-card-content h4 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.card-rating i {
    color: #ffc107;
}

.card-rating span {
    font-weight: 600;
    color: var(--secondary);
}

.card-cuisine {
    font-size: 12px;
    color: var(--gray);
    margin-left: auto;
}

.card-location, .card-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 8px;
}

.card-location i, .card-price i {
    color: var(--primary);
    width: 16px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.card-actions .btn-sm {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
}

/* Restaurant List with Images */
.restaurant-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.restaurant-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(226, 55, 68, 0.1);
}

.restaurant-image {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.restaurant-info {
    flex: 1;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--light);
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary);
    color: white;
}

.page-link i {
    font-size: 14px;
}

/* Modal Restaurant Details */
.restaurant-detail {
    padding: 20px;
}

.restaurant-detail h2 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 24px;
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--secondary);
    width: 120px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--dark);
    flex: 1;
}

.detail-value.rating {
    color: #ffc107;
    font-weight: 600;
}

.detail-value.discount {
    color: var(--success);
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .restaurant-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .restaurant-card-image {
        height: 150px;
    }
    
    .pagination {
        gap: 3px;
    }
    
    .page-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .restaurant-grid {
        grid-template-columns: 1fr;
    }
    
    .restaurant-item {
        flex-direction: column;
        text-align: center;
    }
    
    .restaurant-image {
        width: 100%;
        height: 150px;
    }
}

