:root {
  color-scheme: dark;
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --bg: #030305;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: #e8e8ea;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  position: relative;
  padding: 2rem 1.5rem;
}

.bg-photo {
  position: fixed;
  inset: 0;
  background-image: url("/img/foto.jpg");
  background-size: cover;
  background-position: center 20%;
  filter: grayscale(0.15) brightness(0.85) contrast(1.05);
  opacity: 0.35;
  z-index: 0;
}

.bg-fade {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(3, 3, 5, 0.25) 0%, rgba(3, 3, 5, 0.8) 65%, #030305 100%),
    linear-gradient(180deg, rgba(3, 3, 5, 0.9) 0%, rgba(3, 3, 5, 0.35) 30%, rgba(3, 3, 5, 0.35) 70%, rgba(3, 3, 5, 0.9) 100%);
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

h1,
h2 {
  font-family: "Consolas", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f4f4f5;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 24px rgba(0, 240, 255, 0.35), 0 0 48px rgba(255, 43, 214, 0.2);
  text-align: center;
  margin: 0 0 0.3rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.3rem;
}

.subtitle {
  text-align: center;
  margin: 0 0 2rem;
  color: var(--cyan);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-family: "Consolas", "Courier New", monospace;
  opacity: 0.85;
}

.subtitle::before {
  content: "// ";
}
.subtitle::after {
  content: " //";
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
}

.topbar .who {
  color: #9a9aa2;
}
.topbar .who strong {
  color: var(--cyan);
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.tile-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 1.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(12, 12, 16, 0.6);
  backdrop-filter: blur(4px);
  color: #f4f4f5;
  text-decoration: none;
  font-family: "Consolas", "Courier New", monospace;
  letter-spacing: 0.03em;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.tile:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35), 0 0 36px rgba(255, 43, 214, 0.15);
  transform: translateY(-2px);
}

.tile .icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile .icon svg {
  display: block;
}

.tile-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.empty {
  text-align: center;
  color: #7c7c85;
  font-family: "Consolas", "Courier New", monospace;
  padding: 2rem 0;
}

a.btn,
button.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.08);
  color: var(--cyan);
  text-decoration: none;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.03em;
}

a.btn:hover,
button.btn:hover {
  background: rgba(0, 240, 255, 0.18);
}

button.btn.danger,
a.btn.danger {
  border-color: rgba(255, 43, 214, 0.5);
  color: var(--magenta);
  background: rgba(255, 43, 214, 0.08);
}
button.btn.danger:hover,
a.btn.danger:hover {
  background: rgba(255, 43, 214, 0.18);
}

button.btn.small,
a.btn.small {
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
}

form.card-form {
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  background: rgba(9, 9, 12, 0.75);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.15);
}

label {
  display: block;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9a9aa2;
  margin: 1rem 0 0.3rem;
}

input,
select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: #0c0c10;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  color: #f4f4f5;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.form-submit {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.7rem;
  font-size: 0.85rem;
  text-align: center;
}

.error {
  color: var(--magenta);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

th {
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.role-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.role-tag.admin {
  border: 1px solid var(--magenta);
  color: var(--magenta);
}
.role-tag.editor {
  border: 1px solid var(--cyan);
  color: var(--cyan);
}
.role-tag.viewer {
  border: 1px solid #7c7c85;
  color: #b8b8bf;
}

.section {
  margin-bottom: 2.5rem;
}

.inline-form {
  display: inline;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
