/* ============================================================
   SF Tech Service QR Manager - v5
   Clean Light Theme | Mobile Friendly | Bordered Layout
   ============================================================ */

:root {
  --accent: #0077cc;
  --accent-hover: #005fa3;
  --bg: #f7f9fc;
  --card: #ffffff;
  --muted: #6b7280;
  --border: #d0d9e3;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, Arial, sans-serif;
  background: var(--bg);
  color: #111;
  line-height: 1.5;
}

/* Header */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

header img {
  height: 85px;
  width: auto;
}

.header-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  margin-left: 12px;
  text-align: center;
  flex: 1;
}

/* Navigation */
nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

nav a:hover {
  background: #e8f3ff;
  color: var(--accent-hover);
}

/* Layout Containers */
.container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 16px;
}

/* Card Design */
.card {
  background: var(--card);
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 0 auto 26px auto;
  text-align: center;
}

.card .btn {
  margin: 12px 6px 0 6px;
}

h1,
h2 {
  color: var(--accent);
  text-align: center;
  margin-bottom: 18px;
}

/* Form Elements */
.form-row,
.form-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

input[type=text],
input[type=password],
input[type=url],
input[type=email],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

/* Buttons */
button,
.btn {
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover,
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Tables */
.table,
.qr-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
}

.table th,
.table td,
.qr-table th,
.qr-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.table th,
.qr-table th {
  background: #f1f7fb;
  font-weight: 600;
}

.table tr:nth-child(even),
.qr-table tr:nth-child(even) {
  background: #fafcff;
}

/* Messages & Alerts */
.notice {
  background: #fff8e6;
  border: 1px solid #ffecb5;
  padding: 10px;
  border-radius: 8px;
  color: #7a5800;
  margin-bottom: 12px;
}

.msg {
  color: green;
  margin: 8px 0;
}

.error {
  color: #c0392b;
  margin: 8px 0;
}

/* Footer */
.footer {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 30px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header img {
    height: 70px;
    margin-bottom: 10px;
  }

  .header-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  nav {
    margin-top: 6px;
  }

  .container {
    padding: 0 10px;
  }

  .table,
  .qr-table {
    font-size: 14px;
  }

  .table th,
  .table td,
  .qr-table th,
  .qr-table td {
    padding: 8px;
  }

  .btn,
  button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* Keep header readable */
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header img {
    height: 70px;
    margin-bottom: 10px;
  }

  .header-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  /* Center nav links and wrap */
  nav {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  nav a {
    width: 100%;
    max-width: 260px;
    text-align: center;
    border: 1px solid var(--border);
    background: #f6f9ff;
  }

  /* Make forms vertical and full width */
  .form-row {
    flex-direction: column;
  }

  .form-row input,
  .form-row select,
  .form-row textarea,
  .form-row button {
    width: 100%;
  }

  /* Let tables scroll horizontally */
  .qr-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .qr-table::-webkit-scrollbar {
    height: 8px;
  }

  .qr-table::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  /* Buttons full width */
  .btn,
  button {
    width: 100%;
    margin-top: 6px;
  }
}
