/* Admin Panel Styles */

:root {
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray: #6b7280;
    --light: #f3f4f6;
}

.admin-container {
    min-height: 100vh;
    background: var(--bg-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 24px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.admin-nav {
    max-width: 1400px;
    margin: 0 auto 30px;
    display: flex;
    gap: 10px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 12px 24px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.admin-section.hidden {
    display: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: var(--white);
    color: var(--text-primary);
    font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="text"], input[type="number"], input[type="email"], 
input[type="password"], input[type="file"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: var(--white);
    color: var(--text-primary);
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

small {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* Property Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.property-admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.property-admin-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.property-admin-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.property-admin-card h3 {
    padding: 16px;
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.property-info {
    padding: 0 16px 16px;
}

.property-info span {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-secondary);
}

.property-info strong {
    color: var(--text-primary);
}

.property-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.property-status.active {
    background: #d1fae5;
    color: #065f46;
}

.property-status.sold {
    background: #fecaca;
    color: #991b1b;
}

.property-status.rented {
    background: #dbeafe;
    color: #1e40af;
}

.property-status.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.property-actions {
    padding: 16px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

/* Image Preview */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 400px;
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

