* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, sans-serif;
    background: #1a1a1a;
    color: #cccccc;
    font-size: 13px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

a {
    color: #6b8fc7;
    text-decoration: none;
}

/* ===== Login / Registro (caixa central) ===== */
.login-box {
    width: 100%;
    max-width: 380px;
    min-width: 380px;
    background: #222222;
    border: 1px solid #3a3a3a;
}

.login-box .titlebar {
    background: #2b2b2b;
    border-bottom: 1px solid #3a3a3a;
    padding: 8px 12px;
    font-weight: bold;
    color: #eeeeee;
    font-size: 13px;
}

.login-box .content {
    padding: 20px 24px;
}

.field-row {
    margin-bottom: 12px;
}

.field-row label {
    display: block;
    margin-bottom: 4px;
    color: #999999;
}

.field-row input[type="text"],
.field-row input[type="password"],
.field-row input[type="email"] {
    width: 100%;
    padding: 6px 8px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #dddddd;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.field-row input:focus {
    border-color: #555555;
}

.checkbox-row {
    margin: 10px 0 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999999;
}

.checkbox-row input {
    accent-color: #555555;
}

.button-row {
    margin-top: 4px;
}

.btn {
    padding: 6px 18px;
    background: #333333;
    border: 1px solid #4a4a4a;
    color: #eeeeee;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.btn:hover {
    background: #3a3a3a;
}

.links {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #2f2f2f;
    font-size: 12px;
}

.links a:hover {
    text-decoration: underline;
}

.links span {
    color: #555555;
    margin: 0 6px;
}

.footer-note {
    text-align: center;
    margin-top: 12px;
    font-size: 11px;
    color: #4a4a4a;
}

/* ===== Captcha (SVG) ===== */
.captcha-row {
    margin-bottom: 12px;
}

.captcha-row>label {
    display: block;
    margin-bottom: 6px;
    color: #999999;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.captcha-wrapper svg {
    display: block;
    user-select: none;
}

.captcha-refresh-btn {
    padding: 0;
    width: 32px;
    height: 32px;
    background: #333333;
    border: 1px solid #4a4a4a;
    color: #eeeeee;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.captcha-refresh-btn:hover {
    background: #3a3a3a;
}

.captcha-row input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #dddddd;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    text-transform: uppercase;
}

.captcha-row input[type="text"]:focus {
    border-color: #555555;
}

.captcha-error {
    color: #c56b6b;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

/* ===== Navbar (dashboard) ===== */
.navbar {
    width: 100%;
    background: #222222;
    border-bottom: 1px solid #3a3a3a;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.navbar .brand {
    font-weight: bold;
    color: #eeeeee;
    font-size: 14px;
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: #999999;
}

.navbar .badge {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    padding: 4px 10px;
    color: #cccccc;
}

.navbar .badge strong {
    color: #eeeeee;
}

/* ===== Layout geral do dashboard ===== */
body.dashboard-body {
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
}

.dashboard-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}

/* ===== Painel genérico ===== */
.panel {
    background: #222222;
    border: 1px solid #3a3a3a;
    margin-bottom: 16px;
}

.panel-title {
    background: #2b2b2b;
    border-bottom: 1px solid #3a3a3a;
    padding: 8px 12px;
    font-weight: bold;
    color: #eeeeee;
    font-size: 13px;
}

.panel-content {
    padding: 18px 20px;
}

/* ===== Upload de arquivo ===== */
.upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.file-label {
    padding: 6px 14px;
    background: #333333;
    border: 1px solid #4a4a4a;
    color: #eeeeee;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
}

.file-label:hover {
    background: #3a3a3a;
}

.file-label input[type="file"] {
    display: none;
}

.file-name {
    font-size: 12px;
    color: #666666;
}

.list-count {
    margin-top: 8px;
    font-size: 12px;
    color: #666666;
}

/* ===== Layout lista + estatísticas lado a lado ===== */
.list-stats-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.list-column {
    flex: 2;
    min-width: 0;
}

