
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --purple: #7138d5;
  --purple-light: #f1ebff;
  --text: #211d2b;
  --muted: #817b8b;
  --border: #ece9f1;
  --bg: #f8f7fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #faf9fc;
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: white;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 15px 50px #30204c0b;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: transparent;
  border-radius: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 19px;
  margin: 0;
}

.eyebrow, .nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--purple);
}

h1 { font-size: 27px; margin: 8px 0; }
h2 { font-size: 18px; margin: 0; }

.muted, .login-card > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

form { margin-top: 28px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 17px 0 8px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 13px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  background: white;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px #7138d51a;
}

button {
  font: inherit;
  cursor: pointer;
}

#loginButton {
  width: 100%;
  margin-top: 23px;
  background: var(--purple);
  color: white;
  padding: 13px;
  border: 0;
  border-radius: 9px;
  font-weight: 600;
}

.error { color: #d33b48; font-size: 12px; }

.app-screen { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 25px 17px;
  display: flex;
  flex-direction: column;
}

.side-brand { display: flex; align-items: center; gap: 11px; }
.side-brand strong { display: block; font-size: 14px; }
.side-brand small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }

.nav-label { margin: 43px 10px 12px; color: var(--muted); }

.nav-item {
  border: 0;
  background: transparent;
  padding: 13px 12px;
  text-align: left;
  border-radius: 8px;
  font-size: 12px;
  color: #625b6e;
  margin: 3px 0;
}

.nav-item:hover, .nav-item.active {
  background: var(--purple-light);
  color: var(--purple);
  font-weight: 600;
}

.sidebar-bottom { margin-top: auto; }
.admin-email { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; padding: 10px 0; }
.logout-button, .secondary-button {
  padding: 10px 13px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  font-size: 12px;
}

.main-content {
  margin-left: 245px;
  padding: 35px 42px;
  max-width: 1500px;
}

.topbar, .panel-heading, .list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.topbar { margin-bottom: 30px; }
.topbar h1 { margin-top: 5px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 19px;
  text-align: left;
}

.stat-card span, .stat-card small { display: block; font-size: 11px; color: var(--muted); }
.stat-card strong { display: block; font-size: 29px; margin: 13px 0 7px; }
.stat-card:hover { border-color: var(--purple); }

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 22px;
  margin-bottom: 20px;
}

.panel-heading { margin-bottom: 20px; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }

.text-button {
  background: transparent;
  border: 0;
  color: var(--purple);
  font-size: 12px;
  font-weight: 600;
}

.request-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--border);
  padding: 16px 0;
  cursor: pointer;
}

.request-row:hover .request-title { color: var(--purple); }
.request-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.request-meta { color: var(--muted); font-size: 10px; }

.status {
  display: inline-block;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pending { background: #fff5df; color: #a46a00; }
.status-in_progress { background: #eaf1ff; color: #3565b8; }
.status-resolved { background: #e7f7ed; color: #25844a; }
.status-rejected { background: #ffecee; color: #c33c4b; }

.list-toolbar { margin-bottom: 15px; }
.list-toolbar input { max-width: 440px; }
.empty-state { text-align: center; padding: 35px 10px; color: var(--muted); font-size: 13px; }

.back-button { margin-bottom: 20px; }
.detail-card { background: white; border: 1px solid var(--border); border-radius: 13px; padding: 25px; }
.detail-card h2 { margin-bottom: 17px; }
.customer-message { background: var(--bg); border-radius: 10px; padding: 18px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.field-label { font-size: 11px; font-weight: 600; margin-bottom: 8px; display: block; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.primary-button { background: var(--purple); color: white; border: 0; border-radius: 8px; padding: 12px 17px; font-size: 12px; font-weight: 600; }
.secondary-action { background: white; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 12px 17px; font-size: 12px; }
textarea { min-height: 95px; resize: vertical; }
.activity-item { padding: 12px 0; border-top: 1px solid var(--border); font-size: 12px; }
.activity-item small { display: block; color: var(--muted); margin-top: 5px; }
.global-message { color: var(--muted); font-size: 12px; }

@media (max-width: 950px) {
  .sidebar { width: 190px; }
  .main-content { margin-left: 190px; padding: 25px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .sidebar { position: static; width: 100%; min-height: auto; }
  .sidebar-bottom { margin-top: 15px; }
  .nav-label { margin-top: 20px; }
  .main-content { margin-left: 0; padding: 20px 14px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 13px; }
  .detail-grid { grid-template-columns: 1fr; }
  .login-card { padding: 25px; }
}
