/* -------------------------------------------------------------
 * ANPD COMPLIANCE STYLESHEET
 * Premium Visual Design System - Dark & Light Modes Supported
 * ------------------------------------------------------------- */

/* VARIABLES & PALETTE */
:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    
    /* Dark Theme Core (Default) */
    --bg-primary: #080c14;
    --bg-secondary: #0f1524;
    --bg-sidebar: #0b0f1a;
    --bg-card: rgba(21, 27, 44, 0.7);
    --bg-card-heavy: rgba(15, 21, 36, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: rgba(139, 92, 246, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Accents (Saturated, Premium HSL Colors) */
    --accent-primary: #8b5cf6; /* Electric Violet */
    --accent-primary-glow: rgba(139, 92, 246, 0.25);
    --accent-secondary: #06b6d4; /* Cyan */
    --accent-secondary-glow: rgba(6, 182, 212, 0.2);
    
    --success: #10b981; /* Emerald */
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b; /* Amber */
    --warning-glow: rgba(245, 158, 11, 0.15);
    --danger: #ef4444; /* Rose */
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --sidebar-width: 260px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables Toggle */
body.light-theme {
    --bg-primary: #f6f8fb;
    --bg-secondary: #ffffff;
    --bg-sidebar: #f0f3f8;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-heavy: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-focus: rgba(139, 92, 246, 0.5);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-primary-glow: rgba(139, 92, 246, 0.15);
    --accent-secondary-glow: rgba(6, 182, 212, 0.15);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.05), 0 4px 10px rgba(0,0,0,0.03);
}

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* APP STRUCTURE */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    position: relative;
    padding: 0 8px;
}

.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(10px);
    left: 8px;
    top: -4px;
    pointer-events: none;
}

.logo-icon {
    font-size: 24px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-primary-glow));
}

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

.logo-title {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
}

.logo-title .highlight {
    color: var(--accent-primary);
}

.logo-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover:not(.disabled) {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--text-primary);
    background-color: var(--accent-primary-glow);
    border-color: rgba(139, 92, 246, 0.2);
}

.nav-item.active i {
    color: var(--accent-primary);
}

.nav-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn i {
    width: 18px;
    height: 18px;
}

body.dark-theme .sun-icon { display: block; }
body.dark-theme .moon-icon { display: none; }
body.light-theme .sun-icon { display: none; }
body.light-theme .moon-icon { display: block; }

/* MAIN CONTENT */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.welcome-msg h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.welcome-msg p {
    font-size: 0.95rem;
    margin-top: 4px;
}

