/* ====== GLOBAL THEME ====== */
:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #fff00ff; /*334155 */
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-link: #C0C0C0;
  --accent: #3b82f6;
  --accent-hover: #2563eb;/* */
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

/* ====== AUTH LAYOUT ====== */
.auth-body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 16px;
  min-height: 100vh;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease-out;
}

.auth-container h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.auth-sub {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 15px;
}

.auth-container label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-container input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid #334155;
  background: #0f172a;
  color: var(--text);
  font-size: 15px;
}

.auth-container input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}

.auth-error {
  margin-top: 16px;
  color: #f87171;
  font-size: 14px;
  min-height: 20px;
}

.auth-alt {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-alt a {
  color: var(--accent);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: 0.2s ease-out;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
}

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

/* ====== APP LAYOUT ====== */
.app-header {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid #334155;
}

.app-container {
  padding: 24px;
}

.card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== APP NAVIGATION ====== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 24px;
  border-bottom: 1px solid #334155;
  box-shadow: var(--shadow);
}

.app-nav a {
  margin-left: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  transition: 0.2s ease-out;
}

.app-nav a:hover {
  color: var(--accent);
}

.logout-link {
  color: #f87171 !important;
}

.logout-link:hover {
  color: #ef4444 !important;
}

/* ====== DASHBOARD CARDS ====== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.dashboard-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.05);
}

.dashboard-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 20px;
}

.dashboard-card p {
  color: var(--text-muted);
  margin: 0;
}

/* ====== FILTER SELECT ====== */
.filter-select {
  padding: 10px 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  margin-top: 10px;
}

/* ====== BIDS LIST ====== */
.bid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #334155;
}

.bid-info {
  max-width: 70%;
}

.bid-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.bid-actions a {
  margin-left: 10px;
}
/* ====== FORM ELEMENTS ====== */
.form-label {
  display: block;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.3);
}

/* ====== EDIT BID LAYOUT ====== */
.edit-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.edit-left {
  width: 100%;
}

.edit-right > .dashboard-card {
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .edit-layout {
    grid-template-columns: 1fr;
  }
}

/* ====== CLIENTS PAGE ====== */
.clients-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #334155;
}

.client-info {
  max-width: 60%;
}

.client-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.client-actions .btn {
  margin-left: 10px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
  color: var(--text-muted);
}

.icon-btn:hover {
  color: var(--accent);
}

/* ====== MODALS ====== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-alt);
  padding: 30px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

/* ====== ACCOUNT PAGE ====== */
.account-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
}

.success-msg {
  color: #4ade80;
  font-size: 14px;
}

/* ====== BILLING PAGE ====== */
.billing-row {
  padding: 14px 0;
  border-bottom: 1px solid #334155;
}

.billing-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.calcLink {
  color: #00FF00;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}