/* ─── Weltinai Financial Systems – Main Stylesheet ─────────────────────────── */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif; background: #07111f; color: #e2e8f0; line-height: 1.5; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a1628; }
::-webkit-scrollbar-thumb { background: #1e3a6e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2563eb; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  background: linear-gradient(135deg, #071827, #102a43);
  border-bottom: 2px solid #d6ad43;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
  gap: 8px;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-icon { font-size: 22px; }
.navbar-title { color: #d6ad43; font-size: 18px; font-weight: 700; letter-spacing: 0.05em; }
.navbar-sub { color: #94a3b8; font-size: 12px; }
.navbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Nav Buttons ──────────────────────────────────────────────────────────── */
.nav-btn {
  padding: 7px 16px;
  background: #1d4e89;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
}
.nav-btn:hover { background: #2563eb; transform: translateY(-1px); }
.nav-btn:active { transform: scale(0.97); }
.nav-btn-sys { background: #1d4e89; }
.nav-btn-danger { background: #dc2626; }
.nav-btn-danger:hover { background: #b91c1c; }

/* ── Language Toggle ──────────────────────────────────────────────────────── */
.lang-toggle { display: flex; gap: 4px; }
.lang-btn {
  padding: 6px 12px;
  border: 1px solid #2b436c;
  border-radius: 6px;
  background: #081527;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.lang-btn:hover:not(.active) { background: #0f2044; color: #e2e8f0; }

/* ── Sync Status ──────────────────────────────────────────────────────────── */
.sync-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.sync-status.synced { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid #22c55e; }
.sync-status.syncing { background: rgba(234,179,8,0.15); color: #eab308; border: 1px solid #eab308; }
.sync-status.error { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid #ef4444; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: calc(100vh - 52px); }
.sidebar {
  width: 200px;
  min-width: 180px;
  background: #0b1a2e;
  border-right: 1px solid #1e3a6e;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}
.sidebar-btn {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  color: #94a3b8;
  border: none;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sidebar-btn:hover { background: #1e3a6e; color: #e2e8f0; }
.sidebar-btn.active { background: #1d4ed8; color: #fff; font-weight: 600; }
.main-content { flex: 1; padding: 20px; overflow-x: auto; }

/* ── Panels ───────────────────────────────────────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; }

/* ── Grid ─────────────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; align-items: start; }
.c1 { grid-column: span 1; }
.c2 { grid-column: span 2; }
.c3 { grid-column: span 3; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }
.c9 { grid-column: span 9; }
.c10 { grid-column: span 10; }
.c11 { grid-column: span 11; }
.c12 { grid-column: span 12; }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: #101d31;
  border: 1px solid #1e3a6e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.kpi { color: #94a3b8; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.money { font-size: 22px; font-weight: 700; color: #3b82f6; }

/* ── Form Elements ────────────────────────────────────────────────────────── */
label { display: block; color: #94a3b8; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  background: #081527;
  border: 1px solid #2b436c;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { border-color: #3b82f6; }
input[readonly] { color: #64748b; cursor: default; }
textarea { resize: vertical; min-height: 60px; }
.field-error { color: #ef4444; font-size: 11px; margin-top: 2px; display: none; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
button {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-right: 6px;
  margin-bottom: 4px;
}
button:active { transform: scale(0.97); }
button.good { background: #16a34a; color: #fff; }
button.good:hover { background: #15803d; }
button.gray { background: #263b5f; color: #e2e8f0; }
button.gray:hover { background: #334d7a; }
button.danger { background: #dc2626; color: #fff; }
button.danger:hover { background: #b91c1c; }
button.deleteBtn { background: #7f1d1d; color: #fca5a5; font-size: 11px; padding: 4px 8px; border-radius: 4px; }
button.deleteBtn:hover { background: #991b1b; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { background: #081527; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; text-align: left; border-bottom: 1px solid #1e3a6e; white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid #0f2044; color: #cbd5e1; }
tr:hover td { background: rgba(30,58,110,0.3); }
tr.inrow td { background: rgba(22,163,74,0.05); }
tr.outrow td { background: rgba(220,38,38,0.05); }
.scroll { overflow-x: auto; max-height: 400px; overflow-y: auto; }

/* ── Info / Warn boxes ────────────────────────────────────────────────────── */
.warn { background: #0f2044; border: 1px solid #1e3a6e; border-radius: 8px; padding: 10px 14px; color: #94a3b8; font-size: 13px; margin-bottom: 8px; }
.info { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.3); border-radius: 8px; padding: 10px 14px; color: #93c5fd; font-size: 13px; margin-bottom: 8px; }
.contact { background: #0f2044; border: 1px solid #d6ad43; border-radius: 8px; padding: 10px 14px; color: #fde68a; font-size: 13px; }

/* ── Transfer panel ───────────────────────────────────────────────────────── */
.transfer { background: #0b1a2e; border: 1px solid #1e3a6e; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.transfer h2 { color: #d6ad43; margin: 0 0 16px; font-size: 16px; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modalBox {
  background: #0f2044;
  border: 1px solid #1e3a6e;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modalBox h3 { color: #d6ad43; margin: 0 0 12px; font-size: 16px; }
.modalBox p { color: #94a3b8; font-size: 13px; margin: 0 0 14px; }
.modalBox input { margin-bottom: 12px; }
.modalBox button { width: 100%; margin: 4px 0; }

/* ── Receipt ──────────────────────────────────────────────────────────────── */
.receipt-wrapper { margin-top: 16px; }
.receipt-card { background: linear-gradient(145deg,#0b1a2e,#071827); border: 1px solid #1e3a6e; border-radius: 16px; overflow: hidden; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.receipt-header { background: linear-gradient(135deg,#071827,#0f2044); padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1e3a6e; }
.receipt-logo-area { display: flex; align-items: center; gap: 12px; }
.receipt-icon { font-size: 28px; }
.receipt-title { color: #d6ad43; font-size: 18px; font-weight: 700; letter-spacing: 0.1em; }
.receipt-subtitle { color: #64748b; font-size: 10px; letter-spacing: 0.15em; }
.receipt-date { color: #64748b; font-size: 12px; }
.receipt-code-section { background: linear-gradient(135deg,#fef3c7,#fde68a); padding: 16px 20px; text-align: center; }
.receipt-code-label { color: #92400e; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; margin-bottom: 6px; }
.receipt-code-value { color: #1c1917; font-size: 26px; font-weight: 700; font-family: 'Courier New', monospace; letter-spacing: 0.1em; }
.receipt-details { padding: 16px 20px; }
.receipt-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.receipt-label { color: #64748b; font-size: 12px; }
.receipt-value { color: #e2e8f0; font-size: 13px; font-weight: 500; }
.receipt-value-big { color: #3b82f6; font-size: 18px; font-weight: 700; }
.receipt-divider { border: none; border-top: 1px dashed #1e3a6e; margin: 8px 0; }
.receipt-footer { background: #071827; padding: 10px 20px; text-align: center; }
.receipt-watermark { color: #1e3a6e; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; }
.receipt-buttons { display: flex; gap: 8px; margin-top: 12px; }
.receipt-btn { flex: 1; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: background 0.2s; }
.receipt-btn-copy { background: #1d4ed8; color: #fff; }
.receipt-btn-copy:hover { background: #1e40af; }
.receipt-btn-share { background: #16a34a; color: #fff; }
.receipt-btn-share:hover { background: #15803d; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid #1e3a6e; }
  .sidebar-btn { width: auto; }
  .c3, .c4, .c6 { grid-column: span 6; }
  .c2 { grid-column: span 4; }
}
@media (max-width: 600px) {
  .c2, .c3, .c4, .c5, .c6, .c7, .c8, .c9 { grid-column: span 12; }
  .navbar { flex-direction: column; align-items: flex-start; }
  .cards { grid-template-columns: 1fr 1fr; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
  .navbar, .sidebar, .nav-btn, .sidebar-btn, button { display: none !important; }
  body { background: white; color: black; }
  .card, .receipt-card { background: white; color: black; border: 1px solid #999; }
  th, td { color: black; border: 1px solid #999; }
}



