/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { font-family: 'Roboto', sans-serif; background: #FAFAFA; color: rgba(19,23,32,0.90); }
.hidden-input { display: none; }

/* ========== SCREEN SYSTEM ========== */
.screen { display: none; width: 100%; height: 100vh; position: absolute; top: 0; left: 0; overflow: hidden; }
.screen.active { display: flex !important; }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-ring { 0% { transform: scale(0.95); opacity: 0.7; } 50% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.7; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ===================================== */
/*  SCREEN 1 — HOME / LOGIN             */
/* ===================================== */
#screen-home { background: #FAFAFA; align-items: center; justify-content: center; }
#screen-home.active { display: flex !important; }
.home-container { width: 100%; height: 100%; position: relative; }

/* Grid decoration */
.home-grid { position: absolute; inset: 40px 39px; pointer-events: none; }
.grid-border { position: absolute; inset: 0; border: 2px solid rgba(19,23,32,0.30); }
.grid-line-v { position: absolute; top: -40px; width: 0; height: calc(100% + 80px); border-left: 1px solid rgba(19,23,32,0.12); }
.grid-line-h { position: absolute; top: 50%; left: -39px; width: 39px; border-top: 1px solid rgba(19,23,32,0.30); }
.grid-tick-top, .grid-tick-bottom { position: absolute; width: 0; height: 40px; border-left: 1px solid rgba(19,23,32,0.30); }
.grid-tick-top { top: -40px; }
.grid-tick-bottom { bottom: -40px; }
.grid-tick-left { position: absolute; top: 50%; left: -39px; width: 39px; border-top: 1px solid rgba(19,23,32,0.30); }

/* Central horizontal line — only visible outside the grid rectangle (screen edge to grid border) */
.grid-line-h-left { position: absolute; top: 50%; left: -39px; width: 39px; border-top: 1px solid rgba(19,23,32,0.12); }
.grid-line-h-right { position: absolute; top: 50%; right: -39px; width: 39px; border-top: 1px solid rgba(19,23,32,0.12); }

/* Bottom inner line — spans only the card width, sits at the grid bottom edge */
.grid-line-bottom-inner { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 412px; border-top: 1px solid rgba(19,23,32,0.30); }

/* Login area */
.home-login-area { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 412px; display: flex; flex-direction: column; align-items: center; gap: 24px; animation: fadeIn 0.6s ease; z-index: 2; background: #FAFAFA; padding: 20px; margin: -20px; }

/* Rodapé area — between grid bottom border and footer top border */
.home-rodape-area { position: absolute; bottom: 40px; left: 39px; right: 39px; height: 40px; display: flex; align-items: center; justify-content: flex-start; padding-left: 20px; border-top: 1px solid rgba(19,23,32,0.30); pointer-events: none; z-index: 1; }

.home-header { width: 100%; }
.logo-img-home { width: 100%; height: auto; object-fit: contain; }
.logo-norma-text { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 24px; color: rgba(19,23,32,0.90); }
.home-welcome { display: flex; flex-direction: column; gap: 11px; }
.home-welcome-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 24px; color: rgba(19,23,32,0.90); white-space: nowrap; }
.home-version { font-size: 12px; font-weight: 700; color: rgba(19,23,32,0.60); letter-spacing: 0.8px; line-height: 14px; }

/* Form */
.home-form { width: 100%; padding: 42px; background: white; border-radius: 6px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 2px 16px rgba(0,0,0,0.04); }
.home-form-top, .home-form-bottom { display: flex; flex-direction: column; gap: 16px; }
.home-form-top { margin-bottom: 26px; }
.home-form .home-form-top + .home-form-bottom { margin-top: 0; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 12px; font-weight: 400; color: rgba(19,23,32,0.60); letter-spacing: 0.8px; line-height: 14px; text-transform: uppercase; }
.input-wrapper { height: 36px; padding: 5px 16px; background: #F4F4F4; border-radius: 6px; display: flex; align-items: center; gap: 4px; border: 2px solid transparent; transition: border-color 0.2s; }
.input-wrapper:focus-within, .input-wrapper.input-focused { border-color: #84E6FF; }
.input-wrapper.input-readonly { border-color: transparent; }
.form-input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; font-family: 'Roboto', sans-serif; color: rgba(19,23,32,0.90); letter-spacing: 0.3px; }
.form-input::placeholder { color: rgba(19,23,32,0.38); }
.input-cursor { width: 2px; height: 18px; background: rgba(19,23,32,0.90); border-radius: 100px; animation: blink 1s infinite; }

.btn-send-code { height: 36px; padding: 5px 8px; background: #84E6FF; border: none; border-radius: 6px; font-size: 15px; font-family: 'Roboto', sans-serif; text-transform: uppercase; letter-spacing: 1px; color: rgba(19,23,32,0.90); cursor: pointer; transition: background 0.2s, transform 0.1s; }
.btn-send-code:hover { background: #6EDCF8; }
.btn-send-code:active { transform: scale(0.98); }

.btn-login { height: 36px; padding: 5px 8px; background: #E9E9E9; border: none; border-radius: 6px; font-size: 15px; font-family: 'Roboto', sans-serif; text-transform: uppercase; letter-spacing: 1px; color: rgba(19,23,32,0.38); cursor: not-allowed; transition: all 0.3s; }
.btn-login.enabled { background: #84E6FF; color: rgba(19,23,32,0.90); cursor: pointer; }
.btn-login.enabled:hover { background: #6EDCF8; }

/* Footer */
.home-footer { position: absolute; bottom: 0; left: 0; right: 0; height: 40px; border-top: 1px solid rgba(19,23,32,0.30); }
.footer-left { display: flex; align-items: center; gap: 9px; }
.footer-left span, .footer-right { font-size: 14px; color: rgba(19,23,32,0.60); line-height: 16.8px; }
.footer-rodape-img { height: 18px; width: auto; object-fit: contain; }

/* ===================================== */
/*  TOP NAVIGATION (shared)             */
/* ===================================== */
.topnav { width: 100%; padding: 28px 140px; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 10; flex-shrink: 0; }
.topnav-left { display: flex; align-items: center; gap: 12px; }
.topnav-logo { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.logo-img-nav { height: 24px; width: auto; object-fit: contain; }
.topnav-divider { width: 1px; height: 27px; background: #2ED5FF; margin-left: 8px; }
.topnav-tagline { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; line-height: 14px; color: rgba(19,23,32,0.90); }
.topnav-right { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 28px; height: 28px; background: #3D3844; border-radius: 9999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-avatar-letter { font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; line-height: 1; font-family: 'Work Sans', sans-serif; }
.user-name { font-size: 14px; color: rgba(19,23,32,0.90); line-height: 16.8px; }

/* ===================================== */
/*  SCREEN 2 — DASHBOARD / INPUT        */
/* ===================================== */
#screen-input { flex-direction: column; overflow: hidden; }
#screen-input.active { display: flex !important; }
.dashboard-content { padding: 20px 140px 60px; max-width: 1400px; margin: 0 auto; width: 100%; animation: fadeIn 0.5s ease; overflow-y: auto; flex: 1; }

.welcome-row { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.welcome-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 24px; }
.welcome-desc { font-size: 16px; color: rgba(19,23,32,0.60); letter-spacing: 0.3px; line-height: 22.4px; }

/* Strategy Cards */
.strategy-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 21px; margin-bottom: 32px; }
.strategy-card { padding: 32px 24px 24px; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; border: 1px solid #B6F1FF; backdrop-filter: blur(9px); display: flex; flex-direction: column; gap: 12px; min-height: 167px; }
.strategy-card:hover { border-color: #84E6FF; box-shadow: 0 4px 20px rgba(15,179,255,0.08); }
.strategy-card.active { background: #84E6FF; border-color: #84E6FF; }
.strategy-card .strategy-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #2ED5FF; }
.strategy-icon-img { width: 36px; height: 36px; object-fit: contain; }
.strategy-card.active .strategy-icon { color: #0FB3FF; }
.strategy-card .strategy-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 24px; letter-spacing: 0.25px; color: rgba(19,23,32,0.60); }
.strategy-card.active .strategy-title { color: rgba(19,23,32,0.90); }
.strategy-card .strategy-desc { font-size: 14px; color: rgba(19,23,32,0.60); line-height: 16.8px; }

/* Upload Zone */
.upload-zone { width: 100%; min-height: 188px; background: #E9FBFF; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; margin-bottom: 16px; cursor: pointer; transition: background 0.2s; border: 2px dashed transparent; }
.upload-zone:hover { background: #DFFAFF; border-color: #84E6FF; }
.upload-zone.drag-over { background: #CFF4FF; border-color: #2ED5FF; }
.upload-icon { display: flex; align-items: center; justify-content: center; }
.upload-icon-img { width: 48px; height: 48px; object-fit: contain; }
.upload-text-area { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.upload-text-main { font-size: 16px; font-weight: 700; color: rgba(19,23,32,0.90); letter-spacing: 0.4px; line-height: 22.4px; }
.btn-upload-click { height: 50px; padding: 8px 20px; border-radius: 6px; border: 1px solid #2ED5FF; background: transparent; font-size: 15px; font-family: 'Roboto', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #0672EF; cursor: pointer; transition: all 0.2s; }
.btn-upload-click:hover { background: rgba(46,213,255,0.1); }

/* File List */
.file-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 24px; }
.file-list:empty { margin-bottom: 0; }
.file-item { display: flex; align-items: center; background: #F4F4F4; border-radius: 6px; overflow: hidden; animation: slideUp 0.3s ease; }
.file-item-info { flex: 1; display: flex; align-items: center; gap: 9px; padding: 6px 12px; min-height: 32px; }
.file-item-check { width: 20px; height: 20px; color: #36CD01; font-size: 18px; flex-shrink: 0; }
.file-item-name { font-size: 14px; color: rgba(19,23,32,0.90); line-height: 16.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item-delete { width: 33px; height: 32px; display: flex; align-items: center; justify-content: center; background: #F4F4F4; border: none; cursor: pointer; color: rgba(19,23,32,0.60); font-size: 14px; flex-shrink: 0; transition: color 0.2s; }
.file-item-delete:hover { color: #e53e3e; }

/* Analyze Button */
.btn-analyze { height: 50px; padding: 8px 20px; border: none; border-radius: 6px; font-size: 15px; font-family: 'Roboto', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; flex-shrink: 0; }
.btn-analyze:disabled { background: #E9E9E9; color: #C6C1CC; cursor: not-allowed; }
.btn-analyze:not(:disabled) { background: #84E6FF; color: rgba(19,23,32,0.90); }
.btn-analyze:not(:disabled):hover { background: #6EDCF8; box-shadow: 0 4px 16px rgba(15,179,255,0.25); }

/* ===================================== */
/*  SCREEN 3 — LOADING                  */
/* ===================================== */
.loading-screen { background: rgba(0,92,213,0.90); flex-direction: column; align-items: center; justify-content: center; z-index: 100; }
#screen-loading.active { display: flex !important; }
.loading-circle { width: 480px; height: 480px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; position: relative; }
.loading-circle::before { content: ''; position: absolute; inset: 0; border-radius: 9999px; border: 2px solid transparent; border-top-color: rgba(255,255,255,0.90); border-right-color: rgba(255,255,255,0.50); border-bottom-color: rgba(255,255,255,0.15); border-left-color: rgba(255,255,255,0.03); animation: spin-ring 2.5s linear infinite; }
.loading-circle::after { content: ''; position: absolute; inset: 12px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.08); }
@keyframes spin-ring { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-content { display: flex; flex-direction: column; align-items: center; gap: 40px; max-width: 340px; text-align: center; }
.loading-icon { font-size: 42px; color: #2ED5FF; display: flex; align-items: center; justify-content: center; }
.loading-icon-img { width: 48px; height: 48px; object-fit: contain; }
.loading-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 32px; letter-spacing: 0.25px; color: rgba(255,255,255,0.87); line-height: 1.2; }
.loading-desc { font-size: 16px; color: rgba(255,255,255,0.54); line-height: 22.4px; letter-spacing: 0.3px; }
.loading-footer-text { position: absolute; bottom: 60px; font-size: 12px; color: white; letter-spacing: 0.8px; text-align: center; max-width: 260px; line-height: 14px; }

/* ===================================== */
/*  SCREEN 4 — OUTPUT / REPORT          */
/* ===================================== */
#screen-output { flex-direction: column; overflow: hidden; }
#screen-output.active { display: flex !important; }
#screen-output .topnav { flex-shrink: 0; }
.output-layout { flex: 1; display: flex; overflow: hidden; padding: 0 140px 0 220px; gap: 16px; }
.report-wrapper { flex: 1; overflow-y: auto; background: white; border-radius: 0; max-height: calc(100vh - 220px); scrollbar-width: thin; scrollbar-color: #D9D9D9 transparent; }
.report-wrapper::-webkit-scrollbar { width: 8px; }
.report-wrapper::-webkit-scrollbar-thumb { background: #D9D9D9; border-radius: 999px; }

.report-document { padding: 60px; min-height: 100%; animation: fadeIn 0.6s ease; }
.report-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.report-meta-label { font-size: 16px; color: rgba(19,23,32,0.60); letter-spacing: 0.3px; line-height: 22.4px; }
.report-meta-separator { font-size: 16px; color: rgba(19,23,32,0.25); margin: 0 4px; }
.report-meta-code { font-size: 16px; font-weight: 700; color: #0FB3FF; letter-spacing: 1.5px; line-height: 22.4px; font-family: 'Roboto Mono', 'Courier New', monospace; }
.report-main-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 32px; letter-spacing: 0.25px; color: rgba(19,23,32,0.90); margin-bottom: 12px; }
.report-subtitle { font-size: 16px; color: rgba(19,23,32,0.60); letter-spacing: 0.3px; line-height: 22.4px; margin-bottom: 32px; }
.report-divider { border: none; border-top: 1px solid rgba(19,23,32,0.10); margin: 32px 0; }
.report-section-title { font-size: 20px; color: #0FB3FF; letter-spacing: 0.5px; line-height: 26px; margin-bottom: 24px; }

/* Directives */
.report-directives { display: flex; flex-direction: column; gap: 32px; margin-bottom: 32px; }
.directive-item { display: flex; flex-direction: column; gap: 19px; }
.directive-source { font-size: 16px; color: rgba(19,23,32,0.60); letter-spacing: 0.3px; line-height: 22.4px; }
.directive-row { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.directive-label { font-size: 16px; font-weight: 700; color: rgba(19,23,32,0.60); letter-spacing: 0.4px; line-height: 22.4px; }
.directive-value { font-size: 16px; color: rgba(19,23,32,0.90); letter-spacing: 0.3px; line-height: 22.4px; }
.directive-highlight { font-size: 24px; font-weight: 600; color: #0FB3FF; letter-spacing: 0.5px; line-height: 30px; }

/* Result Box */
.report-result-box { padding: 24px; background: #E9FBFF; border-radius: 6px; display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.result-label { font-size: 16px; color: rgba(19,23,32,0.90); letter-spacing: 0.3px; line-height: 22.4px; }
.result-value { font-size: 24px; color: #0FB3FF; letter-spacing: 0.5px; line-height: 30px; }
.result-desc { font-size: 16px; color: rgba(19,23,32,0.90); letter-spacing: 0.3px; line-height: 22.4px; }
.result-desc .highlight { color: #0FB3FF; }

/* Report Summary */
.report-summary { margin-bottom: 40px; }
.summary-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* Report footer */
.report-footer-area { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(19,23,32,0.10); }
.report-footer-left { font-size: 16px; color: rgba(19,23,32,0.60); letter-spacing: 0.3px; line-height: 22.4px; }
.report-footer-right { text-align: right; font-size: 16px; color: rgba(19,23,32,0.60); letter-spacing: 0.3px; line-height: 22.4px; }

/* Custom scrollbar track */
.custom-scrollbar-track { display: none; }

/* Bottom actions */
.output-actions { flex-shrink: 0; padding: 16px 140px; display: flex; gap: 16px; align-items: center; }
.btn-back { height: 49px; padding: 8px 16px; background: #E9FBFF; border: none; border-radius: 6px; font-size: 15px; font-family: 'Roboto', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(19,23,32,0.90); cursor: pointer; box-shadow: 0 12px 38px rgba(0,78,180,0.20); transition: all 0.2s; }
.btn-back:hover { background: #DFFAFF; }
.btn-save { height: 50px; padding: 8px 20px; background: #84E6FF; border: none; border-radius: 6px; font-size: 15px; font-family: 'Roboto', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(19,23,32,0.90); cursor: pointer; box-shadow: 0 12px 38px rgba(0,78,180,0.20); transition: all 0.2s; }
.btn-save:hover { background: #6EDCF8; }

/* ===================================== */
/*  TOAST POPUPS                         */
/* ===================================== */
.toast-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); z-index: 200; padding: 64px; background: white; box-shadow: 0px 41px 60px rgba(0,78,180,0.40); border-radius: 6px; display: none; align-items: center; gap: 12px; }
.toast-popup.visible { display: inline-flex; transform: translate(-50%, -50%) scale(1); animation: fadeIn 0.3s ease; }
.toast-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #0FB3FF; flex-shrink: 0; }
.toast-body { display: flex; flex-direction: column; gap: 12px; }
.toast-title { text-align: center; color: rgba(19,23,32,0.90); font-size: 20px; line-height: 26px; letter-spacing: 0.5px; white-space: nowrap; }
.toast-desc { text-align: center; color: rgba(19,23,32,0.60); font-size: 16px; line-height: 22.4px; letter-spacing: 0.3px; }
.toast-success { padding: 64px; max-width: 656px; }
.toast-success .toast-icon { width: 72px; height: 72px; font-size: 40px; color: #36CD01; }
.toast-success .toast-body { flex: 1; width: auto; }

/* ===================================== */
/*  MODAL OVERLAYS                       */
/* ===================================== */
.modal-overlay { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; }
.modal-overlay.visible { display: flex; }
.modal-overlay.error-overlay { background: rgba(0,92,213,0.90); }
.modal-exit-box { padding: 42px; background: rgba(255,255,255,0.87); box-shadow: 0px 41px 60px rgba(0,78,180,0.40); border-radius: 6px; display: flex; flex-direction: column; gap: 24px; max-width: 411px; }
.modal-exit-box .modal-title { color: rgba(19,23,32,0.90); font-size: 20px; font-family: 'Work Sans', sans-serif; font-weight: 600; letter-spacing: 0.15px; }
.modal-exit-box .modal-desc { color: rgba(19,23,32,0.60); font-size: 14px; line-height: 16.8px; }
.modal-exit-actions { display: flex; gap: 6px; }
.btn-stay { height: 38px; padding: 8px 20px; background: #DFF9FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; display: flex; align-items: center; transition: background 0.2s; }
.btn-stay:hover { background: #CFF4FF; }
.btn-exit-now { height: 38px; padding: 8px 20px; background: #2ED5FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; display: flex; align-items: center; transition: background 0.2s; }
.btn-exit-now:hover { background: #1ECBF5; }
.modal-error-box { padding: 64px; background: white; box-shadow: 0px 41px 60px rgba(0,78,180,0.40); border-radius: 6px; display: flex; align-items: flex-start; gap: 20px; max-width: 656px; }
.error-icon { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #FF253B; flex-shrink: 0; }
.error-body { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.error-code-badge { display: inline-flex; align-self: flex-start; padding: 4px 12px; background: rgba(255,37,59,0.08); border: 1px solid rgba(255,37,59,0.20); border-radius: 100px; }
.error-code-badge span { font-family: 'Roboto Mono', 'Courier New', monospace; font-size: 12px; font-weight: 700; color: #FF253B; letter-spacing: 1px; }
.error-title { color: rgba(19,23,32,0.90); font-size: 20px; line-height: 26px; letter-spacing: 0.5px; }
.error-desc { color: rgba(19,23,32,0.60); font-size: 16px; line-height: 22.4px; letter-spacing: 0.3px; max-width: 456px; }
.error-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-error-copy { height: 38px; padding: 8px 20px; background: #DFF9FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background 0.2s; }
.btn-error-copy:hover { background: #CFF4FF; }
.btn-error-copy i { font-size: 14px; color: #0FB3FF; }
.btn-error-close { height: 38px; padding: 8px 20px; background: #2ED5FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; display: flex; align-items: center; transition: background 0.2s; }
.btn-error-close:hover { background: #1ECBF5; }

/* Specialty Context Modal */
.modal-specialty-box { width: 636px; padding: 42px; background: rgba(255,255,255,0.87); box-shadow: 0px 41px 60px rgba(0,78,180,0.40); border-radius: 6px; display: flex; flex-direction: column; gap: 24px; animation: fadeIn 0.3s ease; }
.modal-specialty-title { margin: 0; color: rgba(19,23,32,0.90); font-size: 20px; font-family: 'Work Sans', sans-serif; font-weight: 600; letter-spacing: 0.15px; }
.modal-specialty-content { display: flex; flex-direction: column; gap: 16px; }
.modal-specialty-desc { margin: 0; color: rgba(19,23,32,0.60); font-size: 14px; font-family: 'Roboto', sans-serif; line-height: 16.8px; }
.modal-specialty-textarea { width: 100%; height: 113px; padding: 16px; background: #F9F9F9; border: none; border-radius: 6px; font-size: 14px; font-family: 'Roboto', sans-serif; color: rgba(19,23,32,0.90); line-height: 16.8px; resize: none; outline: none; box-sizing: border-box; }
.modal-specialty-textarea::placeholder { color: rgba(19,23,32,0.38); }
.modal-specialty-textarea:focus { background: #F4F4F4; }
.modal-specialty-actions { display: flex; align-items: center; gap: 6px; }
.btn-specialty-cancel { height: 38px; padding: 8px 20px; background: #DFF9FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; display: flex; align-items: center; transition: background 0.2s; }
.btn-specialty-cancel:hover { background: #CFF4FF; }
.btn-specialty-save { height: 38px; padding: 8px 20px; background: #2ED5FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; display: flex; align-items: center; transition: background 0.2s; }
.btn-specialty-save:hover { background: #1ECBF5; }

/* ===================================== */
/*  USER MENU DROPDOWN                   */
/* ===================================== */
.topnav-right { position: relative; cursor: pointer; }
.user-menu-dropdown { position: absolute; top: 100%; right: 0; margin-top: 8px; padding: 8px 16px; background: white; box-shadow: 0px 13px 32px #ECECEC; border-top-right-radius: 24px; border-bottom-right-radius: 24px; border-bottom-left-radius: 24px; display: none; flex-direction: column; z-index: 50; min-width: 120px; }
.user-menu-dropdown.visible { display: flex; }
.user-menu-item { padding: 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; border: none; background: none; font-family: 'Roboto', sans-serif; }
.user-menu-item i { color: #2ED5FF; font-size: 16px; }
.user-menu-item:hover { color: #0FB3FF; }

/* ===================================== */
/*  LOGIN ERROR STATE                    */
/* ===================================== */
.code-error-msg { display: none; color: #FF253B; font-size: 12px; font-family: 'Roboto', sans-serif; letter-spacing: 0.3px; margin-top: 4px; font-style: italic; }
.code-error-msg.visible { display: block; }
.input-wrapper.input-error { border-color: #FF253B; }

/* ===================================== */
/*  USER MANAGEMENT MODAL (Admin)        */
/* ===================================== */
.um-modal-box { width: 720px; max-width: 95vw; max-height: 80vh; background: rgba(255,255,255,0.97); box-shadow: 0px 41px 60px rgba(0,78,180,0.40); border-radius: 8px; display: flex; flex-direction: column; animation: fadeIn 0.3s ease; overflow: hidden; }
.um-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px 16px; border-bottom: 1px solid #F0F0F0; }
.um-header-left { display: flex; align-items: center; gap: 10px; }
.um-header-icon { font-size: 18px; color: #2ED5FF; }
.um-header-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 18px; color: rgba(19,23,32,0.90); letter-spacing: 0.15px; }
.um-close-btn { width: 28px; height: 28px; border: none; background: #F4F4F4; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.um-close-btn:hover { background: #E8E8E8; }
.um-close-btn i { font-size: 14px; color: rgba(19,23,32,0.60); }

/* Add user row */
.um-add-row { display: flex; align-items: center; gap: 8px; padding: 16px 28px; border-bottom: 1px solid #F0F0F0; }
.um-add-field { flex: 1; }
.um-input { width: 100%; padding: 9px 14px; background: #F9F9F9; border: 1.5px solid transparent; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; color: rgba(19,23,32,0.90); outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.um-input:focus { border-color: #2ED5FF; background: #fff; }
.um-input.input-error { border-color: #FF253B; }
.um-select { padding: 9px 12px; background: #F9F9F9; border: 1.5px solid transparent; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; color: rgba(19,23,32,0.90); outline: none; cursor: pointer; }
.um-select:focus { border-color: #2ED5FF; }
.um-btn-add { display: flex; align-items: center; gap: 6px; height: 38px; padding: 8px 20px; background: #2ED5FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.um-btn-add:hover { background: #1ECBF5; }
.um-btn-add i { font-size: 13px; }
.um-add-error { padding: 0 28px 8px; color: #FF253B; font-size: 12px; font-family: 'Roboto', sans-serif; font-style: italic; }

/* Table */
.um-table-wrap { flex: 1; overflow-y: auto; padding: 0 28px 20px; }
.um-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 32px; color: rgba(19,23,32,0.54); font-size: 14px; font-family: 'Roboto', sans-serif; }
.um-loading i { color: #2ED5FF; }
.um-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.um-table thead th { text-align: left; padding: 10px 8px; font-size: 11px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.54); border-bottom: 1px solid #F0F0F0; }
.um-table tbody td { padding: 12px 8px; font-size: 13px; font-family: 'Roboto', sans-serif; color: rgba(19,23,32,0.90); border-bottom: 1px solid #F8F8F8; vertical-align: middle; }
.um-table tbody tr:hover { background: #FAFCFF; }

/* User cell with avatar */
.um-user-cell { display: flex; align-items: center; gap: 10px; }
.um-avatar { width: 26px; height: 26px; background: #3D3844; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: white; font-family: 'Work Sans', sans-serif; flex-shrink: 0; }

/* Tags and badges */
.um-role-tag { padding: 3px 10px; background: #F4F4F4; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.um-status-badge { padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }
.badge-active { background: #E6FFF5; color: #0A8754; }
.badge-suspended { background: #FFF7E6; color: #B87A00; }
.badge-cancelled { background: #FFE6E6; color: #CC2936; }
.um-self-tag { font-size: 11px; color: rgba(19,23,32,0.38); font-style: italic; }

/* Action buttons */
.um-actions { display: flex; gap: 4px; }
.um-btn-action { width: 28px; height: 28px; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; background: #F4F4F4; }
.um-btn-action i { font-size: 12px; color: rgba(19,23,32,0.54); }
.um-btn-suspend:hover { background: #FFF7E6; }
.um-btn-suspend:hover i { color: #B87A00; }
.um-btn-activate:hover { background: #E6FFF5; }
.um-btn-activate:hover i { color: #0A8754; }
.um-btn-cancel:hover { background: #FFE6E6; }
.um-btn-cancel:hover i { color: #CC2936; }
.um-btn-delete:hover { background: #FFE6E6; }
.um-btn-delete:hover i { color: #CC2936; }

/* ===================================== */
/*  VERIFICATION MODAL (Admin)           */
/* ===================================== */
.verify-modal-box { width: 560px; max-width: 95vw; background: rgba(255,255,255,0.97); box-shadow: 0px 41px 60px rgba(0,78,180,0.40); border-radius: 8px; display: flex; flex-direction: column; animation: fadeIn 0.3s ease; overflow: hidden; }
.verify-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px 16px; border-bottom: 1px solid #F0F0F0; }
.verify-header-left { display: flex; align-items: center; gap: 10px; }
.verify-header-icon { font-size: 18px; color: #2ED5FF; }
.verify-header-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 18px; color: rgba(19,23,32,0.90); letter-spacing: 0.15px; }
.verify-body { padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.verify-desc { margin: 0; color: rgba(19,23,32,0.60); font-size: 14px; font-family: 'Roboto', sans-serif; line-height: 20px; }
.verify-input-row { display: flex; gap: 8px; }
.verify-input { flex: 1; padding: 12px 16px; background: #F9F9F9; border: 1.5px solid transparent; border-radius: 6px; font-size: 16px; font-family: 'Roboto Mono', 'Courier New', monospace; color: rgba(19,23,32,0.90); letter-spacing: 2px; text-transform: uppercase; text-align: center; outline: none; box-sizing: border-box; transition: border-color 0.2s, background 0.2s; }
.verify-input:focus { border-color: #2ED5FF; background: #fff; }
.verify-input::placeholder { color: rgba(19,23,32,0.25); letter-spacing: 4px; text-transform: uppercase; }
.verify-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 8px 20px; background: #2ED5FF; border: none; border-radius: 6px; font-size: 13px; font-family: 'Roboto', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(19,23,32,0.90); cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.verify-btn:hover { background: #1ECBF5; }
.verify-btn:disabled { background: #E9E9E9; color: rgba(19,23,32,0.38); cursor: not-allowed; }
.verify-btn i { font-size: 14px; }
.verify-result { padding: 20px; border-radius: 6px; animation: fadeIn 0.3s ease; }
.verify-result.result-valid { background: #E6FFF5; border: 1px solid rgba(10,135,84,0.20); }
.verify-result.result-invalid { background: #FFE6E6; border: 1px solid rgba(204,41,54,0.20); }
.verify-result-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.verify-result-icon.icon-valid { color: #0A8754; }
.verify-result-icon.icon-invalid { color: #CC2936; }
.verify-result-title { font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.verify-result-title.title-valid { color: #0A8754; }
.verify-result-title.title-invalid { color: #CC2936; }
.verify-result-detail { font-size: 13px; color: rgba(19,23,32,0.70); line-height: 20px; margin: 0; }
.verify-result-detail strong { color: rgba(19,23,32,0.90); font-weight: 600; }

/* ===================================== */
/*  RESPONSIVE                           */
/* ===================================== */
@media (max-width: 1200px) {
    .topnav { padding: 20px 40px; }
    .dashboard-content { padding: 20px 40px 60px; }
    .output-layout { padding: 0 40px; }
    .output-actions { padding: 16px 40px; }
}
@media (max-width: 900px) {
    .strategy-cards { grid-template-columns: 1fr; }
    .file-list { grid-template-columns: 1fr; }
    .home-login-area { width: 90%; max-width: 412px; }
    .welcome-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .home-footer { padding: 0 24px; }
    .loading-circle { width: 300px; height: 300px; }
    .loading-title { font-size: 24px; }
}
