/* ==========================================================================
   DESIGN SYSTEM - HSF Soluções Financeiras (HACK Soluções LTDA.)
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #b89d5b;
    --primary-hover: #a5894b;
    --accent: #d6ba77;
    --dark: #1c1a17;
    --dark-slate: #1A202C;
    --light-bg: #f7f5f1;
    --light-card: #ffffff;
    --sand-secondary: #f5f1e6;
    --border-color: #e0d9c6;
    
    /* Support Colors */
    --success: #1b5e20;
    --success-light: #eff7f0;
    --info: #0d47a1;
    --info-light: #d3e0f1;
    --danger: #b71c1c;
    --danger-light: #ffebee;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout Rules */
    --max-width: 1200px;
    --border-radius: 12px;
    --border-radius-large: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(28, 26, 23, 0.05);
    --shadow-hover: 0 20px 40px rgba(28, 26, 23, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--light-bg);
    color: var(--dark);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

/* Helpers */
.max-width-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-2-3 {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
}

.margin-top {
    margin-top: 32px;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--sand-secondary);
    color: var(--primary-hover);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 24px 0;
}

/* Header & Navigation Styles */
.main-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-content {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    cursor: pointer;
}

.hsf-logo {
    height: 40px;
}

.desktop-nav ul {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-item {
    padding: 10px 18px;
    font-weight: 500;
    font-size: 14px;
    color: var(--dark);
    cursor: pointer;
    border-radius: 50px;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: var(--sand-secondary);
    color: var(--primary-hover);
}

.nav-item.active {
    background-color: var(--dark);
    color: #ffffff;
}

.nav-item.operator-badge {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.operator-badge:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--dark);
    padding: 8px;
}

.mobile-menu {
    display: none;
    background-color: var(--light-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu li {
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid var(--light-bg);
}

.mobile-operator-link {
    color: var(--primary);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    padding: 64px 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--light-bg) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-text h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 18px;
    color: var(--dark);
}

.hero-text p {
    font-size: 16px;
    color: #555555;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-svg {
    width: 100%;
    max-height: 340px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.06));
}

