/* Custom Collapsible Accordion Styles */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--gray-light);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  flex-direction: column;
}
.faq-item:hover {
  border-color: var(--yellow-dark);
}
.faq-item summary {
  padding: 5px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none; /* Hide default webkit arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
/* Hide default summary arrow in Firefox */
.faq-item summary::-webkit-details-marker {
  display: none;
}
/* Custom Interactive Icon indicator */
.faq-item summary::after {
  content: "+";
  color: var(--yellow-dark);
  font-weight: 800;
  font-size: 18px;
  transition: transform 0.2s ease;
}
/* Style modifications for when the details card is expanded */
.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}
.faq-item[open] summary {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
 
}
.faq-content {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--white);
}

li{
    margin-left:15px;
}


/* ==========================================================================
   1. IMPORTS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --darkgrey: #212121;
    --lightgrey: #ebecf3;
    --lightergrey: #f6f6f6;
    --black: #000000;
    --white: #ffffff;

    --primary: #f7c442;
    --secondary: #334155;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;

    --border: #e2e8f0;
    --background: #f5f7fb;

    --gray: #a1a1a124;
}

/* ==========================================================================
   2. GLOBAL RESETS & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html, body {
    height: 100%;
}

body {
    background: #f8f8f8;
    color: var(--black);
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
}

.error-text {
    color: red !important;
}

/* ==========================================================================
   3. LAYOUT & STRUCTURE
   ========================================================================== */
.main-header { 
    
    background: var(--white);
    color: var(--darkgrey);
    padding: 12px 0;
    border-top: 10px solid var(--primary);
}

.main-header .container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.main-header .logo {
    font-size: 20px;
    font-weight: bold;
}

.main-header .nav {
    display: flex;
    gap: 20px;
}

.main-header .nav a {
    color: var(--darkgrey);
}

.main-header .nav a:hover {
    color: var(--primary);
}

.page-wrapper { 
    margin-left: 150px; 
}

.admin-content {
    padding: 40px;
}

