/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial Hebrew', 'David', 'Miriam', 'Times New Roman';
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    min-height: 100vh;
    color: #333;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    font-size: 3rem;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 10px;
    font-weight: bold;
}

.logout-btn {
    position: absolute;
    top: 10px;
    left: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #8B4513;
    border: 2px solid #FFD700;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    direction: rtl;
}

.nav-link {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: #8B4513;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-link:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-link.active {
    background: #FFD700;
    border-color: #8B4513;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 1000;
    direction: rtl;
}

.bottom-nav-link {
    font-size: 0.9rem;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    color: #8B4513;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.bottom-nav-link:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.bottom-nav-link.active {
    background: #FFD700;
    border-color: #8B4513;
}

/* Main content */
main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

/* Homepage styles */
.order-section {
    text-align: center;
}

.start-order-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.start-order-btn:hover {
    background: #A0522D;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.dropdown-container {
    margin: 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.dropdown {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    max-height: 300px; /* Set to 300px */
    overflow-y: auto;
    display: none;
}

.dropdown-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

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

.drink-selection {
    margin: 20px 0;
    display: none;
}

.drink-dropdown {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.drink-dropdown.force-open {
    border-color: #8B4513;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.4);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.quantity-btn {
    background: #8B4513;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #A0522D;
    transform: scale(1.1);
}

.quantity-display {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.send-order-btn {
    background: #228B22;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.send-order-btn:hover {
    background: #32CD32;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Payout page styles */
.payout-section {
    text-align: center;
}

.payout-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Orders table styles */
.orders-table-container {
    margin: 20px 0;
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
}

.orders-table th {
    background: #8B4513;
    color: white;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
}

.orders-table tr:hover:not(.status-paid):not(.status-unpaid) {
    background: #f9f9f9;
}

/* Removed conflicting status-unpaid styles - now handled by table row styling */

.generate-report-btn {
    background: #FF6347;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px; /* Make buttons same width */
}

.generate-report-btn:hover {
    background: #FF4500;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.delete-order-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px; /* Make buttons same width */
}

.delete-order-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Delete order form styles */
.delete-order-form {
    background: #f8f9fa;
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
    text-align: center;
}

.delete-order-form .form-group {
    margin-bottom: 15px;
}

.delete-order-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.delete-order-form input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
}

.delete-order-form input:focus {
    border-color: #dc3545;
    outline: none;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.confirm-delete-btn:hover {
    background: #c82333;
}

.cancel-delete-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cancel-delete-btn:hover {
    background: #5a6268;
}

/* Delete confirmation styles */
.delete-confirmation {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
}

.delete-confirmation p {
    margin-bottom: 15px;
    font-weight: bold;
    color: #856404;
}

.final-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.final-delete-btn:hover {
    background: #c82333;
}

.cancel-final-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cancel-final-btn:hover {
    background: #218838;
}

.report-display {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: left;
    display: none;
}

/* Register page styles */
.register-form {
    max-width: 400px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #8B4513;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.add-client-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.add-client-btn:hover {
    background: #A0522D;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Drinks page styles */
.drinks-section {
    text-align: center;
}

.add-drink-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 20px;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.add-drink-btn:hover {
    background: #A0522D;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.drinks-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.drinks-table th,
.drinks-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.drinks-table th {
    background: #8B4513;
    color: white;
    font-weight: bold;
}

.drinks-table tr:hover {
    background: #f5f5f5;
}

.edit-btn {
    background: #FFA500;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #FF8C00;
    transform: scale(1.05);
}

.save-btn {
    background: #228B22;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #32CD32;
    transform: scale(1.05);
}

.cancel-btn {
    background: #DC143C;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #B22222;
    transform: scale(1.05);
}

/* Form styles */
.drink-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
    direction: rtl;
}

.drink-form input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: right;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* RTL specific styles */
input, textarea, select {
    text-align: right;
    direction: rtl;
}

.drinks-table th,
.drinks-table td {
    text-align: right;
}

.quantity-controls {
    direction: ltr; /* Keep quantity controls LTR for numbers */
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        width: 200px;
        text-align: center;
    }
    
    .bottom-nav {
        bottom: 10px;
        gap: 10px;
    }
    
    .bottom-nav-link {
        font-size: 0.8rem;
        padding: 8px 14px;
    }
    
    main {
        padding: 20px;
        margin-bottom: 80px; /* Add space for bottom nav */
    }
    
    .drinks-table {
        font-size: 0.9rem;
    }
    
    .drinks-table th,
    .drinks-table td {
        padding: 10px 8px;
    }
    
    .drink-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .drink-form input {
        width: 100%;
    }
    
    .orders-table {
        font-size: 0.8rem;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 8px 4px !important;
        font-size: 12px !important;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
        line-height: 1.4 !important;
        text-align: right !important;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .drinks-table {
        font-size: 0.8rem;
    }
    
    .drinks-table th,
    .drinks-table td {
        padding: 8px 4px;
    }
}

/* Client report form styles */
.client-report-form {
    background: #f8f9fa;
    border: 2px solid #17a2b8;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
    text-align: center;
}

.client-report-form .form-group {
    margin-bottom: 15px;
}

.client-report-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.client-report-form input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.client-report-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    min-width: 200px;
}

.client-report-btn:hover {
    background: #138496;
}

.generate-client-report-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.generate-client-report-btn:hover {
    background: #218838;
}

.cancel-client-report-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-client-report-btn:hover {
    background: #5a6268;
}

/* Client orders display styles */
.client-orders-display {
    margin: 20px 0;
}

/* Ensure client orders table has consistent styling */
.client-orders-display .orders-table td {
    font-size: 14px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.4 !important;
    padding: 12px !important;
    text-align: right !important;
}

.client-orders-display .orders-table th {
    font-size: 14px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.4 !important;
    text-align: right !important;
}

/* Override status styling specifically for client orders display */
.client-orders-display .orders-table tr.status-paid td {
    font-size: 14px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.4 !important;
    padding: 12px !important;
    text-align: right !important;
}

.client-orders-display .orders-table tr.status-unpaid td {
    font-size: 14px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.4 !important;
    padding: 12px !important;
    text-align: right !important;
}

.client-summary {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.client-summary h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.client-summary p {
    margin: 5px 0;
    color: #6c757d;
}

/* Removed conflicting status styles - all styling now handled by table-specific rules */

/* Ensure all table cells have consistent styling */
.orders-table td {
    font-size: 14px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.4 !important;
    padding: 12px !important;
    text-align: right !important;
}

/* Status-specific background colors only */
.orders-table tr.status-paid td {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-color: #c3e6cb;
}

.orders-table tr.status-unpaid td {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb;
}

/* Make sure the styling is consistent */
.orders-table tbody tr.status-paid:hover {
    background-color: #c3e6cb !important;
    opacity: 0.9;
}

.orders-table tbody tr.status-unpaid:hover {
    background-color: #f5c6cb !important;
    opacity: 0.9;
}

/* Events page styles */
.events-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.event-form {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.event-form h3 {
    color: #8B4513;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.event-form .form-group {
    margin-bottom: 20px;
}

.event-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #8B4513;
    font-size: 1.1rem;
}

.event-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.event-form input:focus {
    outline: none;
    border-color: #8B4513;
}

.submit-event-btn {
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: bold;
}

.submit-event-btn:hover {
    background: linear-gradient(135deg, #D2691E 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.events-list {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.events-list h3 {
    color: #8B4513;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.events-table th,
.events-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.events-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #8B4513;
    border-bottom: 2px solid #8B4513;
}

.events-table tr:hover {
    background: #f8f9fa;
}

.events-table tr:last-child td {
    border-bottom: none;
}