.stats-column {
    flex: 1;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-textarea {
    width: 100%;
    min-height: 210px;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #cccccc;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    outline: none;
    resize: vertical;
}

.list-textarea:focus {
    border-color: #555555;
}

/* ===== Cards de estatística ===== */
.stat-box {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    padding: 12px 10px;
    text-align: center;
}

.stat-number {
    font-size: 20px;
    font-weight: bold;
    color: #eeeeee;
}

.stat-label {
    font-size: 11px;
    color: #999999;
    margin-top: 4px;
}

.stat-approved .stat-number {
    color: #7fae91;
}

.stat-reproved .stat-number {
    color: #c56b6b;
}

.stat-errors .stat-number {
    color: #c5a56b;
}

/* ===== Carrossel de gateways ===== */
.gateway-carousel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gateway-arrow {
    width: 34px;
    height: 34px;
    background: #333333;
    border: 1px solid #4a4a4a;
    color: #eeeeee;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gateway-arrow:hover {
    background: #3a3a3a;
}

.gateway-display {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    padding: 14px 18px;
}

.gateway-name {
    font-size: 15px;
    font-weight: bold;
    color: #eeeeee;
    margin-bottom: 10px;
    text-align: center;
}

.gateway-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999999;
    border-top: 1px solid #2f2f2f;
    padding-top: 8px;
}

.gateway-info .value {
    color: #cccccc;
    font-weight: bold;
}

.debit-yes {
    color: #c58f6b;
}

.debit-no {
    color: #7fae91;
}

.gateway-index {
    text-align: center;
    font-size: 11px;
    color: #555555;
    margin-top: 10px;
}

/* ===== Barra de progresso ===== */
.progress-bar-outer {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    height: 18px;
    margin-bottom: 12px;
    position: relative;
}

.progress-bar-inner {
    background: #4a4a4a;
    height: 100%;
    width: 0%;
    transition: width 0.25s ease;
}

.progress-bar-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #cccccc;
}

/* ===== Console de log ===== */
.console-log {
    background: #0f0f0f;
    border: 1px solid #3a3a3a;
    height: 190px;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-bottom: 14px;
}

.console-log .log-line {
    margin-bottom: 3px;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-approved {
    color: #7fae91;
}

.log-reproved {
    color: #c56b6b;
}

.log-error {
    color: #c5a56b;
}

.log-info {
    color: #666666;
}

/* ===== Botão grande de iniciar ===== */
.btn-start {
    width: 100%;
    padding: 10px;
    background: #333333;
    border: 1px solid #4a4a4a;
    color: #eeeeee;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.btn-start:hover {
    background: #3a3a3a;
}

.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Responsivo ===== */
@media (max-width: 600px) {
    .list-stats-row {
        flex-direction: column;
    }

    .stats-column {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stats-column .stat-box {
        flex: 1;
        min-width: 90px;
    }
}

@media (max-width: 480px) {
    .login-box .content {
        padding: 16px;
    }
}

/* ===== Modal de resultados ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 15px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 480px;
    background: #222222;
    border: 1px solid #3a3a3a;
}

.modal-header {
    background: #2b2b2b;
    border-bottom: 1px solid #3a3a3a;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #eeeeee;
    font-size: 13px;
}

.modal-close {
    background: none;
    border: none;
    color: #999999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: #eeeeee;
}

.modal-content {
    padding: 16px 18px;
}

.modal-textarea {
    width: 100%;
    min-height: 220px;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #cccccc;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    outline: none;
    resize: vertical;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.modal-count {
    font-size: 12px;
    color: #666666;
}

.btn-copy {
    padding: 6px 16px;
    background: #333333;
    border: 1px solid #4a4a4a;
    color: #eeeeee;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.btn-copy:hover {
    background: #3a3a3a;
}

.btn-copy.copied {
    background: #2f4a3a;
    border-color: #3f5f4a;
    color: #7fae91;
}

.error-box {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px 0;
  padding: 8px 10px;

  border: 1px solid #6f2020;
  background: #2b1111;
  color: #e6a5a5;

  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 15px;
  text-align: left;

  box-shadow:
    inset 0 1px 0 #492020,
    0 1px 2px #000;
}

.error-box::before {
  content: "Error: ";
  color: #ffb0b0;
  font-weight: bold;
}

.success-box {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px 0;
  padding: 8px 10px;

  border: 1px solid #496b32;
  background: #182512;
  color: #b8d99b;

  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 15px;
  text-align: left;

  box-shadow:
    inset 0 1px 0 #2b4420,
    0 1px 2px #000;
}

.success-box::before {
  content: "Success: ";
  color: #c9edaa;
  font-weight: bold;
}