/* RFRNT License Server - Typography-first brutalist stylesheet */

/* Iosevka Aile - Sans-serif */
@font-face {
  font-family: 'Iosevka Aile';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/IosevkaAile-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Iosevka Aile';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/IosevkaAile-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Iosevka Aile';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/IosevkaAile-Bold.woff2') format('woff2');
}

/* Font variables */
:root {
  --font-sans: 'Iosevka Aile', system-ui, sans-serif;
  --font-mono: 'Iosevka', 'SF Mono', Consolas, monospace;
}

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.55;
  color: #000;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 3rem 0;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #000;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

/* Layout */
.container {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow {
  max-width: 28rem;
}

.container.wide {
  max-width: 66rem;
}

/* Header */
header {
  padding: 1.5rem 0;
  border-bottom: 1px solid #000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  font-size: 0.9rem;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

/* Admin header */
.admin-header {
  background: #000;
  color: #fff;
}

.admin-header .logo {
  color: #fff;
}

.admin-header nav a {
  color: #fff;
}

.admin-header .btn-link {
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
}

.admin-header .btn-link:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  padding: 1.5rem 0;
  border-top: 1px solid #000;
  font-size: 0.875rem;
  color: #666;
}

/* Hero */
.hero {
  margin-bottom: 2rem;
}

.hero p {
  font-size: 1.1rem;
  color: #444;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0;
}

.page-header .actions {
  display: flex;
  gap: 0.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #666;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #000;
  background: #fff;
  border-radius: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #000;
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 4rem;
}

select {
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: #fff;
  color: #000;
}

.btn-secondary {
  background: #fff;
  color: #000;
}

.btn-secondary:hover {
  background: #000;
  color: #fff;
}

.btn-danger {
  background: #c00;
  border-color: #c00;
}

.btn-danger:hover {
  background: #fff;
  color: #c00;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
}

.data-table th {
  font-weight: 600;
  border-bottom: 2px solid #000;
}

.data-table td a {
  font-weight: 600;
}

.data-table code {
  font-size: 0.85em;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2em 0.5em;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
}

.badge-success {
  background: #0a0;
  color: #fff;
}

.badge-danger {
  background: #c00;
  color: #fff;
}

.badge-warning {
  background: #e6a700;
  color: #000;
}

.badge-secondary {
  background: #666;
  color: #fff;
}

/* Description lists */
dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
}

dt {
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
}

dd {
  margin: 0;
}

/* License details */
.license-details {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Suspicious activity warnings */
.suspicious-warnings {
  background: #fff8e6;
  border: 1px solid #e6a700;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.suspicious-warnings h3 {
  margin-bottom: 0.75rem;
  color: #8a6d00;
}

.warning-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e6d68a;
}

.warning-item:last-child {
  border-bottom: none;
}

/* Messages */
.error-message {
  background: #fdd;
  border: 1px solid #c00;
  color: #900;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.success-box {
  background: #dfd;
  border: 1px solid #0a0;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Empty states */
.empty-state {
  color: #666;
  font-style: italic;
}

/* Info sections */
.info-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
}

.info-section h2 {
  margin-top: 0;
}

.info-section ul {
  margin-left: 1.5rem;
}

.info-section li {
  margin-bottom: 0.5rem;
}

/* Quote form specific */
.quote-form {
  max-width: 28rem;
}

/* Login form specific */
.login-form,
.setup-form {
  margin-top: 1.5rem;
}

/* TOTP setup */
.totp-secret {
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  word-break: break-all;
  text-align: center;
}

.totp-secret code {
  background: none;
  padding: 0;
}

.form-note {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  dl {
    grid-template-columns: 1fr;
  }

  dt {
    margin-top: 0.5rem;
  }

  dd {
    margin-bottom: 0.5rem;
  }
}
