*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at top, rgba(149, 76, 233, 0.16), transparent 28%),
    linear-gradient(180deg, #090a0f 0%, #07080d 100%);
  color: #e5e8eb;
}

body.app-page,
body.login-page {
  padding-top: 76px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(7, 10, 19, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.site-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f8fafc;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.site-nav .nav-logout {
  margin-left: auto;
  padding-left: 24px;
}

.site-nav a,
.site-nav button {
  color: #cbd5e1;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.site-nav button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.92);
}

.site-nav .nav-logout button {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f8fafc;
}

.site-nav .nav-logout button:hover {
  background: rgba(248, 113, 113, 0.22);
}

.site-nav a:hover,
.site-nav button:hover {
  color: #ffffff;
}

.login-page {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(149, 76, 233, 0.16), transparent 30%),
    linear-gradient(180deg, #111217 0%, #07080d 100%);
}

.login-shell {
  width: min(100%, 360px);
  max-width: 100%;
  padding: 20px;
  margin: 0 16px;
}

.login-card {
  width: 100%;
  background: rgba(15, 17, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  border-radius: 22px;
  padding: 34px 28px;
}

.login-header h1 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f7f7f8;
}

.login-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #d6d6d9;
}

.login-icon {
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-right: 8px;
}

.login-form input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f3f4f6;
  font-size: 1rem;
}

.login-form input::placeholder {
  color: rgba(243, 244, 246, 0.5);
}

.login-button {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: transparent;
  color: #f3f4f6;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.login-button:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.login-alert {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffd2d2;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.container {
  max-width: 980px;
  margin: 40px auto;
  padding: 28px;
  background: rgba(15, 17, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

header {
  margin-bottom: 28px;
}

h1,
h2,
h3 {
  color: #f8fafc;
}

header p,
.container p,
.alert p,
.table-list td,
.table-list th {
  color: #cbd5e1;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

nav a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: #bfdbfe;
}

nav form {
  display: inline;
}

nav form button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.96);
  color: #e2e8f0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

nav form button:hover {
  background: rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

form label {
  display: block;
  margin-top: 16px;
  font-weight: 600;
  color: #cbd5e1;
}

input,
select,
button {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
}

input:focus,
select:focus,
button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  border-color: transparent;
  color: #fff;
  margin-top: 18px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.summary-card {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.summary-card h3 {
  margin-bottom: 10px;
  color: #e2e8f0;
}

.summary-card p {
  margin: 0;
  font-size: 1.6rem;
  color: #f8fafc;
}

.section-note {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #94a3b8;
}

.inline-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form input {
  width: auto;
  min-width: 140px;
}

.inline-form button {
  margin-top: 0;
  width: auto;
}

.table-list {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table-list th,
.table-list td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.table-list thead th {
  background: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
  text-align: left;
}

.table-list tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-list a {
  color: #93c5fd;
}

.alert {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(71, 85, 105, 0.35);
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.alert p,
.alert {
  color: #e2e8f0;
}

object.pdf-viewer,
iframe.pdf-viewer {
  width: 100%;
  min-height: 720px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  margin-top: 24px;
  background: #0f172a;
}
