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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 400px;
}

.login-card h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

.login-card input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
}

.login-card button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#loginError {
    color: red;
    text-align: center;
    margin-top: 10px;
}

.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 250px;
    background: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 15px;
    margin: 10px 0;
    background: #f5f5f5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar li:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.content {
    flex: 1;
    padding: 30px;
    background: rgba(255,255,255,0.95);
    overflow-y: auto;
    margin-left: 250px;
    width: calc(100% - 250px);
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 101;
    background: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-size: 20px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #667eea;
}

.header input {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    width: 300px;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-x: auto;
}

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

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

tbody tr:hover {
    background: #f5f5f5;
}

.btn-edit {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-delete {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-edit:hover, .btn-delete:hover {
    opacity: 0.8;
}

.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: 20px;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.modal-content button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content button:hover {
    opacity: 0.9;
}

.btn-add {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.modal-content select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        width: 100%;
        padding: 20px 15px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .overlay.active {
        display: block;
    }
    
    .login-card {
        width: 90%;
        padding: 30px 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header input {
        width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 800px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .btn-edit, .btn-delete {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-add {
        width: 100%;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .login-card {
        width: 95%;
        padding: 25px 15px;
    }
    
    .login-card h1 {
        font-size: 24px;
    }
    
    .sidebar {
        width: 85%;
    }
    
    .content {
        padding: 15px 10px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    th, td {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background: #e0e0e0;
}

.badge-free { background: #4CAF50; color: white; }
.badge-paid { background: #ff9800; color: white; }

.link { color: #667eea; text-decoration: none; }
.link:hover { text-decoration: underline; }

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.no-data, .loading { text-align: center; padding: 40px !important; }
.actions { margin-bottom: 20px; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 24px; border-radius: 10px; cursor: pointer; }
.btn-secondary { background: #e0e0e0; color: #333; border: none; padding: 12px 24px; border-radius: 10px; cursor: pointer; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group small { display: block; margin-top: 5px; color: #999; font-size: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.form-actions button { flex: 1; }
.logo { font-size: 24px; font-weight: bold; color: #667eea; text-align: center; margin-bottom: 30px; }
.nav-menu { list-style: none; }
.nav-menu a { display: block; padding: 15px; background: #f5f5f5; border-radius: 10px; text-decoration: none; color: #333; transition: all 0.3s; }
.nav-menu a:hover, .nav-menu a.active { background: #667eea; color: white; transform: translateX(5px); }
.user-info { color: #667eea; font-weight: 500; }
.container { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: 250px; width: calc(100% - 250px); }

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background: #e0e0e0;
    color: #333;
}

.badge-free {
    background: #4CAF50;
    color: white;
}

.badge-paid {
    background: #ff9800;
    color: white;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    margin: 0 3px;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

.loading {
    text-align: center;
    color: #667eea;
    padding: 40px !important;
}

.actions {
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin: 10px 0;
}

.nav-menu a {
    display: block;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.user-info {
    color: #667eea;
    font-weight: 500;
}

.container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    width: calc(100% - 250px);
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Gallery Admin Styles */
.gallery-stat-card {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    min-width: 100px;
    border-top: 3px solid #764ba2;
}
.gallery-stat-num { font-size: 1.6rem; font-weight: 700; color: #764ba2; }
.gallery-stat-lbl { font-size: 0.75rem; color: #999; margin-top: 2px; }

#galleryDropZone.dz-hover {
    border-color: #667eea !important;
    background: #eef2ff !important;
}

.g-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.g-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.g-remove-btn {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px;
    background: rgba(239,68,68,0.9); color: white;
    border: none; border-radius: 50%; cursor: pointer;
    font-size: 10px; display: flex; align-items: center; justify-content: center;
}
.g-status {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6); color: white;
    font-size: 10px; text-align: center; padding: 2px;
}

.g-manage-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.g-manage-item img { width: 100%; height: 100%; object-fit: cover; }
.g-manage-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.g-manage-item:hover .g-manage-overlay { opacity: 1; }
.g-manage-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6); color: white;
    font-size: 10px; padding: 3px 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
