body {
    overflow-y: auto;
    height: 100vh;
}

.admin-container {
    min-height: 100vh;
    background: #f0f2f5;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    overflow-y: auto;
    height: 100vh;
}

.admin-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
    color: #050505;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #c82333;
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #0F5132;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #050505;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 14px;
    color: #65676b;
}

.admin-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 20px;
    color: #050505;
}

.rates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.rate-card {
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Products Admin Styles */
.products-admin-container {
    margin-top: 1rem;
}

.products-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-admin-card {
    background: white;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product-admin-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-admin-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-admin-name {
    font-size: 16px;
    font-weight: 600;
    color: #050505;
    text-align: center;
}

.product-admin-name-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.product-admin-name-input label {
    font-size: 12px;
    color: #65676b;
}

.product-admin-name-input input {
    padding: 0.5rem;
    border: 2px solid #e4e6eb !important;
    border-radius: 6px;
    font-size: 14px;
    width: 100% !important;
    background: white !important;
    color: #050505 !important;
    cursor: text !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.product-admin-name-input input:focus {
    outline: none !important;
    border-color: #0F5132 !important;
    box-shadow: 0 0 0 2px rgba(15, 81, 50, 0.1) !important;
    background: #fff !important;
}

.product-admin-price-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-admin-price-input label {
    font-size: 12px;
    color: #65676b;
}

.product-admin-price-input input {
    padding: 0.5rem;
    border: 1px solid #e4e6eb;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.product-admin-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: #65676b;
}

.product-admin-status input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.save-product-btn {
    background: #0F5132;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.save-product-btn:hover {
    background: #0a3d23;
}

.rate-card h3 {
    margin: 0 0 1rem 0;
    font-size: 18px;
    color: #050505;
}

.rate-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rate-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rate-form label {
    font-size: 14px;
    font-weight: 600;
    color: #050505;
}

.rate-form input {
    padding: 0.75rem;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.rate-form input:focus {
    outline: none;
    border-color: #0F5132;
}

.save-btn {
    background: #0F5132;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    position: relative;
    min-width: 100px;
}

.save-btn:hover:not(:disabled) {
    background: #0a3d23;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.save-btn:active:not(:disabled) {
    transform: translateY(0);
}

.save-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.save-btn.saving {
    background: #42b72a;
}

.save-btn.success {
    background: #42b72a;
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: #f0f2f5;
}

.data-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #050505;
    border-bottom: 2px solid #e4e6eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e4e6eb;
    color: #65676b;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.admin {
    background: #0F5132;
    color: white;
}

.status-badge.user {
    background: #65676b;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.export-btn {
    background: #42b72a;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.export-btn:hover {
    background: #36a420;
}

.action-btn {
    background: #0F5132;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #0a3d23;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e4e6eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #050505;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #65676b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: #f0f2f5;
}

.modal-body {
    padding: 1.5rem;
}

/* Online Services Grid */
.online-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px solid #e4e6eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.service-item.active {
    background: #e8f5e9;
    border-color: #4caf50;
}

.service-item.inactive {
    background: #ffebee;
    border-color: #f44336;
}

.service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.service-name {
    font-size: 14px;
    font-weight: 600;
    color: #050505;
    margin-bottom: 0.5rem;
    text-align: center;
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.service-status.active {
    background: #4caf50;
    color: white;
}

.service-status.inactive {
    background: #f44336;
    color: white;
}

@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .rates-container {
        grid-template-columns: 1fr;
    }
}

