/* General styles */

body {
    margin: 10px;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f8f9fa;
}

.container {
    width: calc(100% - 20px);
    max-width: none;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Header styles */
.form-header {
    background-color: #37908C;
    color: white;
    padding: 5px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    height: 75px;
}

.form-header img {
    height: 50px;
    margin-right: 15px;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

/* Table styles for Activities Section */
#activitiesContainer {
    overflow-x: auto;
    /* Add horizontal scroll for table on small screens */
}

.activities-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.activities-table th,
.activities-table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    /* Reduced padding */
    vertical-align: top;
    text-align: left;
    font-size: 0.85rem;
    /* Smaller font for table content */
}

.activities-table th {
    background-color: #e9ecef;
    font-weight: 600;
    white-space: nowrap;
    /* Prevent headers from wrapping */
}

.activities-table tbody tr:nth-child(even) {
    background-color: #e3eef9;
    /* Zebra striping */
}

.activities-table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
    /* Zebra striping */
}

.activities-table tbody tr:hover {
    background-color: #deecfc;
}

.activities-table .form-select,
.activities-table .form-control {
    width: 100%;
    padding: 0.25rem 0.5rem;
    /* Smaller padding for inputs */
    font-size: 0.85rem;
    /* Smaller font for inputs */
    min-height: 32px;
    /* Ensure consistent height */
    box-sizing: border-box;
}

/* Specific column widths for the table */
.activities-table th.col-lob,
.activities-table td.col-lob {
    width: 10%;
}

.activities-table th.col-process,
.activities-table td.col-process {
    width: 10%;
}

.activities-table th.col-sub-process,
.activities-table td.col-sub-process {
    width: 10%;
}

.activities-table th.col-activity,
.activities-table td.col-activity {
    width: 10%;
}

.activities-table th.col-activity-type,
.activities-table td.col-activity-type {
    width: 10%;
}

.activities-table th.col-technology,
.activities-table td.col-technology {
    width: 10%;
}

.activities-table th.col-time-taken,
.activities-table td.col-time-taken {
    width: 5%;
}

.activities-table th.col-planned-time,
.activities-table td.col-planned-time {
    width: 5%;
}

.activities-table th.col-status,
.activities-table td.col-status {
    width: 10%;
}

.activities-table th.col-comment,
.activities-table td.col-comment {
    width: 5%;
    text-align: center;
}

.activities-table th.col-action,
.activities-table td.col-action {
    width: 5%;
    text-align: center;
}

#timesheetTable tbody td {
    /* For historical report table */
    font-size: 0.85rem;
}

/* Button styles */
.btn-submit {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

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

.form-section {
    margin-top: 20px;
}

.table-responsive {
    /* For historical report table */
    margin-top: 15px;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    /* Adjust padding for better click area */
    display: inline-flex;
    /* Helps with alignment */
    align-items: center;
}

.btn-remove:hover {
    color: #bd2130;
}

.edit-btn {
    background: none;
    border: none;
    color: #5135dc;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    /* Adjust padding for better click area */
    display: inline-flex;
    /* Helps with alignment */
    align-items: center;
}

.edit-btn:hover {
    background: none;
    border: none;
    color: #4521bd;
}

.bg-user {
    background-color: #eaf4ff;
    /* Soft light blue */
    border: 1px solid #cce5ff;
}

.bg-activities {
    background-color: #eaf4ff;
    /* Soft warm beige/orange */
    border: 1px solid #cce5ff;
}

.shadow-sm {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.rounded {
    border-radius: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.powered-by {
    position: fixed;
    bottom: 10px;
    right: 15px;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    z-index: 1000;
}

.wns-logo {
    height: 20px;
    margin-left: 6px;
}

/* Compact user info badge - top right */
#userInfoBadge {
    position: fixed;
    top: 50px;
    right: 50px;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
}
#userInfoBadge i {
    color: #007bff;
    font-size: 1rem;
}

/* login page styles */
.login-body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.logo {
    max-width: 180px;
    margin-bottom: 20px;
}
.login-box h2 {
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}
.login-box label {
    display: block;
    text-align: left;
    margin: 15px 0 5px;
    font-weight: 500;
    color: #555;
}
.login-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}
.login-box button {
    width: 100%;
    padding: 12px;
    margin: 20px 0 10px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.login-box .btn-basic {
    background-color: #007bff;
    color: white;
}
.login-box .btn-basic:hover {
    background-color: #0056b3;
}
.login-box .btn-saml {
    background-color: #28a745;
    color: white;
}
.login-box .btn-saml:hover {
    background-color: #218838;
}
.login-box .error {
    color: #d9534f;
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    padding: 12px;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 14px;
}
.login-box .powered-by {
    margin-top: 30px;
    font-size: 14px;
    color: #777;
}
.login-box .powered-by img {
    height: 24px;
    vertical-align: middle;
    margin-left: 8px;
}

/* Edit Timesheet Modal — visual polish and disabled control appearance */
#editTimesheetModal .modal-header {
  background: #eaf4ff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
#editTimesheetModal .modal-title {
  color: #1f2937; /* dark title color */
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: 0.2px;
}

/* Disabled / readonly controls should look readable and not faded */
#editTimesheetModal .modal-body .form-control:disabled,
#editTimesheetModal .modal-body .form-select:disabled,
#editTimesheetModal .modal-body textarea:disabled,
#editTimesheetModal .modal-body .form-control[readonly],
#editTimesheetModal .modal-body .form-select[readonly],
#editTimesheetModal .modal-body textarea[readonly] {
  background-color: #e9ecef;   /* visible disabled background */
  color: #495057;              /* readable text color */
  opacity: 1 !important;       /* override Bootstrap reduced opacity */
  border-color: #ced4da;
  cursor: not-allowed;
  box-shadow: none;
}

/* Placeholder color for disabled inputs */
#editTimesheetModal .modal-body .form-control:disabled::placeholder,
#editTimesheetModal .modal-body textarea:disabled::placeholder {
  color: #6c757d;
}

/* Slight inset for readonly fields for clarity */
#editTimesheetModal .modal-body .form-control[readonly],
#editTimesheetModal .modal-body .form-select[readonly] {
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

/* Labels and body spacing */
#editTimesheetModal .modal-body .form-label {
  font-weight: 500;
  color: #343a40;
}

/* Footer separation and button sizing */
#editTimesheetModal .modal-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
}
#editTimesheetModal .modal-footer .btn {
  min-height: 38px;
}

/* Emphasize auto-filled / locked items (used by JS via class toggles) */
#editTimesheetModal .modal-body .auto-filled,
#editTimesheetModal .modal-body .locked {
  border-left: 3px solid #ffc107;
  padding-left: 0.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.01));
}

/* Consistent control sizing & improved focus */
#editTimesheetModal .modal-body .form-control,
#editTimesheetModal .modal-body .form-select,
#editTimesheetModal .modal-body textarea.form-control {
  min-height: calc(1.5em + .75rem + 2px);
}
#editTimesheetModal .modal-body .form-control:focus,
#editTimesheetModal .modal-body .form-select:focus,
#editTimesheetModal .modal-body textarea.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 .15rem rgba(0,123,255,0.12);
  outline: none;
}

/* Small helper text style for the modal if needed */
#editTimesheetModal .helper-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* fix for multiselect dropdown */
#editTechnology.form-select.dropdown-toggle::after {
    content: none;
}

.dropdown-menu {
  max-height: 250px;
  overflow-y: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-item input[type="checkbox"] {
  margin-right: 8px;
}

.required-field::after {
    content: " *";
    color: red;
}
