/* General & Login Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root { --primary-text: #2c3e50; --secondary-text: #7f8c8d; --border-color: #dfe4ea; --background-color: #f4f7f9; --accent-blue: #007bff; --accent-green: #28a745; --accent-orange: #fd7e14; --accent-red: #dc3545; --font-family: 'Inter', sans-serif; --shadow: 0 4px 20px rgba(0, 0, 0, 0.07); }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); background-color: var(--background-color); color: var(--primary-text); line-height: 1.6; }
.form-wrapper { width: 100%; max-width: 400px; background: #ffffff; border-radius: 12px; box-shadow: var(--shadow); padding: 2.5rem; text-align: center; }
.login-wrapper { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.logo { width: 70px; margin-bottom: 1rem; }
.form-wrapper h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.form-wrapper p { color: var(--secondary-text); font-size: 1.1rem; margin-bottom: 1.5rem; }
.input-group { margin-bottom: 1.5rem; text-align: left; }
.input-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.input-group input { width: 100%; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 1rem; }
.btn-submit { padding: 0.8rem 1.8rem; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; background-color: var(--accent-blue); color: white; position: relative; min-width: 120px; transition: all 0.3s; width: 100%; }
.error-message { color: var(--accent-red); height: 1.2rem; margin-top: 1rem; }

/* Dashboard Layout */
.dashboard-container { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: #2c3e50; color: white; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 1.5rem; text-align: center; border-bottom: 1px solid #34495e; }
.sidebar-header h2 { margin-top: 10px; }
.sidebar-nav { flex-grow: 1; padding: 1rem 0; }
.nav-link { display: flex; align-items: center; padding: 1rem 1.5rem; color: #bdc3c7; text-decoration: none; transition: all 0.3s; }
.nav-link i { margin-right: 15px; width: 20px; text-align: center; }
.nav-link:hover, .nav-link.active { background: #34495e; color: white; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid #34495e; }

.main-content { flex-grow: 1; padding: 2rem; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.job-selector select { padding: 0.5rem; border-radius: 5px; border: 1px solid var(--border-color); }

/* Widgets & Tables */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.widget { display: flex; align-items: center; background: white; padding: 1.5rem; border-radius: 8px; box-shadow: var(--shadow); }
.widget-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; margin-right: 1rem; }
.widget-icon.blue { background: var(--accent-blue); } .widget-icon.green { background: var(--accent-green); } .widget-icon.orange { background: var(--accent-orange); } .widget-icon.red { background: var(--accent-red); }
.widget-value { font-size: 2rem; font-weight: 700; }
.widget-label { color: var(--secondary-text); }

.round-container { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.round-column { background: white; border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.round-header { padding: 1rem 1.5rem; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.round-header h2 { font-size: 1.2rem; }
.candidate-count { background: #ecf0f1; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; }
.table-controls { padding: 1rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; }
.search-box { padding: 0.5rem; border-radius: 5px; border: 1px solid var(--border-color); flex-grow: 1; }
.export-buttons { display: flex; gap: 0.5rem; }
.btn-export { padding: 0.5rem 0.8rem; border: 1px solid var(--border-color); background: none; border-radius: 5px; cursor: pointer; }
.table-wrapper { overflow-y: auto; flex-grow: 1; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid #eee; }
th { font-size: 0.8rem; text-transform: uppercase; color: var(--secondary-text); }
.action-buttons .btn-action { background: none; border: none; cursor: pointer; font-size: 1.2rem; margin-right: 0.5rem; }
.action-buttons .promote { color: var(--accent-green); }
.action-buttons .demote { color: var(--accent-orange); }
.action-buttons .select { color: var(--accent-blue); }
.action-buttons .reject { color: var(--accent-red); }
#initial-message { text-align: center; padding: 4rem; background: white; border-radius: 8px; }

/* --- STYLES FOR MANAGE QUESTIONS PAGE --- */
#initial-message-questions {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 8px;
}

.question-management-area .toolbar {
    margin-bottom: 1.5rem;
}

.question-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.question-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.question-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-text);
}

.question-text {
    font-weight: 500;
    max-width: 600px; /* Adjust as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.question-actions .btn-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 1rem;
    color: var(--secondary-text);
    transition: color 0.3s;
}

.question-actions .view:hover { color: var(--accent-blue); }
.question-actions .edit:hover { color: var(--accent-orange); }
.question-actions .delete:hover { color: var(--accent-red); }

.no-questions {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-text);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.question-view-text {
    font-weight: bold;
    margin-bottom: 1rem;
}

.options-list {
    list-style: none;
    text-align: left;
    padding-left: 0;
}




/* --- STYLES FOR ASSESSMENT SETTINGS PAGE --- */
.settings-display-area {
    margin-top: 2rem;
}

.settings-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.settings-card.no-settings {
    text-align: center;
    padding: 3rem;
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.settings-card p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.settings-actions {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    display: flex;
    gap: 1rem;
}




/* --- STYLES FOR NEW FEEDBACK UI --- */
.feedback-area {
    background: transparent;
    padding: 0;
    box-shadow: none;
}
.feedback-filters {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.feedback-list {
    display: flex;
    flex-direction: column; /* Stack cards vertically */
    gap: 1.5rem;
    max-width: 800px; /* Constrain width for better readability */
    margin: 0 auto;
}

/* Base Card Style - Multi-container effect */
.feedback-card-new {
    background: white;
    border-radius: 12px; /* Slightly larger radius for a softer look */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* More pronounced shadow */
    border: 1px solid #e0e0e0; /* Subtle default border */
    transition: all 0.3s ease-in-out;
    overflow: hidden; /* Ensures inner elements respect border-radius */
}

.feedback-card-new:hover {
    transform: translateY(-8px); /* Lift more on hover */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); /* Stronger hover shadow */
}

/* Sentiment-based border colors */
.feedback-card-new.positive { 
    border-color: #28a745; /* Green border */
    border-left: 8px solid #28a745; /* Thicker left border accent */
}
.feedback-card-new.negative { 
    border-color: #dc3545; /* Red border */
    border-left: 8px solid #dc3545; /* Thicker left border accent */
}
.feedback-card-new.neutral {
    border-color: #6c757d; /* Grey border for neutral */
    border-left: 8px solid #6c757d; /* Thicker left border accent */
}


.feedback-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Align items vertically in center */
    padding: 1.25rem 1.75rem; /* Increased padding */
    background-color: #fcfcfc; /* Slightly off-white background for header */
    border-bottom: 1px solid #f0f0f0; /* Separator for header */
}
.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.author-avatar {
    width: 50px; /* Slightly larger avatar */
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.3rem; /* Larger font for initials */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle avatar shadow */
}
.author-name {
    font-weight: 700; /* Bolder name */
    font-size: 1.2rem; /* Slightly larger font for name */
    color: #333;
}
.feedback-rating {
    color: #ffc107; /* Brighter gold for stars */
    font-size: 1rem; /* Slightly larger stars */
    margin-top: 0.25rem; /* Space below name */
}
.feedback-rating .fa-star {
    margin-right: -2px; /* Slightly tighter star spacing */
}
.feedback-timestamp {
    font-size: 0.85rem;
    color: var(--secondary-text);
}
.feedback-card-body {
    padding: 1.5rem 1.75rem; /* Increased padding */
    color: #555;
    line-height: 1.6; /* Better readability */
    font-size: 1rem;
}
.feedback-card-footer {
    padding: 1rem 1.75rem;
    background: #fdfdfd; /* Lighter footer background */
    border-top: 1px solid #f0f0f0;
    border-bottom-left-radius: 12px; /* Match card radius */
    border-bottom-right-radius: 12px; /* Match card radius */
    display: flex;
    justify-content: flex-end; /* Align sentiment tag to the right */
}
.sentiment-tag {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
/* Sentiment Tag Colors */
.positive .sentiment-tag { 
    background-color: #d4edda; /* Light green background */
    color: #155724; /* Darker green text */
}
.negative .sentiment-tag { 
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Darker red text */
}
.neutral .sentiment-tag {
    background-color: #e2e3e5; /* Light grey background */
    color: #383d41; /* Darker grey text */
}

.no-feedback-state {
    text-align: center;
    padding: 4rem; /* More padding */
    color: var(--secondary-text);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}
.no-feedback-state i {
    font-size: 4rem; /* Larger icon */
    margin-bottom: 1.5rem;
    color: #b0c4de; /* A nice subtle blue-grey */
}
.no-feedback-state p {
    font-size: 1.2rem; /* Larger text */
    font-weight: 500;
}




/* --- STYLES FOR REDESIGNED APPLICANT MODAL (v2) --- */

/* The main overlay that covers the screen */
.modal-overlay {
    display: none; /* Hidden by default, shown with JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7); /* Darker, more professional overlay */
    backdrop-filter: blur(5px); /* Frosted glass effect */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* The main pop-up container */
.modal-content.large {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 750px; /* A balanced width */
    max-height: 90vh; /* Limits height to 90% of the viewport */
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important for border-radius on children */
}

.modal-body-scroll {
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0; /* required for a flex child to actually scroll instead of overflowing */
    padding: 0 0.5rem 1rem 0.5rem;
}

/* The 'X' close button */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    color: white; 
    opacity: 0.8; 
    transition: all 0.3s ease;
    z-index: 10;
}
.modal-close-btn:hover { 
    opacity: 1; 
    transform: rotate(90deg);
    background: rgba(0,0,0,0.5);
}

/* The dark blue header section */
.applicant-modal-header {
    background: var(--primary-text);
    color: white;
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    flex-shrink: 0; /* Prevents the header from shrinking */
}
.applicant-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    background-color: #eee;
}
.applicant-title h2 { font-size: 1.8rem; margin: 0; }
.applicant-title p { font-size: 1rem; opacity: 0.8; margin: 0; }

/* The main content body that scrolls */
#modal-body-content {
    padding: 1.5rem 2rem;
    overflow-y: auto;   /* **THIS ENABLES SCROLLING** */
    flex-grow: 1;       /* Allows the body to take up all available space */
    min-height: 0;      /* Crucial fix for making flex items scrollable */
}

#modal-body-content h3 {
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#modal-body-content h3:first-child { margin-top: 0; }

/* The two-column details list */
.details-list {
    display: grid;
    grid-template-columns: 150px 1fr; /* Fixed label width, flexible value width */
    gap: 1rem;
    font-size: 0.95rem;
}
.details-list dt {
    font-weight: 600;
    color: var(--secondary-text);
}
.details-list dd {
    margin-left: 0;
    word-break: break-word;
}
.details-list dd a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}
.details-list dd a:hover {
    text-decoration: underline;
}

/* The embedded resume viewer */
.resume-viewer {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 1rem;
}
.resume-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Offer / Internship Letter Generation --- */
.btn-action-primary {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
}
.btn-action-primary:hover:not(:disabled) { background: #0056b3; }
.btn-action-primary:disabled { background: #b9c6d1; cursor: not-allowed; }

.btn-secondary {
    background: #ecf0f1;
    color: var(--primary-text);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.btn-secondary:hover { background: #dfe4ea; }

.offer-recipient-summary {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin: -0.5rem 0 1.25rem 0;
}

.offer-section-title {
    font-size: 1rem;
    color: var(--accent-blue);
    margin: 1.5rem 0 0.75rem 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.4rem;
}

.offer-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}
.offer-form-grid .form-field.full-width { grid-column: 1 / -1; }
.form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-text);
    margin-bottom: 0.3rem;
}
.form-field input[type="text"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--font-family);
}
.form-field textarea { resize: vertical; }

.offer-sla-toggle { margin: 1.5rem 0 0.5rem 0; }
.offer-protection-docs {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem 0;
    padding: 0.75rem 1rem;
    background: #f8f9fb;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.offer-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}

.offer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}
.offer-badge.sent { background: #e7f8ee; color: var(--accent-green); }
.offer-badge.pending { background: #fdf1e4; color: var(--accent-orange); }
.offer-badge.confirmed { background: #eaf1ff; color: #0b1f3a; font-weight: 700; }
.action-buttons .confirm-offer { color: #0b1f3a; }

#selected-table th:first-child, #selected-table td:first-child,
#round-1-table th:first-child, #round-1-table td:first-child,
#round-2-table th:first-child, #round-2-table td:first-child,
#round-3-table th:first-child, #round-3-table td:first-child {
    width: 36px; text-align: center; padding-left: 1rem; padding-right: 0;
}

.btn-bulk-action {
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border-color);
    background: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-bulk-action[data-action="promote"] { color: var(--accent-green); }
.btn-bulk-action[data-action="select"] { color: var(--accent-blue); }
.btn-bulk-action[data-action="reject"] { color: var(--accent-red); }
.btn-bulk-action:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-bulk-action:hover:not(:disabled) { background: #f4f7f9; }

.job-selector { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.job-selector #btn-close-job { white-space: nowrap; }

tr.search-hidden, tr.filtered-out { display: none !important; }

.advanced-filters {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}
.advanced-filters .filter-field { display: flex; flex-direction: column; gap: 0.3rem; }
.advanced-filters .filter-field label { font-size: 0.75rem; font-weight: 600; color: var(--secondary-text); text-transform: uppercase; }
.advanced-filters .filter-field input, .advanced-filters .filter-field select {
    padding: 0.45rem 0.6rem; border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.85rem; width: 140px;
}
.advanced-filters .filter-actions { display: flex; gap: 0.5rem; }

.multi-filter { position: relative; }
.multi-filter-btn {
    width: 150px; text-align: left; padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.85rem;
    background: white; cursor: pointer; text-transform: capitalize;
    display: flex; justify-content: space-between; align-items: center;
}
.multi-filter-btn::after { content: '\25BE'; color: #999; margin-left: 0.5rem; }
.multi-filter-btn.has-selection { border-color: var(--accent-blue); color: var(--accent-blue); font-weight: 600; }
.multi-filter-panel {
    display: none;
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
    background: white; border: 1px solid var(--border-color); border-radius: 6px;
    box-shadow: var(--shadow); width: 300px;
    padding: 0.5rem;
}
.multi-filter-search {
    width: 100%; box-sizing: border-box; padding: 0.4rem 0.6rem; margin-bottom: 0.4rem;
    border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.85rem;
}
.multi-filter-options { max-height: 220px; overflow-y: auto; }
.multi-filter-option {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.4rem; border-radius: 4px; font-size: 0.85rem;
    font-weight: 400; text-transform: none; cursor: pointer;
    white-space: normal; /* let long names wrap instead of being cut off */
    word-break: break-word; line-height: 1.3;
}
.multi-filter-option:hover { background: #f4f7f9; }
.multi-filter-option input { flex-shrink: 0; margin-top: 0.2rem; }
.multi-filter-empty { padding: 0.5rem; font-size: 0.8rem; color: var(--secondary-text); }

.active-filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: -1rem 0 1.5rem 0; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: #eef3ff; color: var(--accent-blue);
    padding: 0.3rem 0.6rem; border-radius: 14px; font-size: 0.78rem; font-weight: 600;
}
.filter-chip i { cursor: pointer; opacity: 0.7; }
.filter-chip i:hover { opacity: 1; }

/* --- Responsive polish for laptop/desktop widths (mobile not targeted here) --- */
@media (max-width: 1400px) {
    .round-container { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .final-status-container { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
@media (max-width: 1100px) {
    .dashboard-container { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .sidebar-nav { display: flex; flex-wrap: wrap; }
    .main-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .table-controls { flex-direction: column; align-items: stretch; }
    .export-buttons { flex-wrap: wrap; }
}
@media (max-width: 900px) {
    .main-content { padding: 1rem; }
    .modal-content.large { width: 95%; max-width: 95%; }
    .offer-form-grid { grid-template-columns: 1fr; }
}

/* --- Password visibility toggle (login forms, Manage Team, password reset) --- */
.password-field { position: relative; }
.password-field input { width: 100%; box-sizing: border-box; padding-right: 2.75rem; }
.toggle-password {
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #95a5a6; font-size: 1rem; padding: 6px;
    line-height: 1;
}
.toggle-password:hover { color: var(--accent-blue, #2980b9); }

/* --- Forgot password link + OTP + strength checklist (shared across every
   login surface: HRD, Employee ID portal, Client Portal) --- */
.forgot-password-link { display:block; text-align:right; font-size:0.85rem; margin: -0.75rem 0 1rem; color: var(--accent-blue, #2980b9); text-decoration:none; }
.forgot-password-link:hover { text-decoration:underline; }

.otp-input { letter-spacing: 8px; font-size: 1.4rem; text-align:center; font-weight:700; }

.password-strength-checklist { list-style:none; padding:0; margin: 0.4rem 0 1rem; font-size:0.8rem; display:grid; grid-template-columns: 1fr 1fr; gap:2px 12px; }
.password-strength-checklist li { color:#95a5a6; transition: color 0.15s; }
.password-strength-checklist li i { width:14px; margin-right:4px; }
.password-strength-checklist li.valid { color:#1a8f4c; }

.auth-step { display:none; }
.auth-step.active { display:block; }
.resend-otp-link { font-size:0.85rem; color: var(--accent-blue, #2980b9); cursor:pointer; text-decoration:underline; background:none; border:none; padding:0; }
.resend-otp-link:disabled { color:#bbb; cursor:not-allowed; text-decoration:none; }