/* web/static/style.css - Dark Minimalist Theme matching desktop app */

:root {
  --bg-base: #0a0b0e;
  --bg-surface: #111218;
  --bg-card: #141620;
  --bg-input: #0e0f14;
  --border-color: #1f212c;
  --border-hover: #333647;
  --text-main: #f8fafc;
  --text-muted: #828fa3;
  --text-dim: #64748b;
  --primary-blue: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-red: #e11d48;
  --accent-hover: #be123c;
  --success-green: #34d399;
  --warning-amber: #fbbf24;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header & Top Bar */
.top-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.brand-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
}

.account-selector-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.label-title {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-neutral {
  background-color: #141620;
  color: var(--text-muted);
  border: 1px solid #232635;
}

.badge-success {
  background-color: #063726;
  color: #6ee7b7;
  border: 1px solid #0d5e41;
}

.badge-warning {
  background-color: #3b2d13;
  color: #fde047;
  border: 1px solid #57431c;
}

.badge-danger {
  background-color: #3b1419;
  color: #fca5a5;
  border: 1px solid #571e25;
}

.meta-text {
  color: var(--text-dim);
  font-size: 11px;
}

/* Push Buttons */
.btn {
  background-color: #161822;
  color: #cbd5e1;
  border: 1px solid #262938;
  border-radius: 5px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 27px;
  outline: none;
}

.btn:hover {
  background-color: #1f2230;
  border-color: #34384c;
  color: #fff;
}

.btn:active {
  background-color: #11131a;
}

.btn-primary {
  background-color: var(--primary-blue);
  border-color: #3b82f6;
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: #60a5fa;
}

.btn-appeal {
  background-color: var(--accent-red);
  border-color: #f43f5e;
  color: #fff;
  font-weight: 600;
}

.btn-appeal:hover {
  background-color: var(--accent-hover);
  border-color: #fb7185;
}

.btn-sm {
  padding: 2px 8px;
  height: 24px;
  font-size: 11px;
}

/* Form Controls */
select, input[type="text"], textarea {
  background-color: var(--bg-input);
  color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

select:focus, input[type="text"]:focus, textarea:focus {
  border-color: var(--primary-blue);
}

select {
  cursor: pointer;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 10px;
  flex-shrink: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}

.tab-btn:hover {
  color: #e2e8f0;
}

.tab-btn.active {
  color: #38bdf8;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #38bdf8;
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-pane {
  display: none;
  height: 100%;
  flex-direction: column;
  padding: 8px 12px;
}

.tab-pane.active {
  display: flex;
}

/* Toolbar in Tab */
.tab-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* Tables */
.table-wrap {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

th {
  background-color: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

td {
  padding: 6px 8px;
  border-bottom: 1px solid #161720;
}

tr:nth-child(even) {
  background-color: #111219;
}

tr:hover {
  background-color: #182032;
}

/* Status colors in table */
.status-unappealed { color: #38bdf8; }
.status-pending { color: #fbbf24; }
.status-success { color: #34d399; }
.status-appealed { color: #94a3b8; }

/* Cards & Frames */
.card-frame {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 7px;
  padding: 14px;
}

/* Status Bar */
.status-bar {
  background-color: #090a0d;
  color: var(--text-dim);
  border-top: 1px solid #161720;
  padding: 4px 12px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #141620;
  border: 1px solid #282b3a;
  border-radius: 6px;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 100;
  padding: 4px 0;
}

.dropdown-content button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #cbd5e1;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.dropdown-content button:hover {
  background-color: #2563eb;
  color: #fff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: #12131a;
  border: 1px solid #282b3a;
  border-radius: 10px;
  width: 90%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.8);
}

.modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 14px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Log Box */
.log-box {
  background-color: #0c0d10;
  border: 1px solid #161720;
  border-radius: 6px;
  padding: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  overflow-y: auto;
  flex: 1;
}

.log-entry {
  margin-bottom: 3px;
  line-height: 1.4;
}

.log-time { color: #64748b; }
.log-INFO { color: #38bdf8; font-weight: bold; }
.log-SUCCESS { color: #34d399; font-weight: bold; }
.log-WARN { color: #fbbf24; font-weight: bold; }
.log-ERROR { color: #f87171; font-weight: bold; }
