body {
    direction: rtl;
    text-align: right;
    font-family: "Open Sans", Secular One;
    padding: 0;
    margin: 0;
}

h1 {
    text-align: center;
}

form {
    margin: 20px auto;
    width: 50%;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form div {
    margin-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* Enhanced form styling for registration and login */
.registration-form, .login-form {
    max-width: 500px;
    width: 90%;
}

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

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

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

.form-group input[type="email"]:invalid,
.form-group input[type="tel"]:invalid {
    border-color: #dc3545;
}

.form-group input[type="password"] {
    letter-spacing: 2px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/*
button:hover {
    background-color: #0056b3;
}*/

a {
    display: block;
    text-align: center;
    margin-top: 20px;
}

nav {
    text-align: center;
    margin-bottom: 20px;
}

/* Admin Dashboard Styles */
.admin-section {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.error-box {
    color: #c0392b;
    background: #fbeee6;
    border: 1px solid #e74c3c;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.success-box {
    color: #155724;
    background: #d4edda;
    border: 1px solid #28a745;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.admin-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.admin-actions a {
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    color: white;
}

.profile-link {
    background: #28a745;
}

.profile-link:hover {
    background: #218838;
}

.user-dashboard-link {
    background: #17a2b8;
}

.user-dashboard-link:hover {
    background: #138496;
}

.admin-actions a:last-child {
    background: #dc3545;
}

.admin-actions a:last-child:hover {
    background: #c82333;
}

.add-form {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.add-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-form button {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 50%;
}

.add-form button:hover {
    background: #218838;
}

.items-list {
    border: 1px solid #eee;
    border-radius: 4px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
}

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

.item-name {
    font-weight: 500;
}

.item-order {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    min-width: 30px;
    text-align: center;
}

.message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-actions {
    display: flex;
    gap: 8px;
}

.edit-btn, .delete-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn {
    background: #ffc107;
    color: #000;
}

.edit-btn:hover {
    background: #e0a800;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

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

.edit-form {
    display: block !important;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

.edit-form input {
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    flex: 1;
}

.edit-form button {
    margin-left: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 20%;
}

.save-btn {
    background: #28a745;
    color: white;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.edit-form-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Calendar Form Styles */
.calendar-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.calendar-form input[type="date"],
.calendar-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.calendar-form select {
    min-width: 150px;
}

.calendar-form button {
    width: auto;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.calendar-form button:hover {
    background: #218838;
}

/* Calendar Table Styles */
.calendar-table {
    margin-top: 15px;
    overflow-x: auto;
}

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

.calendar-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: right;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

.calendar-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: right;
}

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

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

/* Calendar Edit Form Styles */
.calendar-edit-form {
    background: #f8f9fa !important;
    border: 2px solid #007bff !important;
    border-radius: 4px;
    padding: 10px !important;
}

.calendar-edit-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.calendar-edit-date,
.calendar-edit-holiday {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.calendar-edit-holiday {
    min-width: 150px;
}

.calendar-edit-container .save-btn,
.calendar-edit-container .cancel-btn {
    width: auto;
    padding: 8px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.calendar-edit-container .save-btn {
    background: #28a745;
    color: white;
}

.calendar-edit-container .cancel-btn {
    background: #6c757d;
    color: white;
}

.calendar-edit-container .save-btn:hover {
    background: #218838;
}

.calendar-edit-container .cancel-btn:hover {
    background: #5a6268;
}

/* Responsive Design for Calendar */
@media (max-width: 768px) {
    .calendar-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-form input[type="date"],
    .calendar-form select,
    .calendar-form button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .calendar-edit-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-edit-date,
    .calendar-edit-holiday,
    .calendar-edit-container .save-btn,
    .calendar-edit-container .cancel-btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .calendar-table {
        font-size: 14px;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 8px;
    }
}

/* User Dashboard Holiday Select Styles */
.user-section select[name="holiday_date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
    margin-bottom: 10px;
}

.user-section select[name="holiday_date"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

.user-section select[name="holiday_date"] option {
    padding: 8px;
    font-size: 14px;
}

/* Enhanced table styling for user files */
.user-section table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-section table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: right;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

.user-section table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: right;
}

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

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

.user-section table img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.user-section table a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.user-section table a:hover {
    text-decoration: underline;
}

.user-section table button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.user-section table button:hover {
    background: #c82333;
}

/* Admin Tab Navigation Styles */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: #e9ecef;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    border-right: 1px solid #dee2e6;
    text-align: center;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background: #dee2e6;
    color: #212529;
}

.tab-btn.active {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.tab-btn.active:hover {
    background: #0056b3;
}

/* Tab Content Styles */
.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Tab Design */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-btn {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        text-align: right;
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
    
    .tab-btn.active {
        background: #007bff;
        color: white;
    }
}

/* Users Table Styles */
.users-table {
    margin-top: 20px;
    overflow-x: auto;
}

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

.users-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 15px 12px;
    text-align: right;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.users-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    font-size: 14px;
}

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

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

/* User Role Badges */
.user-role {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.admin-role {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.user-role {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* User Action Buttons */
.users-table .edit-btn,
.users-table .delete-btn,
.users-table .toggle-admin-btn {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.users-table .edit-btn {
    background: #17a2b8;
    color: white;
}

.users-table .edit-btn:hover {
    background: #138496;
}

.users-table .delete-btn {
    background: #dc3545;
    color: white;
}

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

.users-table .toggle-admin-btn {
    background: #6c757d;
    color: white;
}

.users-table .toggle-admin-btn:hover {
    background: #5a6268;
}

.users-table .toggle-admin-btn.make-admin {
    background: #28a745;
}

.users-table .toggle-admin-btn.make-admin:hover {
    background: #218838;
}

.users-table .toggle-admin-btn.remove-admin {
    background: #ffc107;
    color: #212529;
}

.users-table .toggle-admin-btn.remove-admin:hover {
    background: #e0a800;
}

/* User Edit Form */
.user-edit-form {
    background: #f8f9fa !important;
    padding: 20px !important;
}

.user-edit-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.user-edit-container input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.user-edit-container .save-btn,
.user-edit-container .cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-edit-container .save-btn {
    background: #28a745;
    color: white;
}

.user-edit-container .save-btn:hover {
    background: #218838;
}

.user-edit-container .cancel-btn {
    background: #6c757d;
    color: white;
}

.user-edit-container .cancel-btn:hover {
    background: #5a6268;
}

/* Responsive Users Table */
@media (max-width: 768px) {
    .users-table {
        font-size: 12px;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px 6px;
    }
    
    .user-edit-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-edit-container input {
        min-width: auto;
        width: 100%;
    }
    
    .users-table .edit-btn,
    .users-table .delete-btn,
    .users-table .toggle-admin-btn,
    .users-table .toggle-active-btn {
        padding: 4px 8px;
        font-size: 11px;
        margin: 1px;
    }
}

/* User Status Styles */
.user-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.active-status {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.inactive-status {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.verified {
    color: #28a745;
    font-weight: bold;
}

.not-verified {
    color: #dc3545;
    font-weight: bold;
}

/* Toggle Active Button Styles */
.toggle-active-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 2px;
}

.toggle-active-btn.activate {
    background: #28a745;
    color: white;
}

.toggle-active-btn.activate:hover {
    background: #218838;
}

.toggle-active-btn.deactivate {
    background: #dc3545;
    color: white;
}

.toggle-active-btn.deactivate:hover {
    background: #c82333;
}

/* Password Toggle Eye Icon */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 45px;
}

.toggle-password-btn {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    transition: color 0.2s ease;
    z-index: 10;
    width: 10%;
}

.toggle-password-btn:hover {
    color: #007bff;
}

.toggle-password-btn:focus {
    outline: none;
}

.eye-icon {
    display: inline-block;
    user-select: none;
}

/* General Settings Styles */
.setting-form-group {
    margin-bottom: 30px;
}

.setting-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
    font-size: 16px;
}

.setting-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.setting-input-group input[type="number"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    max-width: 200px;
}

.setting-input-group input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.save-setting-btn {
    padding: 10px 25px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.save-setting-btn:hover {
    background: #218838;
}

.save-setting-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.setting-description {
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}