.admin-sidebar {
    width: 150px;
    height: 100vh;
    background: var(--black);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px 5px;
    border-radius: 0px;
    margin: 0px;
    overflow-y: auto;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 18px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-nav a {
    color: var(--white);
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: stretch;
}

.sidebar-nav a i {
    font-size: 25px;
    height: 45px;
    width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

.sidebar-nav a:hover {
    background: var(--primary);
    color: var(--black);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h1 {
    margin: 0;
}

.page-header p {
    margin: 5px 0 0;
    color: var(--black);
}

/* ==========================================================================
   4. TABLES & CONTAINERS
   ========================================================================== */
.table-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.comm-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
}

.comm-table th, .comm-table td { 
    border: 1px solid #e2e8f0; 
    padding: 12px; 
    text-align: left; 
    font-size: 0.95em; 
}

.comm-table th { 
    background-color: #f8fafc; 
    font-weight: bold; 
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-top: 0px;
}

.admin-table thead {
    background: var(--black);
    color: var(--white);
}

.admin-table th, .admin-table td {
    padding: 14px 15px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
}

.admin-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.admin-table tbody tr:hover {
    background: #eef4ff;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.profile-table {
    width: 100%;
    max-width: 900px;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.profile-table th, .profile-table td {
    padding: 14px 18px;
    border: 1px solid var(--border);
    text-align: left;
}

.profile-table th {
    width: 250px;
    background: #ffffff;
    color: var(--darkgrey);
    font-weight: 600;
}

.profile-table td {
    background: var(--lightergrey);
}

/* ==========================================================================
   5. CARDS & GRID LAYOUTS
   ========================================================================== */
.dashboard-boxes, .dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.dashboard-boxes {
    display: flex;
    gap: 20px;
    margin: 20px 0px;
    flex-wrap: nowrap;
}

.dashboard-boxes .card {
    flex: 1;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card h2 {
    font-size: 32px;
    color: var(--darkgrey);
    margin-bottom: 5px;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.card p {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin: 0;
}

.step-box {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.step-box h2 {
    margin-bottom: 10px;
}

/* ==========================================================================
   6. AUTH & FORMS
   ========================================================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    
}

.card.login-card {
    width: 900px;
    text-align: center;
}

.auth-grid {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.auth-grid .auth-card {
    flex: 1;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.auth-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.auth-card button {
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    margin: 25px 0;
    border-bottom: 1px solid #ddd;
}

.form-container {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-width: 600px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; }
.form-group textarea, .form-group input { width: 100%; padding: 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }
.form-group input[readonly] { background-color: #f3f4f6; color: #4b5563; cursor: not-allowed; }

form label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
}

form input {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

form input:focus {
    border-color: #0d6efd;
}

.analysts-checkbox-container { 
    max-height: 200px; 
    overflow-y: auto; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    background: #f8fafc; 
}

.analyst-checkbox-row { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 10px 14px; 
    border-bottom: 1px solid #e2e8f0; 
    cursor: pointer;
    transition: background 0.2s ease;
}

.analyst-checkbox-row:last-child { 
    border-bottom: none; 
}

.analyst-checkbox-row:hover {
    background-color: #f1f5f9;
}

.analyst-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.analyst-checkbox-row label { 
    cursor: pointer; 
    font-size: 0.95em; 
    font-weight: 500;
    color: #334155; 
    flex-grow: 1; 
    user-select: none; 
    margin: 0;
}

.file-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    background: #fff; 
    padding: 8px 12px; 
    border: 1px solid #e2e8f0; 
    border-radius: 6px; 
    margin-bottom: 8px; 
}

.app-info p {
    margin: 6px 0;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--black);
    color: var(--white);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5c636a;
}

.btn-success {
    background: #198754;
    color: #fff;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
}

.btn-danger:hover {
    background: #bb2d3b;
}

.btn-warning {
    background: #ffc107;
    color: #000;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
}

.btn-info {
    background: #0dcaf0;
    color: #fff;
}

.btn-info:hover {
    background: #31d2f2;
}

.btn-small {
    padding: 6px 10px;
    font-size: 13px;
}

.btn-view-comm { 
    display: inline-block; 
    padding: 5px 12px; 
    background: var(--primary); 
    color: var(--black); 
    text-decoration: none; 
    border-radius: 4px; 
    font-size: 0.85em; 
    font-weight: 600; 
}

.btn-view-comm:hover { 
    background: var(--black); 
    color: var(--white); 
}

.btn-view {
    display: inline-block;
    padding: 8px 14px;
    background: var(--primary);
    color: var(--black);
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none;
    font-weight:600;
}

.btn-view:hover {
    opacity: 0.9;
    background: var(--black);
    color: var(--white);
}

.btn-back {
    background: var(--darkgrey);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
}

.btn-download { 
    display: inline-flex; 
    align-items: center; 
    padding: 8px 16px; 
    background: var(--primary); 
    color: var(--black); 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 0.9em; 
    margin-top: 8px; 
    margin-right: 8px; 
    transition: background 0.2s; 
}

.btn-download:hover { 
    background: var(--black); 
    color: #ffffff; 
}

.action-buttons {
    margin-top: 10px;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: #f3f3f3;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: .3s;
}

.tab-btn:hover {
    background: #e9e9e9;
}

.tab-btn.active {
    background: #2c7be5;
    color: #fff;
}

/* ==========================================================================
   8. COMPONENT TABS & BADGES
   ========================================================================== */
.tab-content {
    display: none;
    animation: fade .25s ease;
}

.tab-content.active {
    display: block;
}

.status-badge-comm, .status-badge { 
    display: inline-block; 
    padding: 4px 8px; 
    font-size: 0.85em; 
    font-weight: bold; 
    border-radius: 4px; 
    text-align: center; 
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: #e9ecef;
    color: #333;
}

.app-info .status-badge {
    background: #0d6efd;
    color: #fff;
}

.status-replied-comm, .status-replied { 
    background-color: #d1fae5; 
    color: #065f46; 
    border: 1px solid #a7f3d0; 
}

.status-pending-comm, .status-pending { 
    background-color: #fef3c7; 
    color: #92400e; 
    border: 1px solid #fde68a; 
}

.status-submitted { 
    background-color: #d1fae5; 
    color: #059669; 
    font-weight: 600; 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 0.85em;
    display: inline-block;
}

.status-active {
    color: var(--success);
    font-weight: 600;
}

.status-inactive {
    color: var(--danger);
    font-weight: 600;
}

/* Alerts & States */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

/* ==========================================================================
   9. CUSTOM SEARCHABLE DROPDOWN COMPONENTS
   ========================================================================== */
.search-select-container { position: relative; width: 100%; user-select: none; }

.search-select-trigger { 
    width: 100%; padding: 10px 12px; box-sizing: border-box; 
    border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; 
    background-color: #fff; cursor: pointer; display: flex; 
    justify-content: space-between; align-items: center; 
}
.search-select-trigger:after {
    content: ""; border: solid #64748b; border-width: 0 2px 2px 0;
    display: inline-block; padding: 3px; transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.search-select-container.open .search-select-trigger:after {
    transform: rotate(-135deg);
}

.search-select-dropdown { 
    position: absolute; top: 105%; left: 0; width: 100%; 
    background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 999; display: none; 
    flex-direction: column; overflow: hidden;
}
.search-select-container.open .search-select-dropdown { display: flex; }

.search-select-search-box { padding: 8px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.search-select-search-box input { padding: 8px 10px; font-size: 0.9rem; border: 1px solid #cbd5e1; border-radius: 4px; width: 100%; }
.search-select-search-box input:focus { outline: none; border-color: #2563eb; }

.search-select-options { max-height: 220px; overflow-y: auto; padding: 4px 0; margin: 0; list-style: none; }
.search-select-option { 
    padding: 10px 14px; font-size: 0.95rem; color: #334155; 
    cursor: pointer; transition: background 0.15s ease; 
}
.search-select-option:hover { background-color: #f1f5f9; color: #0f172a; }
.search-select-option.selected { background-color: #e0f2fe; color: #0369a1; font-weight: 500; }
.search-select-no-results { padding: 12px; text-align: center; font-size: 0.9rem; color: #94a3b8; display: none; }

/* ==========================================================================
   10. MODALS
   ========================================================================== */
.doc-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center; z-index: 99999; backdrop-filter: blur(4px); }
.doc-modal-card { background: #fff; width: 100%; max-width: 500px; padding: 30px; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border-top: 6px solid #dc2626; text-align: center; margin: 15px; position: relative; }
.doc-modal-card h3 { margin-top: 0; color: #1e293b; font-size: 1.4em; }
.doc-modal-card p { color: #475569; font-size: 0.95em; line-height: 1.5; margin: 15px 0 25px; background: #f8fafc; padding: 15px; border-radius: 6px; border: 1px solid #e2e8f0; text-align: left; }
.btn-popup-action { display: inline-block; background: #dc2626; color: #fff; padding: 12px 24px; font-weight: bold; text-decoration: none; border-radius: 6px; transition: background 0.2s; font-size: 0.95em; }
.btn-popup-action:hover { background: #b91c1c; color: #fff; }
.btn-popup-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; font-weight: bold; color: #94a3b8; cursor: pointer; line-height: 1; transition: color 0.2s; padding: 4px; }
.btn-popup-close:hover { color: #475569; }

/* ==========================================================================
   11. INTERACTIVE TIMELINE COMPONENT
   ========================================================================== */
.timeline-container { background: #ffffff; padding: 40px 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 25px; border: 1px solid #e2e8f0; }
.timeline-title { font-size: 1.1em; font-weight: 600; color: #1e293b; margin-bottom: 35px; margin-top: 0; }
.timeline-wrapper { position: relative; display: flex; justify-content: space-between; align-items: center; max-width: 800px; margin: 0 auto; padding: 20px 0; }

.timeline-line-bg { position: absolute; top: 38%; left: 0; transform: translateY(-50%); width: 100%; height: 4px; background: #e2e8f0; z-index: 1; }
.timeline-line-progress { position: absolute; top: 38%; left: 0; transform: translateY(-50%); height: 4px; background: var(--primary); z-index: 2; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

.timeline-node { position: relative; display: flex; flex-direction: column; align-items: center; z-index: 3; width: 60px; cursor: pointer; }
.timeline-dot { width: 38px; height: 38px; border-radius: 50%; background: #ffffff; border: 3px solid #cbd5e1; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.9em; color: #64748b; transition: all 0.3s ease; box-shadow: 0 0 0 4px #ffffff; }
.timeline-label { margin-top: 8px; font-size: 0.85em; font-weight: 600; color: #64748b; text-transform: uppercase; white-space: nowrap; }

/* Node Status Variations */
.node-passed .timeline-dot { background: var(--primary); border-color: var(--primary); color: var(--black); }
.node-passed .timeline-label { color: var(--black); }

.node-current .timeline-dot { background: #ffffff; border-color: var(--primary); color: var(--black); box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.15); }
.node-current .timeline-label { color: #1e293b; font-weight: bold; }

.node-rejected .timeline-dot { background: #dc2626; border-color: #dc2626; color: #ffffff; }
.node-rejected .timeline-label { color: #dc2626; }

/* Tooltips */
.timeline-tooltip {
    position: absolute;
    bottom: 55px; 
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 260px;
    background: #1e293b;
    color: #f8fafc;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.25);
    font-size: 0.82em;
    line-height: 1.4;
    text-align: left;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
}

.timeline-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.timeline-node:hover .timeline-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tooltip-header { font-weight: bold; font-size: 1.05em; color: #38bdf8; border-bottom: 1px solid #334155; padding-bottom: 4px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.tooltip-status { font-weight: bold; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; font-size: 0.85em; }
.status-lbl-passed { background: #0369a1; color: #e0f2fe; }
.status-lbl-current { background: #16a34a; color: #dcfce7; }
.status-lbl-rejected { background: #991b1b; color: #fee2e2; }
.status-lbl-pending { background: #475569; color: #f1f5f9; }

/* ==========================================================================
   12. ANIMATIONS & MEDIA QUERIES
   ========================================================================== */
@keyframes fade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .page-wrapper {
        margin-left: 0px;
    }
    
    .admin-table, .profile-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .admin-content {
        padding: 15px;
    }

    .auth-grid {
        flex-direction: column;
    }

    .card.login-card {
        width: 95%;
    }
}