/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Container for the main content */
.container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Headings */
h1, h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Action Links (like buttons) */
.action-link {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 20px 0;
    transition: background-color 0.3s;
}

.action-link:hover {
    background-color: #2980b9;
    color: #fff;
    text-decoration: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

th, td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

thead tr {
    background-color: #3498db;
    color: #ffffff;
    text-align: right;
}

thead th {
    border-bottom: 2px solid #2980b9;
}

tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

/* Forms */
form {
    margin-top: 20px;
    background-color: #fdfdfd;
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 8px;
}

/* Responsive Form Structure */
.responsive-form .form-group {
    margin-bottom: 20px;
}

.responsive-form .form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.responsive-form .cancel-link {
    background-color: #7f8c8d;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
}
.responsive-form .cancel-link:hover { background-color: #6c7a7b; color: white; text-decoration: none; }


form table {
    border: none;
    box-shadow: none;
}

form td {
    border: none;
    padding: 8px 0;
}

label {
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for padding and width */
    margin-top: 5px;
    font-family: inherit;
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

button[type="submit"] {
    background-color: #2ecc71;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #27ae60;
}

/* Filter Form Styles */
.filter-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}
.control-group {
    display: flex;
    flex-direction: column;
}
.control-group label {
    margin-bottom: 5px;
}
.clear-filter {
    background-color: #7f8c8d;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 10px; /* RTL */
}

/* Export Options */
.export-options {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.export-link { margin-left: 15px; } /* RTL */

/* Status & Error Messages */
.success-message, .error-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.success-message { color: #155724; background-color: #d4edda; border: 1px solid #c3e6cb; }
.error-message { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; }