/* ============================================
   ADMIN STYLES - Dark Red Theme
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #f7f3f0;
    color: #1e0e0b;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #3d0f0a 0%, #5e1a13 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

/* Admin Layout */
.admin-wrapper {
    min-height: 100vh;
}

.admin-nav {
    background: #3d0f0a;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.admin-nav .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-brand span {
    color: #e6b17e;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-logout {
    background: #5e1a13;
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-logout:hover {
    background: #7f2b22;
}

.admin-content {
    padding: 30px 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 1.5rem;
}

.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.admin-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e6d6ce;
    overflow-x: auto;
}

.admin-section h3 {
    color: #3d0f0a;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-section h3 i {
    color: #a34534;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

th {
    text-align: left;
    padding: 12px 10px;
    background: #f0e6e0;
    color: #3d0f0a;
    font-weight: 600;
}

td {
    padding: 10px;
    border-bottom: 1px solid #e6d6ce;
}

td img {
    border-radius: 4px;
}

/* Buttons */
.btn-add {
    background: #5e1a13;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-add:hover {
    background: #7f2b22;
}

.btn-edit, .btn-delete {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-edit {
    background: #e6b17e;
    color: #3d0f0a;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #d49a65;
}

.btn-delete {
    background: #b91c1c;
    color: #fff;
}

.btn-delete:hover {
    background: #8b1515;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e6d6ce;
}

.modal-header h3 {
    color: #3d0f0a;
}

.close {
    font-size: 1.8rem;
    cursor: pointer;
    color: #5e1a13;
    transition: 0.3s;
}

.close:hover {
    color: #b91c1c;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #3d0f0a;
    font-size: 0.9rem;
}

.form-group input:not([type="file"]),
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e6d6ce;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
    background: #fff;
}

.form-group input:not([type="file"]):focus,
.form-group textarea:focus {
    border-color: #a34534;
    outline: none;
    box-shadow: 0 0 0 3px rgba(163, 69, 52, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* File Input Styles */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #3d0f0a;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.9rem;
}

.file-label:hover {
    background: #5e1a13;
}

.file-label i {
    font-size: 1.1rem;
}

.file-name {
    color: #7a4e42;
    font-size: 0.9rem;
    padding: 5px 10px;
    background: #f7f3f0;
    border-radius: 4px;
    border: 1px dashed #d6c2b8;
    flex: 1;
    min-width: 100px;
}

.file-preview {
    margin-top: 10px;
}

.file-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #e6d6ce;
}

.btn-submit {
    background: #5e1a13;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

.btn-submit:hover {
    background: #7f2b22;
    transform: translateY(-2px);
}

.required {
    color: #b91c1c;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-nav .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .nav-actions {
        justify-content: center;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .file-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-label {
        justify-content: center;
    }
}