.admin-body {
    background: linear-gradient(135deg, var(--dark-accent), var(--primary-color) 50%, var(--red-accent));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.admin-login-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.admin-logo {
    width: 150px;
    height: auto;
    margin-bottom: 1.5rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.admin-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.admin-button:hover {
    transform: scale(1.02);
}

.admin-message {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
}

.admin-message.error {
    background: #ffebee;
    color: #c62828;
}

.admin-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Dashboard Styles */
.admin-dashboard {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.admin-sidebar {
    background: var(--dark-accent);
    color: white;
    padding: 2rem;
}

.admin-content {
    padding: 2rem;
    background: var(--background-color);
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: move;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.gallery-item.drag-over {
    border: 2px dashed var(--primary-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item .edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    flex-direction: column;
    padding: 1rem;
    color: white;
}

.gallery-item .edit-overlay.active {
    display: flex;
}

.gallery-item .edit-overlay input,
.gallery-item .edit-overlay textarea {
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
}

.gallery-item .edit-buttons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .edit-buttons {
    opacity: 1;
}

.gallery-item .edit-button,
.gallery-item .delete-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.gallery-item .edit-button {
    background: rgba(0, 123, 255, 0.8);
}

.gallery-item .delete-button {
    background: rgba(255, 0, 0, 0.8);
}

.image-upload-box {
    border: 2px dashed var(--primary-color);
    padding: 1rem;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.image-upload-box:hover {
    background-color: rgba(0,0,0,0.05);
}

.image-upload-box i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.image-upload-box.has-image {
    border: none;
    color: white;
}

.image-upload-box.has-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-upload-box.has-image:hover::before {
    opacity: 1;
}

.image-upload-box.has-image i,
.image-upload-box.has-image p {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-upload-box.has-image:hover i,
.image-upload-box.has-image:hover p {
    opacity: 1;
}

.image-upload-box .remove-background {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.image-upload-box:hover .remove-background {
    opacity: 1;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-buttons button {
    flex: 1;
}

.modal-buttons .cancel {
    background: #dc3545;
}

.color-picker-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.color-picker-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-box {
    height: 100px;
    border-radius: 5px;
    margin-top: 1rem;
    border: 1px solid #ddd;
}

/* Promo Editor Styles */
.promo-editor {
    max-width: 500px;
    margin: 0 auto;
}

.promo-editor .image-upload-box {
    height: 120px;
    margin-bottom: 1.5rem;
}

.promo-editor .form-group {
    margin-bottom: 1.5rem;
}

.promo-editor .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.promo-editor .form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.promo-editor .form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.promo-editor .admin-button {
    width: 100%;
    margin-top: 1rem;
}

/* WhatsApp Editor Styles */
.whatsapp-editor {
    max-width: 600px;
    margin: 0 auto;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.message-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.message-item:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
}

.message-item input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.message-item input:focus {
    border-color: var(--primary-color);
    outline: none;
    background: white;
}

.remove-message {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.remove-message:hover {
    background: rgba(220, 53, 69, 0.1);
}

.add-message {
    width: 100%;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f8f8f8;
    color: var(--primary-color);
    border: 2px dashed var(--primary-color);
}

.add-message:hover {
    background: #f0f0f0;
}

#saveWhatsapp {
    width: 100%;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
}

/* Card de Analytics na Dashboard */
.analytics-shortcut {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analytics-shortcut a {
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: 100%;
}

.analytics-shortcut i {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.analytics-shortcut h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.analytics-shortcut p {
    margin: 0;
    text-align: center;
    opacity: 0.9;
}

.analytics-shortcut:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.empty-state,
.error-state {
    text-align: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
    margin: 1rem 0;
}

.empty-state i,
.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.error-state i {
    color: #dc2626;
}

.empty-state p,
.error-state p {
    color: #4b5563;
    margin: 0;
}

.error-state p {
    color: #dc2626;
}

#galleryGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.gallery-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-preview {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.gallery-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-actions {
    opacity: 1;
}

.gallery-actions button {
    background: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-actions button:hover {
    background: var(--primary-color);
    color: white;
}

.gallery-item h3 {
    margin: 1rem;
    font-size: 1rem;
    color: #1f2937;
}

.gallery-item p {
    margin: 0 1rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
} 