/* Admin Styles */
.admin-body {
    background: var(--bg-light);
    min-height: 100vh;
}

/* Admin Login */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-box {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.admin-login-box h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.admin-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.admin-form {
    text-align: left;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.back-link:hover {
    text-decoration: underline;
}

/* Admin Header */
.admin-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.admin-header-content {
    flex: 1;
    min-width: 200px;
}

.admin-header-content h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.admin-header-content .admin-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-user {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Admin Action Buttons */
.btn-home,
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-home {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-home:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-logout {
    background: var(--text-light);
    color: var(--bg-white);
}

.btn-logout:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-home svg,
.btn-logout svg {
    width: 18px;
    height: 18px;
}

/* Admin Content */
.admin-content {
    padding: 2rem 0;
}

.admin-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.admin-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* Upload Area */
.upload-area {
    position: relative;
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    /* Ensure it's touchable on mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
}

.upload-area.dragover {
    border-color: var(--secondary-color);
    background: rgba(80, 200, 120, 0.1);
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
    /* Ensure it works on mobile */
    -webkit-appearance: none;
    appearance: none;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-placeholder p {
    color: var(--text-light);
    margin: 0.5rem 0;
}

.upload-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

.upload-progress {
    margin-top: 1rem;
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    margin-top: 1rem;
}

.upload-item-name {
    flex: 1;
    color: var(--text-dark);
}

.upload-item-progress {
    width: 200px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.upload-item-progress-bar {
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.3s;
}

/* Admin Gallery */
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.admin-gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 1;
}

.admin-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-gallery-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.admin-gallery-item:hover .admin-gallery-actions {
    opacity: 1;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: var(--accent-color);
    color: var(--bg-white);
}

.btn-danger:hover {
    background: #e55555;
    transform: translateY(-2px);
}

.empty-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Messages Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
    color: var(--bg-white);
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
}

.message-item.unread {
    background: rgba(74, 144, 226, 0.05);
    border-left-color: var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.message-info h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.message-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Mark as Read Button - Blue with Yellow Hover */
.message-actions .btn-secondary {
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
}

.message-actions .btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.message-content {
    color: var(--text-dark);
    line-height: 1.6;
    white-space: pre-wrap;
}

.message-item.read {
    opacity: 0.8;
}

/* Responsive Messages */
@media (max-width: 768px) {
    .message-header {
        flex-direction: column;
    }

    .message-actions {
        width: 100%;
    }

    .message-actions .btn {
        flex: 1;
    }
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-login-box {
        padding: 2rem 1.5rem;
    }

    .admin-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .admin-actions .btn {
        width: 100%;
    }

    .admin-section {
        padding: 1.5rem;
    }

    .admin-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }
}

/* Custom Confirmation Modal */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.confirm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.confirm-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
    z-index: 3001;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 50%;
}

.confirm-modal-icon svg {
    width: 32px;
    height: 32px;
}

.confirm-modal-title {
    text-align: center;
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.confirm-modal-message {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.btn-confirm {
    background: var(--accent-color);
    color: var(--bg-white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm:hover {
    background: #e55555;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .confirm-modal-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .confirm-modal-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-confirm {
        width: 100%;
    }
}

