/* Jason Harris Real Estate - Photo Management System
   Color Scheme from jasonharrisrealestate.com */

:root {
    --primary-gold: #b79e56;
    --primary-gold-dark: #9a8548;
    --primary-gold-light: #d4c48a;
    --text-primary: #1A222C;
    --text-secondary: #484E56;
    --background: #ffffff;
    --background-light: #f2f2f2;
    --error: #dc3545;
    --success: #28a745;
}

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

body {
    font-family: 'Tinos', Georgia, serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-gold-dark);
}

/* Header */
.header {
    background: var(--background);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo span {
    color: var(--primary-gold);
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-link {
    display: flex;
    align-items: center;
}

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

.nav a {
    color: var(--text-secondary);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav a:hover {
    color: var(--primary-gold);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
}

.auth-box {
    background: var(--background);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.auth-box .logo-text {
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Tinos', Georgia, serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(183, 158, 86, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

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

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

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

.btn-danger:hover {
    background: #c82333;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.9rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Cards */
.card {
    background: var(--background);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    background: var(--background-light);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ddd;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.card-body {
    padding: 1.5rem;
}

/* Image Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    background: var(--background);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-item img:hover {
    opacity: 0.85;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.gallery-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

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

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: var(--background-light);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

tr:hover {
    background: var(--background-light);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--primary-gold);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    background: var(--background-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: rgba(183, 158, 86, 0.1);
}

.upload-area.dragover {
    background: rgba(183, 158, 86, 0.2);
    border-color: var(--primary-gold-dark);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-area input[type="file"] {
    display: none;
}

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

.stat-card {
    background: var(--background);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-left: 4px solid var(--primary-gold);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer a {
    color: var(--primary-gold-light);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-box {
        padding: 2rem;
    }

    .main-content {
        padding: 1rem;
    }

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

/* Modal / Lightbox */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 40px;
    box-sizing: border-box;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: fixed;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.2s ease, color 0.2s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
    color: var(--primary-gold);
    transform: scale(1.1);
}

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

.badge-admin {
    background: var(--primary-gold);
    color: white;
}

.badge-client {
    background: var(--text-secondary);
    color: white;
}

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

.badge-inactive {
    background: var(--error);
    color: white;
}
