/* Admin Panel Styles */

:root {
    --admin-primary: #2e7d32;
    --admin-secondary: #ff8c00;
    --admin-dark: #1a1a1a;
    --admin-light: #f5f5f5;
    --admin-border: #e0e0e0;
    --admin-success: #4caf50;
    --admin-warning: #ff9800;
    --admin-error: #f44336;
    --admin-info: #2196f3;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--admin-light);
    color: var(--admin-dark);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--admin-primary) 0%, #1e5e20 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 2rem;
}

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

.login-logo {
    height: 80px;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: var(--admin-dark);
    font-size: 1.75rem;
}

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

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

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #236b26;
    transform: translateY(-1px);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

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

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

/* Admin Layout */
body.admin-body {
    margin: 0;
    padding: 0;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

.admin-container {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

/* Header */
.admin-header {
    background: white;
    border-bottom: 1px solid var(--admin-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.admin-logo {
    height: 40px;
    transition: transform 0.3s;
}

.header-left a:hover .admin-logo {
    transform: scale(1.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.preview-website-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--admin-primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.preview-website-btn:hover {
    background: #1e5e20;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.preview-website-btn span {
    font-size: 1.1rem;
}

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

.logout-link {
    color: var(--admin-error);
    text-decoration: none;
    font-weight: 500;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--admin-border);
    height: calc(100vh - 60px);
    position: fixed;
    top: 60px;
    left: 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-nav ul {
    list-style: none;
    padding: 1rem 0;
}

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

.admin-nav a:hover {
    background: var(--admin-light);
}

.admin-nav a.active {
    background: rgba(46, 125, 50, 0.1);
    color: var(--admin-primary);
    border-left: 3px solid var(--admin-primary);
}

.nav-icon {
    font-size: 1.25rem;
    width: 30px;
    text-align: center;
}

/* Main Content */
.admin-main {
    flex: 1;
    padding: 2rem;
    background: var(--admin-light);
    margin-left: 250px;
    min-height: calc(100vh - 60px);
}

.page-header {
    margin-bottom: 2rem;
}

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

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
}

.stat-details {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.stat-details .confirmed {
    color: var(--admin-success);
}

.stat-details .pending {
    color: var(--admin-warning);
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

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

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

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

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

.admin-table th {
    background: var(--admin-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--admin-dark);
    border-bottom: 2px solid var(--admin-border);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table tr:hover {
    background: #fafafa;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--admin-dark);
}

/* Sites Admin Grid */
.sites-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.site-admin-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.site-admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.site-admin-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.site-status-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.site-status-overlay.status-active {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.site-status-overlay.status-maintenance {
    background: rgba(255, 152, 0, 0.9);
    color: white;
}

.site-status-overlay.status-inactive {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

.site-admin-info {
    padding: 1.5rem;
}

.site-admin-info h3 {
    margin-bottom: 0.5rem;
    color: var(--admin-dark);
}

.site-type {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.site-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--admin-border);
    border-bottom: 1px solid var(--admin-border);
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-primary);
}

.site-details {
    margin-top: 1rem;
}

.site-details p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.site-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .admin-sidebar {
        position: fixed;
        left: -250px;
        transition: left 0.3s;
        z-index: 999;
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .admin-sidebar.active {
        left: 0;
    }
    
    .admin-main {
        padding: 1rem;
        margin-left: 0 !important;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sites-admin-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hide desktop-specific elements */
    .preview-website-btn {
        display: none;
    }
    
    /* Responsive tables */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}