
/* --- DASHBOARD LAYOUT --- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.dashboard-body {
    background-color: #113c30;
    min-height: 100vh;
    color: #f5f6f8;
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    gap: 30px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    flex: 0 0 250px;
    background: #111827;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
    color: #e2e8f0;
    position: relative;               /* so toggle button stays inside */
    transition: margin-left 0.3s ease, width 0.3s ease, padding 0.3s ease;
}
/* Collapsed state – slide out of view */
.sidebar.collapsed {
    margin-left: -270px;             /* hides the sidebar completely */
    width: 0;
    padding: 0;
    overflow: hidden;
}
/* Hidden handle – appears when sidebar is collapsed */
#sidebarHandle {
    display: none;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 60px;
    background: #111827;
    border-radius: 0 8px 8px 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.sidebar-menu { list-style: none; }

.sidebar-menu li { margin-bottom: 5px; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #cbd5e1;
    border-radius: 6px;
    font-weight: 500;
    transition: 0.3s;
}

.sidebar-menu a i { width: 25px; margin-right: 10px; }

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: #1e293b;
    color: #10b981;
}

.sidebar-menu a.logout-btn {
    color: #ef4444;
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* --- MAIN CONTENT AREA --- */
.dash-content{
    flex:1;
    width:100%;
    min-width:0;
    display:flex;
    flex-direction:column;
}

.dash-content > *{
    width:100%;
}

.welcome-banner {
    background-color: #0b1721;
    color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #1e3a4d;
}

.welcome-text h2 { font-size: 1.8rem; margin-bottom: 5px; }

/* --- GRID CARDS --- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.dash-card {
    background: #0a0e3c;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transition: 0.3s;
    border: 1px solid #1f2937;
}
.dash-card:hover { transform: translateY(-3px); }

.card-icon {
    font-size: 2.5rem;
    color: #10b981;
    margin-bottom: 15px;
}
.card-label { color: #94a3b8; font-size: 0.9rem; }

/* --- RECENT REQUESTS TABLE --- */
.table-container {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px; color: var(--gray-text); font-weight: 600; border-bottom: 2px solid #f3f4f6; }
td { padding: 15px; border-bottom: 1px solid #f3f4f6; color: var(--dark-light); }

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-pending { background: #fef3c7; color: #d97706; }
.status-completed { background: #d1fae5; color: #059669; }

@media (max-width: 900px) {
    .dashboard-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .dash-grid { grid-template-columns: 1fr; }
    .welcome-banner { flex-direction: column; text-align: center; gap: 15px; }
}

/* ============================= */
/* SaaS Dashboard Additions */
/* ============================= */

.sidebar-divider{
    margin:20px 0 8px;
    padding-left:18px;
    font-size:.72rem;
    text-transform:uppercase;
    font-weight:700;
    color:#9ca3af;
}

.quick-actions{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:16px;
    margin:25px 0;
}

.quick-card{
    background:#fff;
    border-radius:12px;
    padding:20px;
    text-decoration:none;
    color:#111827;
    border:1px solid #ececec;
    display:flex;
    align-items:center;
    gap:15px;
    transition:.25s;
}

.quick-card:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.quick-card i{
    font-size:22px;
}

.quick-card.pro{
    border:2px solid #2563eb;
}

/* ---- Dashboard Activity Carousel ---- */
.activity-carousel-container {
    background: #11012e;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-top: 20px;
    border: 1px solid #1e3344;
}
.activity-header h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #e2e8f0;
}
.activity-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #10b981 #0f1a24;
}
/* Auto-scroll animation */
@keyframes scroll-carousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% + 100vw - 60px)); }
}
.activity-carousel.animating {
    animation: scroll-carousel 30s linear infinite;
}
.activity-carousel.animating:hover {
    animation-play-state: paused;
}
.activity-chip {
    flex: 0 0 auto;
    background: #1b2a38;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    white-space: nowrap;
    border: 1px solid #2a4356;
    transition: all 0.25s ease;
    cursor: pointer;
}
.activity-chip:hover {
    background: #1e3a4d;
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(16,185,129,0.2);
}
.activity-chip i {
    font-size: 1.4rem;
    color: #10b981;
}
.chip-tool {
    font-weight: 600;
    color: #f1f5f9;
}
.chip-result {
    color: #94a3b8;
}
.chip-date {
    color: #64748b;
    font-size: 0.8rem;
}
.activity-placeholder {
    color: #64748b;
    font-style: italic;
    padding: 10px;
}

.card-number { font-size: 2rem; font-weight: 700; color: #ffffff; }

#navUserName {
    color: #ffffff !important;
}

/* ---------- Verified Emails icon green ---------- */
.dash-card:first-child .card-icon i {
    color: #10b981 !important;   /* bright green */
}

/* ---------- User name button style ---------- */
#navUserName {
    display: inline-block;
    background: #111827;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid #1f2937;
    margin-right: 10px;
}

/* ---------- Carousel stays inside its background ---------- */
.activity-carousel-container {
    overflow: hidden;        /* never spills out */
}

/* Remove auto‑scroll animation – rely on manual scroll */
.activity-carousel.animating {
    animation: none !important;
}

/* Toolkit page dark background */
.toolkit-page {
    background: #0f1a24 !important;
}

/* --- SIDEBAR COLLAPSE TOGGLE BUTTON --- */
#sidebarToggle {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
}
#sidebarToggle:hover {
    color: #10b981;
}

/* --- Toolkit page – main heading --- */
.tool-header h1 {
    font-size: 2.6rem;       /* bigger */
    color: #ffffff !important; /* pure white */
}

/* Toolkit page – subtext */
.tool-header p {
    color: #f6f6f7 !important; /* light grey, easy to read */
}
/* ---------- Search History page ---------- */
.table-container {
    background: #0f1a24 !important;
    border: 1px solid #1e3344;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    max-height: 600px;
    overflow-y: auto;
}
.table-container h2 {
    color: #ffffff !important;
}
.history-row {
    background: #1a2332;
    border: 1px solid #2d3a4a;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}
.history-row strong {
    color: #10b981;
}
.history-query {
    margin-left: 15px;
    color: #cbd5e1;
}
.history-results {
    margin-left: 15px;
    font-size: 0.8rem;
    color: #94a3b8;
}
.history-date {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}
.pagination-btn {
    background: #1e293b;
    color: #ffffff;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}
.pagination-btn:hover {
    background: #334155;
}
.pagination-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    font-weight: 700;
}

/* --- Profile Edit Form (dark theme) --- */
#profileEdit {
    background: #000000 !important;
    color: #ffffff;
    border: 1px solid #333;
}
#profileEdit input {
    background: #111111;
    color: #ffffff;
    border: 1px solid #444;
}
#profileEdit label {
    color: #cccccc;
}
#profileEdit button[type="submit"] {
    background: #10b981;
}
#profileEdit button[type="button"] {
    background: #333333;
    color: #ffffff;
}