/* styles.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

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

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.form-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

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

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    resize: vertical;
}

input[type="file"] {
    padding: 10px 0;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 5px;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.5);
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
    text-align: center;

}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.5);
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
    text-align: center;

}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Admin Panel Styles */
.admin-header {
    background-color: #34495e;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

/* Styles for admin_create_job.php */
.admin-create-job-container {
    margin-left: 220px;
    padding: 30px 40px;
    background-color: #ecf0f1;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    box-sizing: border-box;
}

/* Styles for admin_settings.php */
.admin-settings-container {
    margin-left: 220px;
    padding: 30px 40px;
    background-color: #ecf0f1;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    box-sizing: border-box;
}

.admin-settings-form {
    background-color: #fff;
    padding: 30px 35px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.admin-settings-form h1,
.admin-settings-form h3 {
    margin-bottom: 25px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 28px;
}

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

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

.admin-settings-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.admin-settings-form input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
}

.admin-settings-form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.admin-settings-form button:hover {
    background-color: #2980b9;
    box-shadow: 0 6px 12px rgba(41, 128, 185, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-settings-container {
        margin-left: 0;
        padding: 20px;
    }
    .admin-settings-form {
        padding: 20px;
        max-width: 100%;
    }
}

.admin-create-job-form {
    background-color: #fff;
    padding: 30px 35px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.admin-create-job-form h1 {
    margin-bottom: 25px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 28px;
}

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

.admin-create-job-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.admin-create-job-form input[type="text"],
.admin-create-job-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.admin-create-job-form input[type="text"]:focus,
.admin-create-job-form select:focus {
    border-color: #3498db;
    outline: none;
}

.admin-create-job-form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.admin-create-job-form button:hover {
    background-color: #2980b9;
    box-shadow: 0 6px 12px rgba(41, 128, 185, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-create-job-container {
        margin-left: 0;
        padding: 20px;
    }
    .admin-create-job-form {
        padding: 20px;
        max-width: 100%;
    }
}

.admin-nav {
    background-color: #2c3e50;
    padding: 15px;
    margin-bottom: 30px;
    display:flex;
}

.admin-nav ul {
    list-style: none;
    display: flex;
}

.admin-nav ul li {
    margin-right: 20px;
}

.admin-nav ul li a {
    color: blue;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.admin-nav ul li a:hover {
    opacity: 0.8;
}

.admin-content {
    padding: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    /* Use auto layout to adjust columns to content */
    table-layout: auto;
    white-space: nowrap;
}

.admin-table {
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    color: #2c3e50;
}

.admin-table td:nth-child(2) {
    font-size: 16px;
    font-weight: 600;
}

/* Set fixed widths for columns */
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    width: 5%;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 15%;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 20%;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    width: 20%;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    width: 15%;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
    width: 10%;
}

.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
    width: 5%;
}

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

.admin-table th {
    background-color: #f2f2f2;
    font-weight: 700;
    font-size: 15px;
    color: #34495e;
    padding: 10px 12px;
}

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

.action-buttons {
    display: flex;
    gap: 10px;
}

.view-btn,
.delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-btn {
    background-color: #3498db;
    color: white;
}

.view-btn:hover {
    background-color: #2980b9;
}

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

.delete-btn:hover {
    background-color: #c0392b;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: #3498db;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color 0.3s;
    border: 1px solid #ddd;
    margin: 0 4px;
}

.pagination a.active {
    background-color: #3498db;
    color: white;
    border: 1px solid #3498db;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* Form validation styles */
.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: #e74c3c;
}

/* Success message */
.success-message {
    background-color: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Error message */
.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Admin View Application Page Enhancements */
.admin-view-container {
    margin-left: 220px;
    padding: 30px 40px;
    background-color: #f7f9fc;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .admin-view-container {
        margin-left: 0;
        padding: 20px;
    }
}

.admin-view-header {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #34495e;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.action-buttons .btn {
    padding: 12px 22px;
    font-size: 15px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.action-buttons .btn:hover {
    background-color: #2980b9;
    box-shadow: 0 6px 12px rgba(41, 128, 185, 0.5);
}

.success-update {
    background-color: #27ae60;
    color: white;
    padding: 18px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.5);
}

.application-details {
    background-color: white;
    border-radius: 10px;
    padding: 30px 35px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.application-details h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

.application-details p {
    font-size: 16px;
    margin-bottom: 8px;
    color: #555;
}

.detail-section {
    margin-top: 25px;
}

.detail-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    color: #34495e;
}

.detail-row {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 15px;
    align-items: center;
}

.detail-label {
    width: 140px;
    font-weight: 700;
    color: #34495e;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.detail-value {
    flex: 1;
    font-size: 16px;
    color: #555;
    white-space: normal;
    display: inline-block;
    vertical-align: middle;
    overflow-wrap: break-word;
    white-space: normal;
}

.resume-download {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.resume-download:hover {
    background-color: #2980b9;
    box-shadow: 0 5px 10px rgba(41, 128, 185, 0.6);
}

.status-update-form {
    background-color: white;
    border-radius: 10px;
    padding: 25px 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.status-update-form h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #34495e;
}

.status-update-form .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.status-update-form .form-group {
    flex: 1 1 250px;
    min-width: 200px;
}

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

.status-update-form select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.status-update-form select:focus {
    border-color: #3498db;
    outline: none;
}

.status-update-form button {
    padding: 12px 28px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-update-form button:hover {
    background-color: #2980b9;
    box-shadow: 0 6px 12px rgba(41, 128, 185, 0.6);
}

@media (max-width: 768px) {
    .detail-label {
        width: 140px;
    }
    .status-update-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .status-update-form .form-group {
        min-width: 100%;
    }
    .status-update-form button {
        width: 100%;
    }
}

/* Sidebar and main content layout for admin panel */
.sidebar {
    width: 220px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    position: fixed;
    height: 100vh;
    transition: width 0.3s ease;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    border-left: 4px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #34495e;
    border-left: 4px solid #3498db;
}

.sidebar ul li a .icon {
    font-size: 18px;
    min-width: 20px;
    text-align: center;
}

/* Hide text when sidebar is collapsed */
.sidebar.collapsed ul li a span.text {
    display: none;
}

.main-content {
    margin-left: 220px;
    padding: 15px 20px;
    flex-grow: 1;
    background-color: #ecf0f1;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 60px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        width: 220px;
        height: 100vh;
        left: -220px;
        top: 0;
        transition: left 0.3s ease;
    }
    .sidebar.active {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .sidebar.collapsed {
        width: 220px;
    }
}

/* Dashboard stat cards */
.dashboard-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px 30px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1 1 220px;
    max-width: 250px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    margin-top: 0;
    color: #7f8c8d;
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
}

/* Responsive adjustments for dashboard stats */
@media (max-width: 600px) {
    .dashboard-stats {
        justify-content: center;
        gap: 20px;
    }
    .stat-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Recent applications */
.recent-applications {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 40px 0 30px 0; /* Added top margin for spacing from export buttons */
}
.dashboard-actions {
    margin-bottom: 30px; /* Ensure bottom margin for spacing from department heading */
}

/* Action buttons */
.action-buttons button {
    transition: background-color 0.3s ease;
}

/* Dashboard export buttons container */
.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0 40px 0; /* Added more vertical margin for spacing */
    justify-content: flex-start;
}

/* Adjust export buttons */
.dashboard-actions .btn {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
}

.view-btn:hover {
    background-color: #2980b9;
}

.delete-btn:hover {
    background-color: #c0392b;
}
/* Adjust filter form in admin_applications.php to two rows with smaller widths */
.filter-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.bulk-actions label {
    margin: 0;
    white-space: nowrap;
}

.bulk-actions select {
    min-width: 150px;
}

.bulk-actions button {
    padding: 8px 16px;
    cursor: pointer;
}

.filter-form .form-group {
    flex: 1 1 48%;
    min-width: 150px;
}

/* Styles for status filter options in admin_applications.php */
.status-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-filters .status-option {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.status-filters .status-option:hover {
    background-color: #2980b9;
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.5);
}

.status-filters .status-option.active {
    background-color: #1c5980;
    box-shadow: 0 6px 12px rgba(28, 89, 128, 0.7);
}

/* Adjust specific form groups to reduce width */
.filter-form .form-group:nth-child(3), /* status */
.filter-form .form-group:nth-child(4), /* from date */
.filter-form .form-group:nth-child(5)  /* to date */ {
    flex: 1 1 30%;
    min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-settings-container {
        margin-left: 0;
        padding: 20px;
    }
    .admin-settings-form {
        padding: 20px;
        max-width: 100%;
    }
}

/* Align export and bulk action buttons in one row */
.bulk-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.bulk-actions label {
    margin: 0 15px 0 5px;
    user-select: none;
    -webkit-user-select: none; /* Safari 3+ */
    white-space: nowrap;
}

.bulk-actions select {
    min-width: 150px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
}

.bulk-actions button {
    height: 36px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    background-color: #28a745;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bulk-actions button:hover {
    background-color: #218838;
}

/* Styles for admin login page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Align export buttons in one row */
.action-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-actions a.btn {
    flex: none;
}
