/* Charcoal Grey Theme with Turquoise Accents */

/* Base -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.app-body {
  margin: 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace;
  background: #1e1e1e;
  color: #e4e4e4;
}

/* Top nav ------------------------------------------------ */
.top-nav {
  height: 56px;
  background: #2d2d2d;
  border-bottom: 1px solid #3e3e3e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.logo {
  font-weight: 700;
  font-size: 20px;
  color: #e4e4e4;
  font-family: system-ui, -apple-system, sans-serif;
}
.logo span {
  color: #4dd0e1; /* Turquoise accent */
}

.top-nav-center {
  display: flex;
  gap: 16px;
}

.nav-link {
  color: #9e9e9e;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: system-ui, -apple-system, sans-serif;
}
.nav-link:hover {
  color: #4dd0e1;
  background: #3a3a3a;
}
.nav-link.active {
  color: #4dd0e1;
  background: #353535;
  border-bottom: 2px solid #4dd0e1;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  font-size: 13px;
  color: #9e9e9e;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Main layout -------------------------------------------- */
.main-container {
  min-height: calc(100vh - 56px);
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  background: #1e1e1e;
}

.content-card {
  width: 100%;
  max-width: 1100px;
  background: #2d2d2d;
  border-radius: 8px;
  padding: 24px 24px 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid #3e3e3e;
}

/* Typography -------------------------------------------- */
h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  color: #e4e4e4;
}
h2 {
  margin: 16px 0 6px;
  font-size: 18px;
  font-weight: 500;
  color: #e4e4e4;
}
p {
  margin: 4px 0;
  color: #b0b0b0;
  font-size: 14px;
  line-height: 1.6;
}

/* Cards / sections -------------------------------------- */
.section-card, .card {
  background: #252525;
  border-radius: 8px;
  border: 1px solid #3e3e3e;
  padding: 16px 18px 18px;
  margin-top: 16px;
}

.section-header, .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #3e3e3e;
}

.section-title, .card-title {
  font-size: 15px;
  font-weight: 500;
  color: #4dd0e1; /* Turquoise */
}

.section-subtitle {
  font-size: 12px;
  color: #9e9e9e;
}

.card-body {
  color: #b0b0b0;
}

/* Inputs / buttons -------------------------------------- */
.field {
  margin-bottom: 14px;
}

label, .label {
  font-size: 13px;
  color: #b0b0b0;
  display: block;
  margin: 10px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
.select,
textarea,
.input {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #3e3e3e;
  color: #e4e4e4;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'SF Mono', Monaco, monospace;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus,
.input:focus {
  outline: none;
  border-color: #4dd0e1;
  box-shadow: 0 0 0 2px rgba(77, 208, 225, 0.15);
}

input::placeholder {
  color: #6e6e6e;
}

button,
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: system-ui, -apple-system, sans-serif;
}

.btn-primary, button {
  background: #4dd0e1;
  color: #1e1e1e;
}

.btn-primary:hover, button:hover {
  background: #26c6da;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 208, 225, 0.3);
}

.btn-secondary, button.secondary {
  background: #3a3a3a;
  color: #e4e4e4;
}

.btn-secondary:hover {
  background: #454545;
}

.btn-full {
  width: 100%;
}

.btn-danger {
  background: #ef5350;
  color: #fff;
}

.btn-success {
  background: #66bb6a;
  color: #fff;
}

/* Status pills ------------------------------------------ */
.status-pill, .badge, .card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.ok, .badge-success {
  background: rgba(102, 187, 106, 0.15);
  color: #81c784;
  border: 1px solid rgba(102, 187, 106, 0.3);
}

.status-pill.bad, .badge-danger {
  background: rgba(239, 83, 80, 0.15);
  color: #e57373;
  border: 1px solid rgba(239, 83, 80, 0.3);
}

.status-pill.warn, .badge-warning {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
  border: 1px solid rgba(255, 183, 77, 0.3);
}

.badge-exchange {
  background: rgba(77, 208, 225, 0.15);
  color: #4dd0e1;
  border: 1px solid rgba(77, 208, 225, 0.3);
}

.card-tag {
  background: #3a3a3a;
  color: #9e9e9e;
  border: 1px solid #4e4e4e;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

/* Auth pages -------------------------------------------- */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 56px);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #2d2d2d;
  padding: 32px;
  border-radius: 8px;
  border: 1px solid #3e3e3e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  color: #e4e4e4;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: #9e9e9e;
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-footer {
  margin-top: 20px;
  font-size: 13px;
  color: #9e9e9e;
  text-align: center;
}

.auth-link {
  color: #4dd0e1;
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Alerts ------------------------------------------------ */
.alert {
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  border-left: 3px solid;
}

.alert-danger {
  background: rgba(239, 83, 80, 0.1);
  border-left-color: #ef5350;
  color: #e57373;
}

.alert-success {
  background: rgba(102, 187, 106, 0.1);
  border-left-color: #66bb6a;
  color: #81c784;
}

.alert-warning {
  background: rgba(255, 183, 77, 0.1);
  border-left-color: #ffb74d;
  color: #ffb74d;
}

.alert-info {
  background: rgba(77, 208, 225, 0.1);
  border-left-color: #4dd0e1;
  color: #4dd0e1;
}

/* Dashboard grid ---------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tables ------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead {
  background: #252525;
  border-bottom: 2px solid #3e3e3e;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #3a3a3a;
}

.table th {
  font-weight: 500;
  color: #9e9e9e;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  color: #b0b0b0;
}

.table tr:hover td {
  background: #2a2a2a;
}

/* QR code ----------------------------------------------- */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  background: #1e1e1e;
  border-radius: 8px;
  border: 1px solid #3e3e3e;
}

.qr-wrapper img {
  border-radius: 8px;
  border: 2px solid #4dd0e1;
  padding: 8px;
  background: white;
}

/* Utilities --------------------------------------------- */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.text-muted, .muted {
  color: #9e9e9e;
}

.text-center {
  text-align: center;
}

.text-danger {
  color: #ef5350;
}

.text-success {
  color: #66bb6a;
}

.text-warning {
  color: #ffb74d;
}

/* Code/monospace text ----------------------------------- */
code, .code, pre {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  background: #1e1e1e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #4dd0e1;
}

pre {
  padding: 12px;
  overflow-x: auto;
  border: 1px solid #3e3e3e;
}

/* Spinner/Loading --------------------------------------- */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

/* Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 12px;
  }
  
  .top-nav-center {
    width: 100%;
    justify-content: center;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .content-card {
    padding: 16px;
  }
}

/* Scrollbar styling (optional) -------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #252525;
}

::-webkit-scrollbar-thumb {
  background: #4e4e4e;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4dd0e1;
}