/* Basic styles for PlngV2 */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef2f7; /* Lighter background */
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%; /* Slightly wider container */
    max-width: 1200px; /* Max width for large screens */
    margin: 30px auto; /* More vertical margin */
    background-color: #fff;
    padding: 30px; /* More padding */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer, larger shadow */
}

.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't increase width */
}

.login-form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.login-form button:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

/* Admin Page Styles */
.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.admin-tabs .tab-link {
    padding: 10px 15px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
}

.admin-tabs .tab-link.active {
    background-color: #fff;
    border-color: #ddd;
    border-bottom: 1px solid #fff;
    font-weight: bold;
}

.admin-tabs .tab-link:hover:not(.active) {
    background-color: #e9ecef;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.admin-header h2 {
    margin: 0;
    color: #0056b3;
    font-size: 1.8em;
}

.admin-actions {
    display: flex;
    gap: 10px; /* Space between buttons */
    align-items: center;
}

.admin-actions .button {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.admin-actions .dashboard-button {
    background-color: #007bff; /* Blue for dashboard button */
    color: white;
    border: 1px solid #007bff;
}

.admin-actions .dashboard-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.admin-actions .logout-button {
    background-color: #dc3545; /* Red for logout button */
    color: white;
    border: 1px solid #dc3545;
}

.admin-actions .logout-button:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.admin-content {
    padding: 20px 0;
}

.admin-content form {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.admin-content form label {
    display: inline-block;
    width: 150px;
    margin-bottom: 10px;
    font-weight: bold;
}

.admin-content form input[type="text"],
.admin-content form input[type="password"],
.admin-content form select {
    width: calc(100% - 160px);
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.admin-content form input[type="checkbox"] {
    margin-right: 5px;
}

.admin-content form button {
    padding: 8px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.admin-content form button:hover {
    background-color: #218838;
}

.admin-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-content table th,
.admin-content table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

.admin-content table th {
    background-color: #f2f2f2;
}

.admin-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.admin-content table td form {
    border: none;
    padding: 0;
    margin: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.admin-content table td form input[type="text"],
.admin-content table td form input[type="password"],
.admin-content table td form select {
    width: auto;
    margin-right: 5px;
    margin-bottom: 5px;
}

.admin-content table td form button {
    margin-right: 5px;
    margin-bottom: 5px;
}

.success-message {
    color: green;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

/* Dashboard Specific Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.dashboard-header h2 {
    margin: 0;
    color: #0056b3;
    font-size: 1.8em;
}

.dashboard-header p {
    margin: 0;
}

.dashboard-header a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.dashboard-header a:hover {
    text-decoration: underline;
}

.dashboard-actions {
    display: flex;
    gap: 10px; /* Space between buttons */
    align-items: center;
}

.dashboard-actions .button {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.dashboard-actions .admin-button {
    background-color: #28a745; /* Green for admin button */
    color: white;
    border: 1px solid #28a745;
}

.dashboard-actions .admin-button:hover {
    background-color: #218838;
    border-color: #218838;
}

.dashboard-actions .logout-button {
    background-color: #dc3545; /* Red for logout button */
    color: white;
    border: 1px solid #dc3545;
}

.dashboard-actions .logout-button:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.filter-form {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form label {
    font-weight: 600;
    color: #555;
}

.filter-form select,
.filter-form button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    background-color: #fff;
    cursor: pointer;
}

.filter-form select:focus,
.filter-form button:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-form button {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    transition: background-color 0.2s ease;
}

.filter-form button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.table-responsive {
    overflow-x: auto; /* Add horizontal scroll for overflowing content */
    margin-top: 20px;
}

.dashboard-table {
    width: 100%;
    min-width: 800px; /* Ensure table has a minimum width to trigger scroll if needed */
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    white-space: nowrap; /* Prevent wrapping in cells */
}

.dashboard-table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.dashboard-table tbody tr:nth-child(even) {
    background-color: #f8fbfd;
}

.dashboard-table tbody tr:hover {
    background-color: #eef7ff;
}

.dashboard-table .current-user-row {
    background-color: #d4edda; /* Light green for highlighted row */
    font-weight: bold;
    border-left: 4px solid #28a745; /* Green border on the left */
}

.dashboard-table .current-user-row.weekend {
    background-color: #c3e6cb; /* Slightly darker green for weekend highlight */
}

.dashboard-table .weekend {
    background-color: #f0f4f8; /* Lighter gray-blue for weekends */
    color: #a8a8a8;
}

.dashboard-table .weekend.header {
    background-color: #0056b3; /* Darker blue for weekend headers */
}

/* Tooltip for schedule details */
[title]:hover {
    position: relative;
    cursor: help;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    font-size: 0.85em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
