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

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

/* Login Page - Professional Design */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a6741 100%);
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 50%, #4a6741 100%);
}

.login-box h1 {
    background: linear-gradient(135deg, #1e3c72 0%, #4a6741 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 35px;
    font-size: 1.1em;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
    background: #f8f9fa;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #4a6741;
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 103, 65, 0.1);
}

.login-btn, .upload-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a6741 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover, .upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 103, 65, 0.4);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #c33;
    font-weight: 500;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: #4a6741;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.back-link a:hover {
    color: #2a5298;
}

/* Admin Dashboard - Professional Design */
.admin-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
}

.admin-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a6741 100%);
    color: white;
    padding: 25px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.header-content h1 {
    font-size: 2em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-name {
    font-size: 1.1em;
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.logout-btn {
    padding: 12px 28px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
}

.logout-btn:hover {
    background: white;
    color: #4a6741;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.alert {
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.upload-section {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    border-top: 5px solid #4a6741;
}

.upload-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8em;
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.image-preview {
    margin-top: 20px;
    min-height: 120px;
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
}

.image-preview:hover {
    border-color: #4a6741;
    background: #fff;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.pages-overview {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border-top: 5px solid #2a5298;
}

.pages-overview h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8em;
    font-weight: 700;
}

.pages-table {
    overflow-x: auto;
    border-radius: 12px;
}

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

thead {
    background: linear-gradient(135deg, #1e3c72 0%, #4a6741 100%);
    color: white;
}

th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9em;
    vertical-align: middle;
}

tr:hover {
    background: #f8f9fa;
}

.thumbnail {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.thumbnail:hover {
    transform: scale(2.5);
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    position: relative;
}

.view-btn, .delete-btn {
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-right: 8px;
    transition: all 0.3s;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
}

.view-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    cursor: pointer;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .logout-btn {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .upload-section, .pages-overview {
        padding: 25px 20px;
    }
    
    table {
        font-size: 0.85em;
    }
    
    th, td {
        padding: 12px 8px;
    }
}