/* 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 .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 */
}

/* 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;
}