:root {
  --bg: #0f1220;
  --panel: #191d2e;
  --panel-2: #212639;
  --line: #2c324a;
  --text: #e7e9f2;
  --muted: #9aa0b5;
  --accent: #6c8cff;
  --accent-2: #59d3a4;
  --danger: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1c2340 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0 0 4px;
}
.brand span { color: var(--accent); }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

input[type="text"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
input:focus { border-color: var(--accent); }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  color: #fff;
  background: var(--accent);
  transition: filter 0.15s ease;
}
button:hover { filter: brightness(1.08); }
button.block { width: 100%; margin-top: 16px; }
button.ghost { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
button.small { padding: 8px 12px; font-size: 13px; }

.error { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 16px; }

/* App shell */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 18, 32, 0.6);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.container { max-width: 900px; margin: 0 auto; padding: 28px 24px 60px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card .hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.phone-row { display: flex; gap: 10px; margin-bottom: 10px; }
.phone-row input { flex: 1; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
td .broj { font-family: ui-monospace, monospace; color: var(--accent-2); }
.phones-cell { color: var(--muted); }
.empty { color: var(--muted); padding: 16px 4px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-2);
  color: #06231a;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.toast.show { opacity: 1; }
