/* Apple-inspired styles */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #007aff;
  --accent-hover: #0056b3;
  --border: #d2d2d7;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.screen { min-height: 100vh; }

.login-card {
  max-width: 380px;
  margin: 12vh auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
}
.logo { color: var(--accent); margin-bottom: 16px; }
.login-card h1 { font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.subtitle { color: var(--text-secondary); margin-bottom: 28px; font-size: 15px; }
input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  background: #fafafa;
  outline: none;
}
input:focus { border-color: var(--accent); background: #fff; }
button {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
.error { color: #ff3b30; font-size: 14px; margin-top: 12px; min-height: 20px; }

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.header-right { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); }
.icon-btn {
  width: auto;
  padding: 8px;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
}
.icon-btn:hover { background: #eee; color: var(--text); }

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 8px 16px;
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  width: auto;
  border: none;
}
.tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

#content { padding: 24px; max-width: 960px; margin: 0 auto; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { font-size: 20px; margin-bottom: 16px; font-weight: 600; }

.row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.row input, .row select { flex: 1; min-width: 160px; }

.btn-sm {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 10px;
}
.btn-secondary { background: #e5e5ea; color: var(--text); }
.btn-secondary:hover { background: #d1d1d6; }
.btn-danger { background: #ff3b30; }
.btn-danger:hover { background: #d70015; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid #eee; }
th { color: var(--text-secondary); font-weight: 500; font-size: 12px; text-transform: uppercase; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #ffebee; color: #c62828; }

textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  background: #fafafa;
}
textarea:focus { border-color: var(--accent); background: #fff; outline: none; }