/* Features Grid */
.features-grid {
    padding: 60px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background-color: var(--light-card);
    border: 1px solid var(--border-color);
    padding: 32px 24px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.feature-card .icon-circle {
    width: 50px;
    height: 50px;
    background-color: var(--sand-secondary);
    color: var(--primary-hover);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-card:hover .icon-circle {
    background-color: var(--primary);
    color: #ffffff;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.feature-card p {
    color: #666666;
    font-size: 14px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.feature-card .learn-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.feature-card:hover .learn-more {
    gap: 12px;
}

/* Compliance Card */
.compliance-section {
    padding: 0 24px 60px;
}

.compliance-card {
    background-color: var(--sand-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px 32px;
    display: flex;
    gap: 24px;
    align-items: center;
}

.compliance-icon {
    font-size: 32px;
    color: var(--primary-hover);
}

.compliance-text h4 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--dark);
}

.compliance-text p {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

/* Footer */
.main-footer {
    background-color: var(--dark);
    color: #a0a0a0;
    padding: 48px 0;
    margin-top: 64px; /* Space between content and footer */
    border-top: 1px solid #333333;
    font-size: 13px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-left p, .footer-right p {
    margin-bottom: 6px;
}

.footer-left strong, .footer-right strong {
    color: #ffffff;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--sand-secondary);
    color: var(--dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background-color: #144517;
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #8c1414;
}

.btn-large {
    padding: 14px 32px;
    font-size: 15px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

/* TAB NAVIGATION SYSTEM */
.tab-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-section.active-tab {
    display: block;
}

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

/* Dashboard Sub-Tabs for Supreme Admin */
.dashboard-tabs-bar {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    padding-bottom: 4px;
}

.dashboard-tab-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    opacity: 0.6;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.dashboard-tab-btn:hover {
    opacity: 0.9;
}

.dashboard-tab-btn.active {
    opacity: 1;
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Badge System */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}
.badge-warning {
    background-color: var(--sand-secondary);
    color: var(--primary-hover);
}
.badge-orange {
    background-color: #fff3e0;
    color: #ef6c00;
}
.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* General Layout Cards */
.card {
    background-color: var(--light-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.section-title {
    max-width: 600px;
    margin: 48px auto 32px;
    text-align: center;
}

.section-title h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.section-title p {
    color: #666666;
    font-size: 15px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--light-bg);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--dark);
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 157, 91, 0.15);
}

/* Simulador specific styles */
.result-card {
    display: flex;
    flex-direction: column;
}

.result-highlight-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background-color: var(--sand-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.highlight-item {
    display: flex;
    flex-direction: column;
}

.highlight-item .label {
    font-size: 11px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
}

.highlight-item .value {
    font-size: 18px;
    font-weight: 700;
}

#res-max-loan-pct {
    font-size: 30px;
    margin-top: 2px;
}

.highlight-item .value.gold {
    color: var(--primary-hover);
}

.amortization-selector {
    margin-bottom: 24px;
}

.amortization-selector label {
    margin-bottom: 8px;
    display: block;
}

.radio-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    background-color: var(--light-bg);
    padding: 4px;
    border-radius: 8px;
}

.radio-toggle input[type="radio"] {
    display: none;
}

.radio-toggle label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #666666;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
    transition: var(--transition);
}

.radio-toggle input[type="radio"]:checked + label {
    background-color: #ffffff;
    color: var(--dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.detailed-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.result-row span {
    color: #666666;
}

.result-row strong {
    font-weight: 600;
}

.result-row .large-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.info-badge {
    background-color: var(--success-light);
    color: var(--success);
    font-weight: 600;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid rgba(27, 94, 32, 0.1);
}

/* Tables style */
.responsive-table {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

th, td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: #555555;
    background-color: var(--sand-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background-color: rgba(245, 241, 230, 0.3);
}

.table-footnote {
    font-size: 11px;
    color: #888888;
    margin-top: 16px;
}

/* MULTI-STEP PROPOSAL STYLES */
.stepper-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 760px;
    margin: 0 auto 32px;
    padding: 0 20px;
}

.step-ind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-num {
    width: 36px;
    height: 36px;
    background-color: var(--border-color);
    color: #666666;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
}

.step-text {
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    white-space: nowrap;
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background-color: var(--border-color);
    margin: 0 16px;
    transform: translateY(-16px);
}

.step-ind.active .step-num {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(184, 157, 91, 0.2);
}

.step-ind.active .step-text {
    color: var(--dark);
    font-weight: 700;
}

.step-ind.completed .step-num {
    background-color: var(--dark);
    color: #ffffff;
}

.step-ind.completed .step-text {
    color: var(--dark);
}

.proposal-step {
    display: none;
}

.proposal-step.active-step-panel {
    display: block;
    animation: fadeIn 0.4s ease;
}

.proposal-step h3 {
    margin-bottom: 24px;
    font-size: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.step-info-text {
    background-color: var(--info-light);
    color: var(--info);
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Upload zone styles */
.documents-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.upload-zone-wrapper {
    background-color: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.upload-zone-wrapper:hover,
.upload-zone-wrapper.dragover {
    border-color: var(--primary);
    background-color: rgba(184, 157, 91, 0.05);
}

.upload-icon {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 12px;
}

.upload-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.upload-desc {
    font-size: 11px;
    color: #666666;
    margin-bottom: 16px;
}

.upload-input-file {
    display: none;
}

.upload-btn-label {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.upload-btn-label:hover {
    background-color: var(--sand-secondary);
}

/* Uploaded Files Display */
.uploaded-files-list {
    margin-top: 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    overflow: hidden;
}

.file-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    color: #888888;
}

.file-item-delete {
    color: var(--danger);
    cursor: pointer;
    padding: 4px;
}

.file-progress-bar-wrapper {
    height: 3px;
    background-color: var(--light-bg);
    width: 100%;
    margin-top: 4px;
    border-radius: 5px;
    overflow: hidden;
}

.file-progress-bar {
    height: 100%;
    background-color: var(--success);
    width: 0;
    transition: width 0.5s ease;
}

/* CHECKLIST MODULE STYLES */
.checklist-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checklist-options h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-top: 12px;
    margin-bottom: 2px;
    font-weight: 700;
}

.check-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.check-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

/* Checklist Sheet style */
.checklist-sheet-card {
    padding: 0;
    overflow: hidden;
}

.checklist-actions-header {
    background-color: var(--sand-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.printable-checklist {
    padding: 40px;
    background-color: #ffffff;
}

.checklist-print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 11px;
}

.print-logo {
    display: flex;
    flex-direction: column;
}

.print-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
}

.print-logo .sub-text {
    color: #888888;
}

.print-meta {
    text-align: right;
    color: #555555;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.print-divider {
    border: 0;
    height: 2px;
    background-color: var(--dark);
    margin: 20px 0;
}

.checklist-title-h4 {
    font-size: 18px;
    text-align: center;
    color: var(--dark);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.checklist-subtitle {
    font-size: 12px;
    text-align: center;
    color: #666666;
    margin-bottom: 32px;
}

.checklist-cat-group {
    margin-bottom: 24px;
}

.checklist-cat-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-hover);
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checklist-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chk-item {
    display: flex;
    gap: 12px;
    font-size: 13px;
    align-items: flex-start;
}

.chk-box-mock {
    width: 14px;
    height: 14px;
    border: 1px solid var(--dark);
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 3px;
}

.chk-item-text strong {
    font-weight: 600;
}

.chk-item-text span {
    display: block;
    font-size: 11px;
    color: #777777;
    margin-top: 2px;
}

.checklist-print-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
    padding-top: 20px;
    font-size: 11px;
    color: #666666;
    text-align: center;
}

.checklist-print-footer .contacts {
    margin-top: 6px;
    font-size: 12px;
    color: var(--dark);
}

/* CLIENT PORTAL / TRACKING SYSTEM */
.search-tracking-box {
    max-width: 760px;
    margin: 0 auto 32px;
    padding: 20px;
}

.search-input-group {
    display: flex;
    position: relative;
    width: 100%;
}

.search-input-group input {
    padding-left: 48px;
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888888;
}

.search-input-group button {
    border-radius: 0 8px 8px 0;
    white-space: nowrap;
    padding: 0 24px;
}

.tracking-empty-state {
    text-align: center;
    padding: 60px 0;
    color: #888888;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.client-info-summary {
    background-color: var(--dark);
    color: #ffffff;
    border: none;
}

.client-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.client-meta-grid div {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 10px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
}

.meta-value {
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.meta-value.gold {
    color: var(--accent);
}

/* Stepper tracking progress line */
.vertical-stepper {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 20px;
}

.vertical-stepper::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 0;
}

.stepper-step {
    display: flex;
    gap: 24px;
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.stepper-step:last-child {
    margin-bottom: 0;
}

.stepper-step .step-icon {
    width: 32px;
    height: 32px;
    background-color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: #888888;
    flex-shrink: 0;
    transition: var(--transition);
}

.stepper-step.completed .step-icon {
    background-color: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.stepper-step.active .step-icon {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(184, 157, 91, 0.2);
}

.step-details h4 {
    font-size: 15px;
    font-weight: 700;
    color: #555555;
    transition: var(--transition);
}

.stepper-step.completed h4,
.stepper-step.active h4 {
    color: var(--dark);
}

.step-desc {
    font-size: 13px;
    color: #777777;
    margin-top: 4px;
}

.step-date {
    display: inline-block;
    font-size: 11px;
    color: #999999;
    font-weight: 500;
    margin-top: 6px;
}

/* Chat bubble styling for operator notes */
.notes-history {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 18px;
}

.message-bubble {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    position: relative;
}

.message-bubble.system {
    border-left: 4px solid var(--primary);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #666666;
    margin-bottom: 6px;
}

.message-bubble p {
    font-size: 13px;
    color: var(--dark);
}

/* ADMIN/OPERADOR STYLES */
.operator-auth-container {
    max-width: 440px;
    margin: 64px auto;
}

.auth-card {
    text-align: center;
    padding: 48px 36px;
}

.lock-icon-circle {
    width: 64px;
    height: 64px;
    background-color: var(--sand-secondary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin: 0 auto 24px;
}

.auth-helper-text {
    display: block;
    font-size: 11px;
    color: #888888;
    margin-top: 10px;
}

/* Dashboard Panel */
.operator-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 24px;
}

.stat-card {
    background-color: var(--light-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    margin-top: 8px;
}

.stat-value.blue { color: var(--info); }
.stat-value.gold { color: var(--primary); }
.stat-value.green { color: var(--success); }

.table-header-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-controls {
    display: flex;
    gap: 12px;
}

.filter-controls input {
    width: 240px;
}

.filter-controls select {
    width: 180px;
}

.status-cell-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

/* Status variants */
.status-1 { background-color: var(--sand-secondary); color: var(--dark); }
.status-2 { background-color: var(--info-light); color: var(--info); }
.status-3 { background-color: #fef3c7; color: #d97706; } /* Yellow/Orange */
.status-4 { background-color: #f3e8ff; color: #7c3aed; } /* Purple */
.status-5 { background-color: #e0f2fe; color: #0284c7; } /* Cyan */
.status-6 { background-color: var(--success-light); color: var(--success); }

.table-empty-state {
    text-align: center;
    padding: 48px 0;
    color: #888888;
}

.table-empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
}

/* MODALS LAYOUT */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(28, 26, 23, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active-modal {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--light-card);
    width: 90%;
    max-width: 860px;
    max-height: 90vh;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-overlay.active-modal .modal-card {
    transform: translateY(0);
}

.modal-card.mini-modal {
    max-width: 500px;
}

.modal-header {
    background-color: var(--dark);
    color: #ffffff;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 18px;
}

.close-modal-btn {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #aaaaaa;
    transition: var(--transition);
}

.close-modal-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.modal-left-details h4, .modal-right-actions h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-hover);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

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

.details-list p {
    font-size: 13px;
}

.details-list strong {
    font-weight: 600;
    color: #666666;
}

.modal-documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-download-item {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}

.doc-download-item:hover {
    background-color: var(--sand-secondary);
    border-color: var(--primary);
}

.doc-download-item i {
    color: var(--primary);
}

.modal-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* Canvas output for preview checklist */
.canvas-preview-container {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* RESPONSIVE DESIGN - MEDIA QUERIES */

@media (max-width: 992px) {
    .grid-2, .grid-2-3, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: auto;
    }

    .hero-section {
        padding: 40px 0;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-text p {
        margin: 0 auto 24px;
    }

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

    .hero-graphic {
        margin-top: 32px;
    }
    
    .client-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    .result-highlight-box {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .check-group label {
        flex: 1;
        min-width: 0;
        white-space: normal;
    }

    .desktop-nav {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    /* Stepper Mobile - Vertical layout to avoid overflow */
    .stepper-indicator {
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .step-ind {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .step-text {
        font-size: 13px !important;
        white-space: normal !important;
        text-align: left;
    }
    
    .step-line {
        display: none !important;
    }
    
    /* Hero Buttons - Stack vertically */
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
    }
    
    /* Income Calculator - Single column grid */
    .income-calc-result-box {
        grid-template-columns: 1fr !important;
        gap: 12px;
        padding: 14px;
        grid-column: auto !important;
    }
    
    /* Operator Dashboard Controls - Stack search filters */
    .filter-controls {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .filter-controls input,
    .filter-controls select,
    .filter-controls button {
        width: 100% !important;
    }
    
    .documents-upload-grid {
        grid-template-columns: 1fr;
    }
    
    .compliance-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .printable-checklist {
        padding: 24px;
    }
}

/* ==========================================================================
   PRINT MEDIA RULES (Styled specifically for checklist export to PDF)
   ========================================================================== */

@media print {
    @page {
        size: A4;
        margin: 1.5cm;
    }

    body {
        background: #ffffff !important;
        color: #1f2937 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body * {
        visibility: hidden;
    }

    #checklist-printable-area,
    #checklist-printable-area * {
        visibility: visible;
    }

    #checklist-printable-area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        padding: 30px !important;
        margin: 0 !important;
        border: 1.5px solid #b89d5b !important;
        border-radius: 8px !important;
        background-color: #ffffff !important;
        color: #1f2937 !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
    }

    .checklist-actions-header {
        display: none !important;
    }

    /* Print color scheme adjustments */
    .print-logo .logo-text,
    .checklist-title-h4,
    .chk-item strong {
        color: #111827 !important;
    }

    .print-logo .sub-text,
    .checklist-subtitle,
    .chk-item span,
    .checklist-print-footer p {
        color: #4b5563 !important;
    }

    .checklist-cat-title {
        border-bottom: 2px solid #b89d5b !important;
        padding-bottom: 4px !important;
        margin-top: 24px !important;
        font-weight: 700 !important;
        color: #b89d5b !important;
    }

    .chk-box-indicator {
        border-color: #b89d5b !important;
    }

    .chk-item.delivered .chk-box-indicator {
        background-color: #b89d5b !important;
        border-color: #b89d5b !important;
    }

    .print-divider {
        border-top: 1px solid #e5e7eb !important;
        margin: 16px 0 !important;
    }

    .checklist-print-footer {
        border-top: 1px solid #e5e7eb !important;
        margin-top: 32px !important;
        padding-top: 16px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .chk-item {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

/* ==========================================================================
   DARK MODE & SETTINGS CARD IMPROVEMENTS
   ========================================================================== */

/* Theme Toggle Styling */
.theme-toggle {
    cursor: pointer;
    font-size: 16px;
    padding: 10px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    background-color: var(--sand-secondary);
    color: var(--dark);
    margin-left: 12px;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

/* Suffix Input styling */
.input-suffix-group {
    display: flex;
    position: relative;
    width: 100%;
}

.input-suffix-group input {
    border-radius: 8px 0 0 8px;
    border-right: none;
    flex-grow: 1;
}

.input-suffix-group .suffix {
    background-color: var(--sand-secondary);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 8px 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #555555;
}

/* Settings Card Layout */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.settings-desc {
    font-size: 13px;
    color: #666666;
    margin-bottom: 8px;
}

/* DARK MODE STYLES */
body.dark-mode {
    --light-bg: #111827; /* Dark slate */
    --light-card: #1f2937; /* Dark card background */
    --dark: #f3f4f6; /* White text */
    --sand-secondary: #374151; /* Dark grey for secondary highlights */
    --border-color: #4b5563; /* Darker border */
    --info: #93c5fd;
    --info-light: rgba(13, 71, 161, 0.25);
    color: #f3f4f6;
}

body.dark-mode .upload-desc {
    color: #9ca3af;
}

body.dark-mode .main-header {
    background-color: rgba(31, 41, 55, 0.85);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .nav-item {
    color: #d1d5db;
}

body.dark-mode .nav-item:hover {
    background-color: var(--sand-secondary);
    color: #ffffff;
}

body.dark-mode .nav-item.active {
    background-color: #ffffff;
    color: #111827;
}

body.dark-mode .hsf-logo text {
    fill: #ffffff;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #111827;
    border-color: var(--border-color);
    color: #f3f4f6;
    color-scheme: dark;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    background-color: #1f2937;
    border-color: var(--primary);
}

/* Opções do <select> no dark mode */
body.dark-mode select option {
    background-color: #1a2035;
    color: #f3f4f6;
}

body.dark-mode select option:hover,
body.dark-mode select option:focus,
body.dark-mode select option:checked {
    background-color: var(--primary);
    color: #ffffff;
}

/* Select específico da barra de ações em lote */
body.dark-mode #op-bulk-status-select {
    background-color: #1a2035 !important;
    border: 1px solid var(--primary) !important;
    color: #f3f4f6 !important;
    color-scheme: dark;
}

body.dark-mode #op-bulk-status-select option {
    background-color: #1a2035;
    color: #f3f4f6;
}

body.dark-mode #op-bulk-status-select option:checked {
    background-color: var(--primary);
    color: #ffffff;
}

body.dark-mode .hero-section {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .hero-text p {
    color: #9ca3af;
}

body.dark-mode .hero-svg rect {
    fill: #1f2937;
}

body.dark-mode .hero-svg text {
    fill: #ffffff;
}

body.dark-mode .hero-svg rect[fill="#ffffff"] {
    fill: #111827;
}

body.dark-mode .feature-card p {
    color: #9ca3af;
}

body.dark-mode .compliance-text p {
    color: #9ca3af;
}

body.dark-mode th {
    background-color: var(--sand-secondary);
    color: #e5e7eb;
}

body.dark-mode tr:hover {
    background-color: rgba(55, 65, 81, 0.3);
}

body.dark-mode .step-text {
    color: #9ca3af;
}

body.dark-mode .step-num {
    background-color: #374151;
    color: #9ca3af;
}

body.dark-mode .step-ind.active .step-num {
    background-color: var(--primary);
    color: #ffffff;
}

body.dark-mode .step-ind.active .step-text {
    color: #ffffff;
}

body.dark-mode .step-ind.completed .step-num {
    background-color: #ffffff;
    color: #111827;
}

body.dark-mode .step-ind.completed .step-text {
    color: #ffffff;
}

body.dark-mode .upload-zone-wrapper {
    background-color: #111827;
}

body.dark-mode .upload-btn-label {
    background-color: #1f2937;
    color: #f3f4f6;
}

body.dark-mode .upload-btn-label:hover {
    background-color: #374151;
}

body.dark-mode .file-item {
    background-color: #1f2937;
}

body.dark-mode .printable-checklist {
    background-color: #1f2937;
}

body.dark-mode .print-logo .logo-text {
    color: #ffffff;
}

body.dark-mode .checklist-title-h4 {
    color: #ffffff;
}

body.dark-mode .checklist-subtitle {
    color: #9ca3af;
}

body.dark-mode .chk-box-mock {
    border-color: #ffffff;
}

body.dark-mode .chk-item-text span {
    color: #9ca3af;
}

body.dark-mode .checklist-print-footer .contacts {
    color: #ffffff;
}

body.dark-mode .stepper-step .step-icon {
    background-color: #1f2937;
}

body.dark-mode .stepper-step.completed .step-icon {
    background-color: var(--success);
}

body.dark-mode .stepper-step.active .step-icon {
    background-color: var(--primary);
}

body.dark-mode .step-desc {
    color: #9ca3af;
}

body.dark-mode .message-bubble {
    background-color: #111827;
}

body.dark-mode .message-bubble p {
    color: #f3f4f6;
}

body.dark-mode .lock-icon-circle {
    background-color: #374151;
}

body.dark-mode .stat-card {
    background-color: #1f2937;
}

body.dark-mode .stat-label {
    color: #9ca3af;
}

body.dark-mode .input-suffix-group .suffix {
    background-color: var(--sand-secondary);
    color: #f3f4f6;
}

body.dark-mode .modal-card {
    background-color: #1f2937;
}

body.dark-mode .modal-header {
    background-color: #111827;
}

body.dark-mode .doc-download-item {
    background-color: #111827;
}

body.dark-mode .doc-download-item:hover {
    background-color: #374151;
}

body.dark-mode .canvas-preview-container {
    background-color: #111827;
}

/* Print styles consolidated in the main print block above */

/* ==========================================================================
   INCOME CALCULATOR & OPERATOR STYLES
   ========================================================================== */
.income-calc-result-box {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background-color: var(--sand-secondary);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.inc-res-item {
    display: flex;
    flex-direction: column;
}

.inc-res-item .label {
    font-size: 11px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
}

.inc-res-item strong {
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.inc-res-item strong.gold {
    color: var(--primary-hover);
    font-size: 18px;
}

.auth-toggle-link {
    font-size: 13px;
    text-align: center;
    color: #666666;
}

.auth-toggle-link a {
    font-weight: 600;
    color: var(--primary);
    text-decoration: underline;
}

.auth-toggle-link a:hover {
    color: var(--primary-hover);
}

/* Dark mode overrides */
body.dark-mode .income-calc-result-box {
    background-color: #111827;
}

body.dark-mode .inc-res-item .label {
    color: #9ca3af;
}

body.dark-mode .auth-toggle-link {
    color: #9ca3af;
}

body.dark-mode .auth-toggle-link a {
    color: var(--accent);
}

/* Settings Panel Enhancements */
.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.settings-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card h3::before {
    content: "\f013";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--accent);
}

.settings-desc {
    font-size: 13px;
    color: #666666;
}

body.dark-mode .settings-desc {
    color: #9ca3af;
}

/* Dark Mode Contrast and Accessibility Overrides */
body.dark-mode label {
    color: #d1d5db; /* High-contrast light gray for form labels */
}

body.dark-mode .table-footnote,
body.dark-mode .step-info-text,
body.dark-mode .help-card p,
body.dark-mode .tracking-empty-state p,
body.dark-mode .result-row span {
    color: #d1d5db; /* Increase text readability on dark surfaces */
}

body.dark-mode h4,
body.dark-mode h3 {
    color: #ffffff; /* Fully white headers for hierarchy contrast */
}

body.dark-mode ::placeholder {
    color: #9ca3af !important; /* Make placeholders clearly legible */
}

body.dark-mode .doc-download-item span {
    color: #f3f4f6;
}

body.dark-mode .details-list p strong {
    color: #ffffff;
}

body.dark-mode .details-list p {
    color: #d1d5db;
}

body.dark-mode .compliance-text p {
    color: #d1d5db;
}

body.dark-mode .compliance-text h4 {
    color: #ffffff;
}

body.dark-mode .step-ind .step-text {
    color: #9ca3af;
}

body.dark-mode .step-ind.active .step-text {
    color: #ffffff;
    font-weight: 600;
}

/* Specific Dark Mode Contrast Fixes for Toggle Buttons and Footer */
body.dark-mode .radio-toggle input[type="radio"]:checked + label {
    background-color: #ffffff !important;
    color: #111827 !important; /* Force high-contrast dark gray text on white active toggle button */
}

body.dark-mode .radio-toggle label {
    color: #9ca3af; /* Legible light gray for inactive toggle buttons */
}

body.dark-mode .main-footer {
    background-color: #0b0f19 !important; /* Force deep dark background on footer */
    border-top: 1px solid #1f2937;
    color: #9ca3af;
}

body.dark-mode .main-footer strong {
    color: #ffffff;
}

/* Glassmorphic status badges for dark mode */
body.dark-mode .badge-success {
    background-color: rgba(27, 94, 32, 0.25) !important;
    color: #81c784 !important;
}
body.dark-mode .badge-warning {
    background-color: rgba(214, 186, 119, 0.25) !important;
    color: #ffd54f !important;
}
body.dark-mode .badge-orange {
    background-color: rgba(239, 108, 0, 0.25) !important;
    color: #ffb74d !important;
}
body.dark-mode .badge-danger {
    background-color: rgba(183, 28, 28, 0.25) !important;
    color: #e57373 !important;
}

/* Operator Management Action Buttons & Table Styling */
#operators-list-table-body td {
    white-space: nowrap;
    vertical-align: middle;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--light-bg);
    color: var(--dark);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-action-success {
    color: var(--success);
    border-color: var(--success);
    background-color: var(--success-light);
}
.btn-action-success:hover:not(:disabled) {
    background-color: var(--success) !important;
    color: #ffffff !important;
    border-color: var(--success) !important;
}

.btn-action-warning {
    color: #ef6c00;
    border-color: #ef6c00;
    background-color: #fff3e0;
}
.btn-action-warning:hover:not(:disabled) {
    background-color: #ef6c00 !important;
    color: #ffffff !important;
    border-color: #ef6c00 !important;
}

.btn-action-danger {
    color: var(--danger);
    border-color: var(--danger);
    background-color: var(--danger-light);
}
.btn-action-danger:hover:not(:disabled) {
    background-color: var(--danger) !important;
    color: #ffffff !important;
    border-color: var(--danger) !important;
}

.btn-action-delete {
    color: #555555;
    border-color: #cccccc;
    background-color: #f5f5f5;
}
.btn-action-delete:hover:not(:disabled) {
    background-color: #555555 !important;
    color: #ffffff !important;
    border-color: #555555 !important;
}

/* Dark Mode Action Buttons */
body.dark-mode .btn-action {
    background-color: var(--light-card);
    color: #ffffff;
}
body.dark-mode .btn-action-success {
    background-color: rgba(27, 94, 32, 0.25);
    color: #81c784;
    border-color: #81c784;
}
body.dark-mode .btn-action-warning {
    background-color: rgba(239, 108, 0, 0.25);
    color: #ffb74d;
    border-color: #ffb74d;
}
body.dark-mode .btn-action-danger {
    background-color: rgba(183, 28, 28, 0.25);
    color: #e57373;
    border-color: #e57373;
}
body.dark-mode .btn-action-delete {
    background-color: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    border-color: #4b5563;
}
body.dark-mode .btn-action-delete:hover:not(:disabled) {
    background-color: #4b5563 !important;
    color: #ffffff !important;
    border-color: #4b5563 !important;
}

body.dark-mode .info-badge {
    background-color: rgba(76, 175, 80, 0.25) !important;
    color: #81c784 !important;
    border-color: rgba(129, 199, 132, 0.4) !important;
}

.simulation-disclaimer {
    margin-top: 16px;
    font-size: 11px;
    color: #666666;
    line-height: 1.45;
    text-align: justify;
    font-style: italic;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
}

body.dark-mode .simulation-disclaimer {
    color: #9ca3af;
    border-top-color: #374151;
}

body.dark-mode .client-info-summary {
    background-color: var(--light-card) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .client-info-summary .meta-value {
    color: #ffffff !important;
}

body.dark-mode .client-info-summary .meta-value.gold {
    color: #ad965d !important;
}

body.dark-mode .client-info-summary .meta-label {
    color: #9ca3af !important;
}

/* ─── Cost Summary Card ───────────────────────────────────────────────── */
.cost-summary-card {
    padding: 24px;
}

.cost-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cost-summary-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 4px 0;
}

.cost-summary-subtitle {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.cost-summary-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .cost-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 540px) {
    .cost-summary-grid {
        grid-template-columns: 1fr !important;
    }
}

.cost-tile {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 16px;
    background: var(--light-bg);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cost-tile:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}

.cost-tile--highlight {
    background: linear-gradient(135deg, #0f2027, #1a3a4a);
    border-color: transparent;
    color: #fff;
}

.cost-tile--highlight .cost-tile-label,
.cost-tile--highlight .cost-tile-note {
    color: rgba(255,255,255,0.65);
}

.cost-tile--highlight .cost-tile-value {
    color: #ffd87a;
    font-size: 22px;
}

.cost-tile--danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(254, 242, 242, 0.6);
}

.cost-tile--danger .cost-tile-value {
    color: #dc2626;
}

.cost-tile-ratio {
    color: #dc2626 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

.cost-tile-icon {
    font-size: 20px;
    margin-bottom: 6px;
    line-height: 1;
}

.cost-tile-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.cost-tile-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    margin: 4px 0 2px;
}

.cost-tile-note {
    font-size: 11px;
    color: #aaa;
}

/* Dark mode overrides */
body.dark-mode .cost-tile {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .cost-tile--highlight {
    background: linear-gradient(135deg, #0f2027, #1a3a4a);
    border-color: transparent;
}

body.dark-mode .cost-tile--danger {
    background: rgba(127, 29, 29, 0.22);
    border-color: rgba(220, 38, 38, 0.28);
}

body.dark-mode .cost-tile-value {
    color: #f1f5f9;
}

body.dark-mode .cost-tile-label {
    color: #94a3b8;
}

body.dark-mode .cost-tile-note {
    color: #64748b;
}

body.dark-mode .cost-summary-header h3 {
    color: #f1f5f9;
}

body.dark-mode .cost-summary-subtitle {
    color: #64748b;
}

/* ==========================================================================
   PUSH NOTIFICATIONS (TOASTS)
   ========================================================================== */
.hsf-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 360px;
    max-width: 90vw;
    pointer-events: none;
}

.hsf-toast {
    background-color: #111827;
    color: #f3f4f6;
    border: 1px solid #374151;
    border-left: 4px solid #b89d5b;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: hsf-toast-in 0.3s ease forwards;
    transition: all 0.3s ease;
}

.hsf-toast.hide {
    animation: hsf-toast-out 0.3s ease forwards;
}

.hsf-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.hsf-toast-content {
    flex-grow: 1;
}

.hsf-toast-success {
    border-left-color: #10b981;
}
.hsf-toast-success .hsf-toast-icon {
    color: #10b981;
}

.hsf-toast-error {
    border-left-color: #ef4444;
}
.hsf-toast-error .hsf-toast-icon {
    color: #ef4444;
}

.hsf-toast-warning {
    border-left-color: #f59e0b;
}
.hsf-toast-warning .hsf-toast-icon {
    color: #f59e0b;
}

.hsf-toast-info {
    border-left-color: #b89d5b;
}
.hsf-toast-info .hsf-toast-icon {
    color: #b89d5b;
}

@keyframes hsf-toast-in {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes hsf-toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* INTERACTIVE CHECKLIST CUSTOM CHECKBOXES & STYLES */
.chk-item input[type="checkbox"] {
    display: none;
}

.chk-box-indicator {
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background-color: transparent;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checked state */
.chk-item.delivered .chk-box-indicator {
    background-color: var(--primary);
    border-color: var(--primary);
}

.chk-item.delivered .chk-box-indicator::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 1px;
}

/* Delivered Text Styling */
.chk-item.delivered .chk-item-text strong {
    text-decoration: line-through;
    opacity: 0.5;
}

.chk-item.delivered .chk-item-text span {
    opacity: 0.4;
}

/* Dynamic Filter Visibility */
.hide-delivered .chk-item.delivered {
    display: none !important;
}

/* Dark mode overrides */
body.dark-mode .chk-box-indicator {
    border-color: #ad965d;
}
body.dark-mode .chk-item.delivered .chk-box-indicator {
    background-color: #ad965d;
    border-color: #ad965d;
}

/* Client Portal Styles */
.grid-1-3 {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .grid-1-3 {
        grid-template-columns: 1fr;
    }
}

/* Badge status variants */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.status-1 { background-color: var(--sand-secondary); color: var(--dark); }
.badge.status-2 { background-color: var(--info-light); color: var(--info); }
.badge.status-3 { background-color: #fef3c7; color: #d97706; }
.badge.status-4 { background-color: #f3e8ff; color: #7c3aed; }
.badge.status-5 { background-color: #e0f2fe; color: #0284c7; }
.badge.status-6 { background-color: var(--success-light); color: var(--success); }

/* Destructive alert boxes */
.alert-box {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.08);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background-color: rgba(5, 150, 105, 0.08);
    border: 1px solid var(--success);
    color: var(--success);
}

/* Audit table badge additions */
.badge-danger {
    background-color: rgba(220, 38, 38, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.badge-success {
    background-color: rgba(5, 150, 105, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Code block styles */
code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 12px;
}

body.dark-mode code {
    background: #27272a;
}
