/* ===============================
   GLOBAL
================================ */
body {
    margin: 0;
    font-family: "Segoe UI", Arial;
    background: #f6f7fb;
}

/* ===============================
   LAYOUT (MENU)
================================ */
.layout {
    display: flex;
}

.sidebar {
    width: 230px;
    background: #111827;
    color: #fff;
    min-height: 100vh;
    padding: 20px 15px;
}

.sidebar .logo {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 25px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 14px;
}

.sidebar a:hover {
    background: #1f2937;
    color: #fff;
}

.sidebar .active {
    background: #2d6cdf;
    color: #fff;
}

.main-content {
    flex: 1;
    background: #f6f7fb;
}

/* ===============================
   HEADER
================================ */
.topbar {
    background: #fff;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    height: 38px;
}

.logo-title {
    font-size: 18px;
    font-weight: 600;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout {
    background: #2d6cdf;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

/* ===============================
   CARD (SAFE – matches your pages)
================================ */
.card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ===============================
   TABLE / DASHBOARD
================================ */
.table-hover tbody tr:hover {
    background: #f9fbff;
}

tr.pending {
    background: #fff8e1;
}

.company-name {
    font-weight: 600;
}

.sub-text {
    font-size: 12px;
    color: #888;
}

/* ===============================
   BADGE / SCORE
================================ */
.badge-soft {
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 12px;
}

.score-pill {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 11px;
    min-width: 70px;
    text-align: center;
}

/* ===============================
   PROGRESS (SCOPED)
================================ */
.progress {
    border-radius: 10px;
}

/* ===============================
   SURVEY FORM
================================ */
.qbox {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #eee;
    transition: 0.2s;
}

.qbox:hover {
    border-color: #d0d7e2;
}

.error-msg {
    font-size: 13px;
}

/* ===============================
   WIZARD
================================ */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

/* ===============================
   STICKY BAR (SURVEY)
================================ */
.sticky-combined {
    position: sticky;
    top: 0px;
    z-index: 999;
    background: #f6f7fb;
    padding-top: 5px;
}

.sticky-combined .card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sticky-combined .btn:hover {
    transform: translateY(-1px);
}

/* ===============================
   AUTOSAVE
================================ */
#autosaveStatus {
    min-width: 140px;
    text-align: center;
    font-size: 13px;
}

/* ===============================
   START SURVEY PAGE
================================ */
.container-custom {
    max-width: 900px;
    margin: auto;
}

.company-box {
    background: #f1f3f7;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===============================
   LOGIN PAGE (ISOLATED)
================================ */

.login-page {
    background: linear-gradient(135deg, #eef2f7, #e6ecf5);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* LOGO */
.login-page .logo-box {
    margin-bottom: 20px;
    text-align: center;
}

.login-page .logo-box img {
    max-width: 240px;
    transition: 0.3s;
}

.login-page .logo-box img:hover {
    transform: scale(1.05);
}

.login-page .tagline {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* CARD (IMPORTANT: override global card) */
.login-page .card {
    width: 380px;
    padding: 35px;
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* TEXT */
.login-page .title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-page .subtitle {
    font-size: 13px;
    color: #777;
    margin-bottom: 25px;
}

/* INPUT */
.login-page .input-group {
    margin-bottom: 18px;
}

.login-page .input-group label {
    font-size: 13px;
    color: #444;
}

.login-page .input-group input {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 14px;
    transition: 0.2s;
}

.login-page .input-group input:focus {
    border-color: #2d6cdf;
    box-shadow: 0 0 0 2px rgba(45,108,223,0.1);
}

/* BUTTON */
.login-page .btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2d6cdf, #1f5bd3);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.login-page .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(45,108,223,0.3);
}

/* ERROR */
.login-page .error {
    margin-top: 12px;
    color: red;
    font-size: 13px;
    text-align: center;
}

/* FOOTER */
.login-page .footer {
    margin-top: 15px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* ===============================
   AI REPORT DASHBOARD
================================ */

/* Sticky Header (Report Page Only) */
.report-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	margin-bottom:0 !important;
    border-bottom:none;
}

/* Big KPI number */
.big {
    font-size: 48px;
    font-weight: 800;
}

/* Colored cards */
.card-success {
    border-left: 5px solid #22c55e;
}

.card-danger {
    border-left: 5px solid #ef4444;
}

.card-warning {
    border-left: 5px solid #f59e0b;
}

/* Smooth animation */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {opacity:0;transform:translateY(10px);}
    to {opacity:1;transform:translateY(0);}
}

/* Radar chart container */
.chart-box {
    position: relative;
    height: 300px;
}

/* Section spacing */
.section-title {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* ===== PREMIUM TABS ===== */

.report-tabs-wrapper{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    background:#f3f4f6;
    padding:0 20px;
    margin:0;
    border-bottom:1px solid #e5e7eb;
}


/* TAB BASE */
.report-tab{
    position:relative;
    padding:12px 24px;
    font-weight:600;
    font-size:14px;
    color:#4b5563;
    text-decoration:none !important;

    border-radius:12px 12px 0 0;
    margin-right:4px;

    background:transparent;
    transition:all 0.25s ease;
}

/* HOVER */
.report-tab:hover{
    background:#e5e7eb;
    color:#111827 !important;
}

/* ACTIVE TAB */
.report-tab.active{
    background:linear-gradient(135deg, #2563eb, #1d4ed8);
    color:white !important;

    box-shadow:0 -2px 10px rgba(0,0,0,0.08);
}

/* REMOVE GAP BELOW ACTIVE TAB */
.report-tab.active::after{
    content:'';
    position:absolute;
    bottom:-1px;
    left:0;
    width:100%;
    height:2px;
    background:white;
}

/* Left tabs group */
.tabs-left{
    display:flex;
}

/* Right section */
.tabs-right{
    padding-bottom:6px;
}

/* Back button */
.btn-back{
    display:inline-block;
    padding:6px 14px;
    background:#111827;
    color:white !important;
    text-decoration:none;
    border-radius:8px;
    font-size:13px;
    transition:0.2s;
}

.btn-back:hover{
    background:#000;
}

/*SURVEY CURRENT CATEGORY*/
.category-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 10px;
}

.category-progress .cat-step {
    text-align: center;
    flex: 1;
    position: relative;
}

.category-progress .dot {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 auto 5px;
    transition: all 0.3s ease;
}

.category-progress .label {
    font-size: 12px;
    color: #666;
}

.category-progress-wrapper {
    position: relative;
    margin-top: 15px;
}

/* GRAY BASE LINE */
.progress-line {
    position: absolute;
    top: 6px; /* aligns with dots */
    left: 0;
    width: 100%;
    height: 4px;
    background: #ddd;
    z-index: 1;
    border-radius: 2px;
}

/* GREEN PROGRESS LINE */
.progress-line-fill {
    height: 100%;
    width: 0%;
    background: #28a745;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* CATEGORY ROW */
.category-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* EACH STEP */
.cat-step {
    text-align: center;
    flex: 1;
}

/* DOT */
.cat-step .dot {
    width: 14px;
    height: 14px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 auto 6px;
    transition: all 0.3s ease;
}

/* LABEL */
.cat-step .label {
    font-size: 12px;
    color: #666;
}

/* COMPLETED */
.cat-step.completed .dot {
    background: #28a745;
}

/* ACTIVE */
.cat-step.active .dot {
    background: #28a745;
    transform: scale(1.2);
}

.cat-step.active .label {
    font-weight: bold;
    color: #000;
}

/* ACTIVE */
.category-progress .active .dot {
    background: #28a745;
    transform: scale(1.2);
}

.category-progress .active .label {
    font-weight: bold;
    color: #000;
}

/* COMPLETED */
.category-progress .completed .dot {
    background: #28a745;
}

.cat-step.active::after {
    content: "▲";
    color: #28a745;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}


/****** REPORT LOADER **********/

#page-loader {	
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    top: 0;
    left: 0;
    z-index: 9999;
    display: none; /* important */
    align-items: center;
    justify-content: center;
	backdrop-filter: blur(4px);
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

.loader-text {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
