/* Admin panel CSS styles for Rolling N Dough */

/* Admin-specific styles */
.admin-login {
    max-width: 500px;
    margin: 50px auto;
    background-color: #111111;
    border-radius: 8px;
    padding: 30px;
}

.login-form {
    margin-top: 20px;
}

.error-message {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff6b6b;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.admin-button {
    background: linear-gradient(to right, #4D9DE0, #3A75C4);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.admin-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.admin-button.cancel-button {
    background: linear-gradient(to right, #666, #444);
}

.admin-dashboard {
    margin: 30px 0;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-button {
    background-color: transparent;
    color: #ccc;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    color: white;
}

.tab-button.active {
    color: #4D9DE0;
    border-bottom: 3px solid #4D9DE0;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Orders tab */
.order-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-button {
    background-color: #222;
    color: #ccc;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: #333;
}

.filter-button.active {
    background-color: #4D9DE0;
    color: white;
}

.orders-container {
    margin-bottom: 30px;
}

.order-card {
    background-color: #222;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.order-card:hover {
    background-color: #2a2a2a;
}

.order-info {
    flex: 1;
}

.order-id {
    font-weight: bold;
    color: #4D9DE0;
}

.order-customer {
    margin: 5px 0;
}

.order-time {
    font-size: 0.9em;
    color: #999;
}

.order-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-new {
    background-color: #4D9DE0;
    color: white;
}

.status-preparing {
    background-color: #FF8C42;
    color: white;
}

.status-ready {
    background-color: #3ED598;
    color: white;
}

.status-completed {
    background-color: #666;
    color: white;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Menu Management Tab */
.menu-section {
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.menu-section h4 {
    margin-top: 0;
    color: #4D9DE0;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.price-editor, .menu-item-editor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.options-list {
    margin-bottom: 15px;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.option-name {
    font-weight: bold;
}

.option-price {
    color: #4D9DE0;
}

.option-actions {
    display: flex;
    gap: 10px;
}

.option-edit, .option-delete, .option-toggle {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-edit:hover, .option-toggle:hover {
    color: #4D9DE0;
}

.option-delete:hover {
    color: #ff6b6b;
}

.option-unavailable {
    opacity: 0.5;
}

/* Location Tab */
.location-editor {
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.location-history {
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
}

.location-item {
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.location-date {
    font-size: 0.9em;
    color: #999;
}

/* Marketing Tab */
.email-list-container {
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
}

.email-count {
    margin-bottom: 15px;
}

.email-actions {
    margin-bottom: 15px;
}

.email-item {
    padding: 10px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
}

.email-date {
    color: #999;
    font-size: 0.9em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: #222;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #ccc;
}

.close-modal:hover {
    color: white;
}

#order-details-container {
    margin-bottom: 20px;
}

.order-detail-section {
    margin-bottom: 15px;
}

.order-detail-section h4 {
    color: #4D9DE0;
    margin-bottom: 5px;
}

.order-items {
    background-color: #333;
    border-radius: 4px;
    padding: 10px;
}

.order-item {
    padding: 5px 0;
    border-bottom: 1px solid #444;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    font-weight: bold;
    color: #4D9DE0;
    margin-top: 10px;
    text-align: right;
}

.special-instructions {
    background-color: #333;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-style: italic;
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Responsive styles */
@media (max-width: 768px) {
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1 0 auto;
        text-align: center;
    }
    
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .order-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-actions {
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }
}
