/* style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    direction: rtl;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.branding-logo {
    display: block;
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto 20px;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
}

p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="file"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

button, .button-link {
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

button:hover, .button-link:hover {
    background-color: #2980b9;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

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

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

.conditional-fields { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc; }
fieldset { border: 1px solid #ddd; padding: 15px 20px; border-radius: 5px; margin-bottom: 20px; }
legend { font-weight: bold; color: #34495e; padding: 0 10px; }

/* Admin Header & Navigation Buttons */
.header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; }
.header-nav { display: flex; gap: 10px; align-items: center; }
.header-nav a, .header-nav button.nav-link { 
    text-decoration: none; 
    color: white; 
    padding: 8px 15px; 
    border-radius: 4px; 
    font-size: 14px; 
    width: auto;
    border: none; /* for button */
    cursor: pointer; /* for button */
    font-family: inherit; /* for button */
    line-height: inherit; /* for button */
}
.nav-link { background-color: #3498db; }
.logout-link { background-color: #e74c3c; }
.nav-link:hover, .logout-link:hover { color: white; }
.nav-link.active { background-color: #2980b9; font-weight: bold; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: 20px; table-layout: fixed; }
th, td { border: 1px solid #ddd; padding: 12px; text-align: right; word-wrap: break-word; }
th { background-color: #f2f2f2; }
tr:nth-child(even) { background-color: #f9f9f9; }
.status-pending { font-weight: bold; color: #ff8c00; }
.status-approved { font-weight: bold; color: #28a745; }
.status-rejected { font-weight: bold; color: #dc3545; }
.action-links a { margin-left: 10px; text-decoration: none; }
.sortable-row { cursor: grab; }
.sortable-row:active { cursor: grabbing; }
.visibility-toggle { cursor: pointer; padding: 5px 10px; border-radius: 4px; color: white; user-select: none; }
.visible { background-color: #28a745; } 
.hidden { background-color: #6c757d; }

/* Print Styles */
@media print {
    body {
        background-color: #fff;
        padding: 0;
        margin: 0;
    }
    .container {
        box-shadow: none;
        border: none;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .header, .header-nav, button, .action-links, th:last-child, td:last-child, form, fieldset, .logout-link, .nav-link {
        display: none !important;
    }
    table, th, td {
        border: 1px solid #ccc;
    }
    h1 {
        text-align: right;
        padding-bottom: 10px;
        border-bottom: 2px solid #000;
        font-size: 24px;
    }
    tr {
        page-break-inside: avoid;
    }
}