*{
    box-sizing:border-box;
}

html,
body{
    height:100%;
}

body{
    margin:0;
    font-family:Arial, Helvetica, sans-serif;
    background:#eef2f7;
    color:#1f2937;
}

.site-shell{
    min-height:100vh;
    display:flex;
    flex-direction:column;
}

/* ================= HEADER ================= */

.site-header{
    background:linear-gradient(90deg, #0f4c9b, #1f6feb);
    color:#fff;
    padding:0 20px;
    height:100px;
    display:flex;
    align-items:center;
    box-shadow:0 2px 10px rgba(0,0,0,0.12);
}

.small-header{
    height:80px;
}

.header-inner{
    max-width:1400px;
    width:100%;
    height:100%;
    margin:0 auto;
    display:flex;
    justify-content:flex-start;
    align-items:center;
    text-align:left;
}

.header-brand{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:12px;
    flex-wrap:nowrap;
    height:100%;
    width:auto;
}

.site-logo{
    display:block;
    height:90px;
    max-height:100%;
    width:auto;
    object-fit:contain;
    flex-shrink:0;
}

.header-title-group,
.header-text{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    min-width:0;
    text-align:left;
}

.header-title-group h1,
.header-text h1,
.site-header h1{
    margin:0;
    font-size:2.2rem;
    font-weight:800;
    line-height:1.1;
    letter-spacing:.3px;
    text-align:left;
}

.small-header h1{
    font-size:2rem;
}

.header-title-group p,
.header-text p,
.site-header p{
    margin:4px 0 0;
    font-size:0.95rem;
    line-height:1.3;
    opacity:.95;
    text-align:left;
}

.header-actions{
    display:flex;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
}

.header-logout{
    display:inline-block;
    text-decoration:none;
    padding:10px 18px;
    border-radius:8px;
    background:#114992;
    color:#fff;
    font-weight:700;
}

/* ================= MAIN WRAPPERS ================= */

.page-wrap,
.dashboard-wrap{
    max-width:1400px;
    width:100%;
    margin:28px auto;
    padding:0 20px 30px;
    flex:1;
}

/* ================= CARDS ================= */

.hero-text,
.content-card,
.card{
    background:#ffffff;
    border-radius:16px;
    box-shadow:0 8px 24px rgba(0,0,0,0.08);
}

.hero-text{
    padding:24px 28px;
    margin-bottom:26px;
}

.hero-text h2{
    margin-top:0;
    color:#18498a;
    font-size:2rem;
}

.hero-text p,
.panel-intro,
.dashboard-card p,
.center-content p{
    font-size:1.05rem;
    line-height:1.8;
}

/* ================= MESSAGE BOXES ================= */

.message-box{
    max-width:100%;
    margin:0 0 20px;
    background:#fff4d8;
    color:#7a5812;
    border:1px solid #f0d48c;
    padding:14px 18px;
    border-radius:10px;
    font-weight:700;
}

.success-box{
    background:#e9f8ee;
    color:#176a31;
    border-color:#b8e2c4;
}

.error-box{
    background:#fdeaea;
    color:#9f2323;
    border-color:#efc3c3;
}

/* ================= HOME GRID ================= */

.main-grid{
    display:grid;
    grid-template-columns:300px 1fr 360px;
    gap:20px;
    align-items:stretch;
}

.left-stack{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.login-card,
.signup-card{
    padding:26px 24px;
}

.center-card{
    overflow:hidden;
    height:100%;
}

.hero-image{
    width:100%;
    height:320px;
    object-fit:cover;
    display:block;
}

.center-content{
    padding:28px 30px 34px;
}

.login-card h2,
.signup-card h2,
.center-content h2,
.dashboard-card h2,
.content-card h2,
.content-card h3{
    margin-top:0;
    color:#18498a;
}

/* ================= FORMS ================= */

label{
    display:block;
    font-size:1rem;
    margin:14px 0 8px;
    font-weight:600;
}

input,
select,
textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid #c9d4e3;
    border-radius:8px;
    font-size:1rem;
    outline:none;
    background:#fff;
    font-family:inherit;
}

input:focus,
select:focus,
textarea:focus{
    border-color:#1f6feb;
    box-shadow:0 0 0 3px rgba(31,111,235,0.12);
}

.btn{
    width:100%;
    border:none;
    border-radius:8px;
    padding:13px 16px;
    font-size:1rem;
    font-weight:700;
    cursor:pointer;
    margin-top:18px;
}

.btn-primary{
    background:#1558b0;
    color:#fff;
}

.btn-primary:hover{
    background:#10478f;
}

.btn-success{
    background:#2f9723;
    color:#fff;
}

.btn-success:hover{
    background:#267a1d;
}

.inline-btn{
    display:inline-block;
    width:auto;
    text-decoration:none;
    padding:12px 22px;
}

.role-note{
    margin-top:12px;
    font-size:.95rem;
    color:#5c6b7a;
    background:#f5f8fc;
    border:1px dashed #cdd8e6;
    padding:10px 12px;
    border-radius:8px;
}

/* ================= FOOTER ================= */

.site-footer{
    background:linear-gradient(90deg, #22334b, #10233d);
    color:#fff;
    text-align:center;
    padding:22px 16px;
    font-size:1.15rem;
    margin-top:auto;
}

/* ================= DASHBOARD ================= */

.dashboard-card{
    padding:30px;
    text-align:center;
}

.hr-dashboard-wrap{
    max-width:1400px;
    width:100%;
    margin:28px auto;
    padding:0 20px 30px;
    display:grid;
    grid-template-columns:320px 1fr;
    gap:26px;
    flex:1;
}

.sidebar-panel{
    background:#ffffff;
    border-radius:16px;
    box-shadow:0 8px 24px rgba(0,0,0,0.08);
    padding:0;
    overflow:hidden;
    align-self:start;
}

.sidebar-title{
    padding:22px 20px;
    font-size:1.9rem;
    font-weight:800;
    color:#fff;
    background:linear-gradient(90deg, #0f4c9b, #1f6feb);
}

.nav-link{
    display:block;
    width:100%;
    border:none;
    background:#fff;
    text-align:left;
    padding:18px 20px;
    font-size:1.05rem;
    font-weight:700;
    color:#27364b;
    cursor:pointer;
    border-bottom:1px solid #e5ecf5;
}

.nav-link:hover,
.nav-link.active{
    background:#edf4ff;
    color:#1558b0;
}

.dashboard-content{
    min-width:0;
}

.content-panel{
    display:none;
}

.content-panel.active{
    display:block;
}

.content-card{
    padding:26px 28px;
    margin-bottom:24px;
}

.dashboard-form{
    margin-top:14px;
}

.form-grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

/* ================= TABLES ================= */

.table-wrap{
    overflow-x:auto;
}

.data-table{
    width:100%;
    border-collapse:collapse;
    margin-top:10px;
}

.data-table th,
.data-table td{
    padding:12px 10px;
    border-bottom:1px solid #dde6f0;
    text-align:left;
    font-size:.97rem;
}

.data-table thead th{
    background:#f4f8fc;
    color:#18498a;
    font-weight:800;
}

.empty-note{
    color:#6a7889;
    font-style:italic;
}

.top-space{
    margin-top:18px;
}

/* ================= JOBS PANEL ================= */

.jobs-panel{
    display:flex;
    flex-direction:column;
    min-height:100%;
    height:100%;
    padding:20px;
    box-sizing:border-box;
}

.jobs-panel h2{
    margin:0 0 15px;
}

.jobs-search{
    margin-bottom:15px;
}

.jobs-search form{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.jobs-search input[type="text"]{
    flex:1;
    min-width:160px;
    padding:10px;
    border:1px solid #ccc;
    border-radius:6px;
}

.jobs-search button,
.jobs-search a{
    padding:10px 12px;
    border:none;
    border-radius:6px;
    text-decoration:none;
    cursor:pointer;
    font-size:14px;
}

.jobs-search button{
    background:#1f6feb;
    color:#fff;
}

.jobs-search a{
    background:#e5e7eb;
    color:#222;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.jobs-list{
    display:flex;
    flex-direction:column;
    gap:12px;
    flex:1;
}

.job-item{
    border:1px solid #dcdcdc;
    border-radius:8px;
    padding:14px;
    background:#fafafa;
    transition:0.2s ease;
    margin-bottom:5px;
}

.job-item:hover{
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    background:#fff;
}

.job-link{
    text-decoration:none;
    color:inherit;
    display:block;
}

.job-title{
    margin:0 0 8px;
    font-size:18px;
    color:#1f2937;
}

.job-meta{
    margin:4px 0;
    font-size:14px;
    color:#4b5563;
}

.jobs-empty{
    padding:20px;
    text-align:center;
    color:#666;
    border:1px dashed #ccc;
    border-radius:8px;
    background:#fcfcfc;
}

.jobs-pagination{
    margin-top:18px;
    padding-top:15px;
    border-top:1px solid #e5e7eb;
    display:flex;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}

.jobs-pagination a,
.jobs-pagination span{
    padding:8px 12px;
    border-radius:6px;
    text-decoration:none;
    border:1px solid #d1d5db;
    font-size:14px;
}

.jobs-pagination a{
    background:#fff;
    color:#111827;
}

.jobs-pagination .active{
    background:#1f6feb;
    color:#fff;
    border-color:#1f6feb;
}

/* ================= SEARCH TOOLBAR ================= */

.table-toolbar{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    margin-bottom:10px;
    width:100%;
}

.table-search-form{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
}

.table-search-input{
    width:180px;
    padding:8px 10px;
    border:1px solid #c9d4e3;
    border-radius:6px;
    font-size:0.95rem;
}

.table-search-form .btn{
    width:auto;
    padding:8px 14px;
    margin-top:0;
}

.table-search-form a{
    text-decoration:none;
}

/* ================= RESPONSIVE ================= */

@media (max-width:1100px){
    .main-grid,
    .hr-dashboard-wrap,
    .form-grid-2{
        grid-template-columns:1fr;
    }

    .jobs-panel{
        order:3;
    }

    .site-header{
        height:80px;
    }

    .site-logo{
        height:70px;
    }

    .header-title-group h1,
    .header-text h1,
    .site-header h1{
        font-size:2rem;
    }
}

@media (max-width:700px){
    .site-header{
        height:auto;
        padding:12px 16px;
    }

    .header-inner{
        justify-content:flex-start;
        align-items:center;
        text-align:left;
    }

    .header-brand{
        width:100%;
        height:auto;
        justify-content:flex-start;
        align-items:center;
        gap:12px;
    }

    .header-text,
    .header-title-group{
        align-items:flex-start;
        text-align:left;
    }

    .header-actions{
        justify-content:center;
    }

    .site-logo{
        height:52px;
    }

    .hero-image{
        height:230px;
    }

    .sidebar-title{
        font-size:1.5rem;
    }

    .header-title-group h1,
    .header-text h1{
        font-size:1.6rem;
        text-align:left;
    }

    .header-title-group p,
    .header-text p{
        margin-top:4px;
        font-size:0.9rem;
        text-align:left;
    }
	
}
/* ================= Modal Q&A ================= */
    .text-view-modal {
        display: none;
        position: fixed;
        z-index: 9999;
        inset: 0;
        background: rgba(0,0,0,0.55);
        padding: 20px 16px;
    }
    
    .text-view-modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .text-view-modal-box {
        background: #fff;
        width: min(900px, 96%);
        max-height: 92vh;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        overflow: hidden;
    }
    
    .qa-modal-box {
        display: flex;
        flex-direction: column;
        width: min(950px, 96%);
        max-height: 92vh;
    }
    
    .text-view-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        border-bottom: 1px solid #e5e7eb;
        flex-shrink: 0;
    }
    
    .text-view-modal-header h3 {
        margin: 0;
        font-size: 18px;
    }
    
    .text-view-close {
        border: none;
        background: #ef4444;
        color: #fff;
        border-radius: 6px;
        padding: 6px 10px;
        cursor: pointer;
    }
    
    .text-view-modal-body {
        padding: 18px;
        overflow-y: auto;
        white-space: pre-wrap;
        line-height: 1.5;
        color: #222;
        min-height: 0;
    }
    
    .qa-modal-body {
        flex: 1 1 auto;
        overflow-y: auto;
        max-height: none;
    }
    
    .qa-meta {
        margin-bottom: 12px;
    }
    
    .qa-meta strong {
        display: inline-block;
        min-width: 120px;
    }
    
    .qa-section-title {
        margin: 14px 0 8px;
        font-size: 16px;
        font-weight: 600;
    }
    
    .qa-content-box {
        white-space: pre-wrap;
        word-break: break-word;
        overflow-wrap: anywhere;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .qa-nav-bar {
        padding: 14px 18px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        background: #fff;
        flex-shrink: 0;
    }