/* src/frontend/style.css */
:root{
  /* Paleta (ajuste para Evertrade) */
  --md-primary: #1f5fbf;         /* substitua pelo primário da Evertrade */
  --md-on-primary: #ffffff;
  --md-surface: #ffffff;
  --md-on-surface: #212529;
  --md-surface-variant: #f6f8fb;
  --md-outline: #d0d7de;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    background-color: var(--md-surface-variant); 
    margin: 0;
    color: var(--md-on-surface);
}
.container { 
    background: var(--md-surface); 
    padding: 2rem 3rem; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    text-align: center; 
    width: 100%;
    max-width: 500px;
}
@media (min-width: 768px) {
  .container { text-align: left; max-width: 560px; }
}
h1 { font-size: 1.25rem; margin: 0; color: #0b1320; }
.subtitle { margin: .375rem 0 0; color: #5a6573; font-size: .95rem; }

/* App Bar */
.appbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--md-surface); border-bottom: 1px solid var(--md-outline); display:flex; align-items:center; padding: 0 16px; z-index: 10; }
.appbar__brand { display:flex; align-items:center; gap: 10px; }
.appbar__title { font-weight: 600; color: #0b1320; }
.appbar__actions { margin-left: auto; }
.md-btn--small { padding: 8px 12px; font-size: .9rem; border-radius: 8px; }

/* Shell and Card */
.shell { margin-top: 72px; width: 100%; display: flex; justify-content: center; padding: 16px; }
.card { background: var(--md-surface); width: 100%; max-width: 860px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04); padding: 20px; }
.card__header { margin-bottom: 16px; }

/* Dropzone */
.dropzone { border: 2px dashed var(--md-outline); border-radius: 12px; padding: 24px; text-align: center; background: #fbfcfe; transition: border-color .15s ease, background .15s ease; }
.dropzone--hover { border-color: var(--md-primary); background: #f2f7ff; }
.dropzone__title { font-weight: 600; color: #0b1320; }
.dropzone__subtitle { color: #6b7683; margin: 8px 0; font-size: .9rem; }

.form-actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.selected-list { font-size: .9rem; color: #5a6573; }
.selected-list .pill { display:inline-block; background: #eef2f7; color:#314156; border:1px solid var(--md-outline); border-radius: 999px; padding: 6px 10px; margin: 4px 6px 0 0; }
.status { margin-top: 10px; font-weight: 600; color: #314156; }
input[type="file"], input[type="text"], input[type="password"] { 
    width: calc(100% - 20px); 
    padding: 10px; 
    margin-bottom: 1rem; 
    border: 1px solid #ccc;
    border-radius: 4px;
}
/* Material-like Buttons */
.md-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--md-primary);
  color: var(--md-on-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);
  transition: background .15s ease, box-shadow .15s ease, transform .02s ease;
}
.md-btn:hover { box-shadow: 0 3px 6px rgba(0,0,0,0.12), 0 6px 12px rgba(0,0,0,0.08); }
.md-btn:active { transform: translateY(1px); }
.md-btn:disabled { opacity: .38; cursor: not-allowed; }
a.md-btn { text-decoration: none; }
.md-btn--secondary {
  background: transparent;
  color: var(--md-primary);
  border: 1px solid var(--md-outline);
  box-shadow: none;
}
.md-btn--ghost {
  background: rgba(31, 95, 191, 0.08);
  color: var(--md-primary);
  border: none;
  box-shadow: none;
}
.link-button {
  background: none;
  border: none;
  color: var(--md-primary);
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}
.link-button:hover { text-decoration: underline; }

.helper-actions {
  margin-top: 16px;
  padding: 12px;
  background: #f3f6fb;
  border-radius: 8px;
  border: 1px solid var(--md-outline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reset-panel {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--md-outline);
}
.reset-panel form { margin-top: 12px; }
.reset-panel .status { margin-top: 16px; }
#status { 
    margin-top: 1rem; 
    font-weight: bold; 
    text-align: left;
    white-space: pre-wrap;
}
#logout-button {
    float: right;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background-color: #6c757d;
}

/* Resultados de upload (inspirado em cartões limpos, foco em copiable links) */
.results-toolbar { margin-top: 1rem; display: none; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.results-list {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 768px) {
  .results-list { grid-template-columns: 1fr; }
}
.result-item {
  border: 1px solid var(--md-outline);
  border-radius: 6px;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.result-item .file-name {
  font-weight: 600;
  color: #0b1320;
}
.result-item input.link-field {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--md-outline);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--md-on-surface);
}
.result-item .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toast discreto */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: rgba(20, 23, 28, 0.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
