:root {
  --primary: #0d47a1;
  --secondary: #1976d2;
  --success: #2e7d32;
  --error: #c62828;
  --bg: #f5f5f5;
  --text: #212121;
  --white: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h2 {
  font-size: 1.35rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1 {
  color: var(--primary);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

h3 {
  margin: 1rem 0 0.5rem;
  color: var(--primary);
}

.subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
}

.btn {
  display: inline-block;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--white);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  width: 100%;
  margin-top: 0.5rem;
}

.btn-secondary {
  background: var(--secondary);
  width: 100%;
  margin-bottom: 1rem;
}

.btn-success {
  background: var(--success);
  width: 100%;
  margin: 1rem 0;
  padding: 1.2rem;
  font-size: 1.15rem;
}

.btn-small {
  width: auto;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  background: #444;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
}

.message.error {
  background: #ffebee;
  color: var(--error);
  border: 2px solid var(--error);
}

.message.success {
  background: #e8f5e9;
  color: var(--success);
}

.hint {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.meta {
  color: #555;
  font-size: 0.95rem;
}

.folios-list {
  list-style: none;
}

.folios-list li {
  margin-bottom: 0.5rem;
}

.folios-list button {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  font-size: 1.2rem;
  font-weight: bold;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  background: var(--white);
  color: var(--primary);
  cursor: pointer;
}

.folios-list button:hover,
.folios-list button:focus {
  background: #e3f2fd;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.gallery figure {
  margin: 0;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.gallery figcaption {
  font-size: 0.75rem;
  padding: 0.35rem;
  word-break: break-all;
  color: #555;
}

.actions {
  margin-top: 0.5rem;
}
