/* ===============================
   HireWebmaster – Global Styles
   Mobile-first, clean, software UI
   =============================== */

:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e2e8f0;

  --text: #0f172a;
  --text-muted: #64748b;

  --primary: #5b21b6;
  --primary-hover: #4c1d95;
  --accent: #7c3aed;

  --radius: 16px;
}

/* ===============================
   Reset & Base
   =============================== */

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

/* ===============================
   Layout Containers
   =============================== */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.page {
  padding: 1rem 0 3rem;
}

/* ===============================
   Top Navigation (ONLY nav)
   =============================== */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ===============================
   Cards
   =============================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-header {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===============================
   Grid (Responsive Cards)
   =============================== */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Tablet */
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===============================
   Forms
   =============================== */

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===============================
   Buttons
   =============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn:active {
  transform: scale(0.98);
}

/* Full-width on mobile */
.btn-block {
  width: 100%;
}

/* ===============================
   Status Badges
   =============================== */

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-in-progress {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-delivered {
  background: #dcfce7;
  color: #166534;
}

.badge-completed {
  background: #e5e7eb;
  color: #374151;
}

/* ===============================
   Messages (Task Chat)
   =============================== */

.message {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  margin-bottom: 0.5rem;
  max-width: 85%;
  font-size: 0.9rem;
}

.message-user {
  background: var(--surface-2);
  align-self: flex-start;
}

.message-admin {
  background: var(--primary);
  color: #ffffff;
  align-self: flex-end;
}

/* ===============================
   Tables (Admin)
   =============================== */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  color: var(--text-muted);
  font-weight: 500;
}

/* ===============================
   Footer
   =============================== */

.footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===============================
   Utility
   =============================== */

.text-muted {
  color: var(--text-muted);
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden {
  display: none;
}
