/* Theme variables */
:root {
  --bg: #0b0f14;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #3b82f6;
  --success: #22c55e;
  --error: #ef4444;
  --border: #1f2937;
}

body.light {
  --bg: #f3f4f6;
  --card: #acbae6;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  transition: background .3s, color .3s;
}

/* Profile header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Avatar */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--border);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar svg {
  width: 48px;
  height: 48px;
  stroke: var(--muted);
}

/* Stats */
.stats {
  display: flex;
  margin-top: .5rem;
  font-size: .9rem;
  flex-wrap:wrap;
  gap:.75rem 1.25rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}


.tab {
  padding: .5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  transition: background .2s, color .2s;
}

.tab:hover {
  background: var(--border);
}

.tab.active {
  background: var(--primary);
  color: #fff;
}

.cards{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Buttons */
.btn {
  padding: .5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  transition: background .2s, transform .1s;
}

.btn:hover {
  transform: translateY(-1px);
  background: #2563eb;
}

.btn.secondary {
  background: var(--muted);
  color: #fff;
}

.btn.success {
  background: var(--success);
}

.btn.danger {
  background: var(--error);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.show {
  display: flex;
  animation: fadeIn .25s ease;
}

.modal-content {
  background: var(--card);
  padding: 1.5rem;
  width: 90%;
  max-width: 500px;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  background: var(--card);
  padding: .5rem;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: background .3s;
}
.theme-toggle:hover {
  background: var(--border);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat{
    display:flex;
    align-items:center;
    gap:.25rem;
    font-size:.9rem;
}
.stat svg{
    width:16px;height:16px;
    fill:var(--success);
}
.stat.negative svg{
    fill:var(--error);
}
.top-nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:1.25rem;
}


.top-nav{
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding-bottom: .75rem;
}

.profile-header h2{
  font-size:1.35rem;
  font-weight:600;
}


.top-nav button,
.top-nav a{
    background:var(--card);
    color:var(--text);
    border:none;
    padding:.4rem .8rem;
    border-radius:6px;
    cursor:pointer;
    text-decoration:none;
}


.page-wrapper{
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}


.status {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 8px;
}
.status.online {
  background: #1dbf73;
  color: #fff;
}
.status.offline {
  background: #888;
  color: #fff;
}

.modal-content {
  max-height: 80vh;
  overflow-y: auto;
}

.mini-card {
  border: 1px solid #333;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-card .feedback.positive { color: #1dbf73; }
.mini-card .feedback.negative { color: #ff4d4d; }

.modal-content {
  max-height: 80vh;
  overflow-y: auto;
}

.mini-card {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #111;
}

.mini-card .top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.mini-card .rate {
  opacity: 0.7;
}

.mini-card .with {
  margin-top: 6px;
  font-size: 13px;
}

.mini-card .comment {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.mini-card .comment.positive {
  background: rgba(29,191,115,.15);
  color: #1dbf73;
}

.mini-card .comment.negative {
  background: rgba(255,77,77,.15);
  color: #ff4d4d;
}

.mini-card .comment.muted {
  opacity: 0.5;
}

.last-active {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 6px;
}

/* Default (dark mode) */
.cards-container {
    max-height: 500px; /* adjust as needed */
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1e1e1e; /* dark background */
}

.card {
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a2a2a; /* dark card */
    color: #f0f0f0; /* light text */
}

.amount-input {
    width: 100%;
    padding: 8px 10px;
    margin: 5px 0;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2a2a2a;
    color: #f0f0f0;
    font-size: 0.95rem;
}

.buttons .btn {
    flex: 1;
}

/* Empty state */
.empty-state {
    padding: 20px;
    text-align: center;
    color: #aaa;
    font-style: italic;
    border: 1px dashed #555;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Light mode override */
body.light .cards-container {
    background: #fff;
    border: 1px solid #ddd;
}

body.light .card {
    background: #fafafa;
    border: 1px solid #eee;
    color: #333;
}

body.light .amount-input {
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
}

body.light .empty-state {
    border-color: #ccc;
    color: #888;
}


.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding: 20px;
  width: 92%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  border: 1px solid var(--border);
}

:root {
  --bg: #0f1115;
  --card: #161a22;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #262b36;
  --primary: #ff9500;
}

body.light {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #ff9500;
}


.modal-content h2,
.modal-content h3 {
  color: var(--text);
}

.modal-content p,
.modal-content div {
  color: var(--muted);
}

.modal-content .btn {
  margin-top: 12px;
}

@media (max-width: 480px) {
  .modal-content {
    padding: 16px;
    border-radius: 10px;
  }
}