.system-alerts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.security-level {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.risk-label {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.risk-label.low {
    background-color: var(--success-glow);
    color: var(--success);
}

.risk-label.medium {
    background-color: var(--warning-glow);
    color: var(--warning);
}

.risk-label.high {
    background-color: var(--danger-glow);
    color: var(--danger);
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background-color: var(--warning-glow);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-icon {
    width: 14px;
    height: 14px;
}

/* TABS SYSTEM */
.tab-pane {
    display: none;
    flex-direction: column;
    gap: 32px;
}

.tab-pane.active {
    display: flex;
}

/* GLASSMORPHISM CARD DESIGN */
.glassmorphism {
    background-color: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.glassmorphism:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.12);
}

.glassmorphism.card-heavy {
    background-color: var(--bg-card-heavy);
}

/* WELCOME BANNER */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.banner-content {
    max-width: 65%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2;
}

.banner-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.banner-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.banner-actions {
    margin-top: 12px;
}

.banner-illustration {
    position: relative;
    z-index: 1;
    opacity: 0.2;
    transform: rotate(15deg);
    margin-right: 40px;
}

.giant-icon {
    width: 120px;
    height: 120px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 20px var(--accent-primary-glow));
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    right: -20px;
    bottom: -20px;
    opacity: 0.05;
    background-color: var(--text-primary);
}

.card-icon-container {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-container.blue {
    background-color: rgba(6, 182, 212, 0.12);
    color: var(--accent-secondary);
}

.card-icon-container.purple {
    background-color: rgba(139, 92, 246, 0.12);
    color: var(--accent-primary);
}

.card-icon-container.orange {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.card-icon-container.green {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.card-icon-container i {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* DETAILS GRID & CHARTS */
.dashboard-details-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
}

.chart-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 380px;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.chart-body {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-body canvas {
    max-height: 280px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.85rem;
    max-width: 280px;
}

/* FIELD PROTECTION LIST */
.protection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 280px;
    padding-right: 4px;
}

.protection-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.field-desc {
    display: flex;
    align-items: center;
    gap: 12px;
}

.field-desc i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.field-desc .field-name {
    font-size: 0.85rem;
    font-weight: 600;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.btn-primary:hover {
    background-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--success-glow);
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* FILE DROP ZONE */
.drop-zone {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    background-color: rgba(139, 92, 246, 0.02);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.drop-zone.dragover {
    border-color: var(--accent-primary);
    background-color: rgba(139, 92, 246, 0.06);
    transform: scale(1.01);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.drop-icon-glow {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(139, 92, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.05);
    transition: var(--transition-smooth);
}

.drop-zone:hover .drop-icon-glow {
    background-color: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.drop-icon {
    width: 36px;
    height: 36px;
    color: var(--accent-primary);
}

.drop-zone h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.supported-formats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.format-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.format-badge i {
    width: 14px;
    height: 14px;
}

/* COLUMN MAPPER PANEL */
.mapping-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.mapping-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mapping-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
}

.mapping-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.file-meta {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

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

.mapping-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mapping-form-header {
    display: grid;
    grid-template-columns: 2.2fr 2fr 2fr;
    gap: 16px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
}

.form-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mapping-rows-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mapping-row {
    display: grid;
    grid-template-columns: 2.2fr 2fr 2fr;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.mapping-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.mapping-row.matched {
    border-left: 3px solid var(--success);
}

.dest-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dest-field i {
    width: 18px;
    height: 18px;
}

.dest-field.sensitive i {
    color: var(--warning);
}

.dest-field.standard i {
    color: var(--accent-secondary);
}

.field-details {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.field-requirement {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.field-requirement.required {
    color: var(--danger);
}

/* INPUTS, SELECTS */
select, input[type="text"] {
    background-color: rgba(8, 12, 20, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

select:focus, input[type="text"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
}

.select-treatment {
    font-weight: 600;
}

.select-treatment.treatment-none { color: var(--text-muted); }
.select-treatment.treatment-mask { color: var(--warning); }
.select-treatment.treatment-anon { color: var(--success); }
.select-treatment.treatment-hash { color: var(--accent-primary); }

/* SIDEBAR CARDS */
.preview-sidebar-card {
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.preview-sidebar-card.card-violet {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.02) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.preview-sidebar-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.help-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-list li {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.help-list li strong {
    color: var(--text-primary);
}

.help-list li code {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent-secondary);
}

.glass-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
}

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

.real-time-preview {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    min-height: 120px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-x: auto;
}

.real-time-preview .preview-record {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 6px;
}

.real-time-preview .preview-record:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mapping-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    margin-top: 8px;
}

/* DATA GRID & CONTROLS */
.grid-controls-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.controls-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.controls-row.justify-between {
    justify-content: space-between;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-box input {
    padding-left: 40px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 16px;
    flex-grow: 1;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 200px;
}

.filter-item label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.data-summary-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* SWITCH TOGGLE */
.anpd-toggle-area {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 8px 16px;
    border-radius: 50px;
}

.anpd-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-muted);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--success);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--success);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* DATA TABLE */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 20px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tr {
    transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-empty {
    text-align: center;
    padding: 80px 0 !important;
}

.table-empty .empty-state {
    padding: 0;
}

/* PAGINATION */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.page-btn:hover:not(.disabled):not(.active) {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.06);
}

.page-btn.active {
    background-color: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* REPORT / RIPD SECTION */
.report-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-actions-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.report-header-icon {
    width: 36px;
    height: 36px;
    color: var(--success);
}

.report-actions-right {
    display: flex;
    gap: 12px;
}

/* RIPD PRINT LAYOUT */
.ripd-document {
    padding: 50px;
    background-color: #ffffff;
    color: #1e293b;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-family: 'Times New Roman', serif; /* Standard formal Brazilian document layout */
    line-height: 1.6;
}

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

.ripd-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #0f172a;
}

.logo-icon-lg {
    width: 48px;
    height: 48px;
    color: #0f172a;
}

.ripd-logo h2 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ripd-logo span {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 1px;
}

.ripd-doc-meta {
    text-align: right;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ripd-divider {
    border: none;
    border-top: 2px solid #0f172a;
    margin: 24px 0;
}

.ripd-section {
    margin-bottom: 36px;
}

.ripd-section h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 6px;
}

.ripd-section p {
    font-size: 0.95rem;
    margin-bottom: 14px;
    text-align: justify;
}

.ripd-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-family: var(--font-primary);
    font-size: 0.85rem;
}

.ripd-table th, .ripd-table td {
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    text-align: left;
}

.ripd-table th {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}

.ripd-cell-label {
    font-weight: 700;
    width: 30%;
    background-color: #f8fafc;
}

.ripd-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
    font-family: var(--font-primary);
}

.ripd-metric-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
}

.metric-big-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.metric-big-value.green-text {
    color: #10b981;
}

.metric-desc {
    font-size: 0.7rem;
    color: #64748b;
}

.ripd-declaration-box {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 20px;
    border-radius: var(--radius-sm);
}

.ripd-declaration-box p {
    margin-bottom: 30px;
}

.ripd-signatures {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
}

.signature-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.signature-line .line {
    width: 100%;
    border-top: 1px solid #475569;
    margin-bottom: 8px;
}

.signature-line span {
    font-size: 0.75rem;
    color: #475569;
    text-align: center;
}

.ripd-footer-note {
    font-family: var(--font-primary);
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-pulse {
    animation: pulseGlow 2s infinite ease-in-out;
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-secondary { color: var(--text-secondary); }
.text-emerald { color: var(--success); }
.hidden { display: none !important; }
.margin-top { margin-top: 20px; }
.justify-between { justify-content: space-between; }

/* UTILITY CLASSES FOR STATUS badge */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.exposed {
    background-color: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.status-pill.masked {
    background-color: var(--warning-glow);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.status-pill.anonymized {
    background-color: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-pill.hashed {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

/* RESPONSIVE LAYOUT */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-details-grid {
        grid-template-columns: 1fr;
    }
    
    .mapping-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 20px 8px;
    }
    
    .logo-text, .nav-item span, .sidebar-footer span, .user-info {
        display: none;
    }
    
    .logo-area {
        justify-content: center;
        margin-bottom: 24px;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 20px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .system-alerts {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-item {
        max-width: 100%;
    }
}

/* -------------------------------------------------------------
 * PRINT STYLES - Ensures the RIPD document prints perfectly
 * ------------------------------------------------------------- */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .sidebar, .top-bar, .report-actions-bar, .nav-menu, #theme-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .app-container {
        display: block !important;
    }
    
    .ripd-document {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: transparent !important;
        color: #000000 !important;
        width: 100% !important;
    }
    
    .tab-pane {
        display: none !important;
    }
    
    #tab-compliance-report {
        display: block !important;
    }
    
    .ripd-table th {
        background-color: #eaeaea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .ripd-cell-label {
        background-color: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .ripd-metric-card {
        background-color: #fafafa !important;
        border: 1px solid #cccccc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* CORPORATE FIXED HEADER STYLING */
.corporate-header-fixed {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    color: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.corporate-header-fixed .logo-img {
    height: 55px;
    width: auto;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.corporate-header-fixed .title-center {
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a !important;
    text-align: center;
    margin: 0;
    flex-grow: 1;
    letter-spacing: -0.5px;
}

.corporate-header-fixed .meta-right {
    text-align: right;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.8rem;
    color: #475569 !important;
    font-weight: 500;
}

.corporate-header-fixed .meta-right .cond-name {
    font-weight: 700;
    color: #0f172a !important;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

/* FLOATING TOAST NOTIFICATION CONTAINER */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 4px solid #8b5cf6 !important;
    color: #ffffff !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 320px !important;
    max-width: 420px !important;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
}

.toast-notification.success {
    border-left-color: #10b981 !important;
}

.toast-notification.warning {
    border-left-color: #f59e0b !important;
}

.toast-notification.error {
    border-left-color: #ef4444 !important;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%) translateY(20px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.9); opacity: 0; }
}
