:root {
    --primary: #4f46e5;
    --secondary: #818cf8;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --danger: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background: var(--light); color: var(--dark); }
a { text-decoration: none; color: inherit; }

/* Navbar */
.navbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); }
.navbar .menu a { margin-left: 15px; font-weight: 500; transition: 0.3s; }
.navbar .menu a:hover { color: var(--primary); }
.user-info { margin-left: 20px; font-weight: bold; color: var(--secondary); }
.btn-logout { color: var(--danger) !important; }

/* Container */
.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }

/* Forms & Inputs */
input, select, button {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 5px 0;
    width: 100%;
}
button, .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
button:hover { background: var(--secondary); }
.btn-danger { background: var(--danger); color: white; padding: 5px 10px; font-size: 0.9rem; }
.form-inline { display: flex; gap: 10px; margin-bottom: 20px; }
.form-inline input { flex: 1; }
.form-inline button { width: auto; }

/* Login */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}
.error { color: var(--danger); margin-bottom: 10px; }
.alert { padding: 10px; border-radius: 5px; margin-bottom: 15px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Dashboard Cards */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.card { background: var(--white); padding: 20px; border-radius: 10px; box-shadow: var(--shadow); text-align: center; }
.card h3 { font-size: 2rem; color: var(--primary); }

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.photo-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.photo-card:hover { transform: translateY(-5px); }
.img-wrapper { height: 200px; overflow: hidden; cursor: zoom-in; }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.info { padding: 15px; position: relative; }
.info h4 { font-size: 1rem; margin-bottom: 5px; }
.badge { background: var(--secondary); color: white; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; }
.date { font-size: 0.8rem; color: #666; float: right; }
.btn-delete { position: absolute; top: 10px; right: 10px; color: var(--danger); background: none; border: none; font-size: 1.2rem; cursor: pointer; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.pagination a { padding: 8px 15px; background: var(--white); border: 1px solid #ddd; border-radius: 5px; }
.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}
.close {
    position: absolute;
    top: 20px; right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
#caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 10px; }
    .navbar .menu { display: flex; flex-wrap: wrap; justify-content: center; }
    .form-inline { flex-direction: column; }
}