/* public_html/assets/app.css */
* {
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  color: #333;
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}
h1, h2, h3 {
  margin-top: 0;
  color: #003366;
}
h1 {
  font-size: 28pt;
  margin-bottom: 15px;
  border-bottom: 2px solid #0088cc;
  padding-bottom: 10px;
}
h2 {
  font-size: 16pt;
  margin-top: 20px;
  margin-bottom: 10px;
}
h3 {
  font-size: 13pt;
  margin-top: 15px;
  margin-bottom: 8px;
}

/* Navigation */
nav {
  background: #003366;
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
nav .brand {
  font-size: 16pt;
  font-weight: bold;
  color: white;
  text-decoration: none;
  margin-right: 20px;
}
nav a {
  color: #ccc;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 3px;
  transition: all 0.2s;
}
nav a:hover, nav a.on {
  color: white;
  background: #0088cc;
}
nav .who {
  margin-left: auto;
  font-size: 11pt;
}
nav .who a {
  color: #ccc;
  margin-left: 10px;
}

/* Forms */
form {
  margin-bottom: 20px;
}
label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 11pt;
}
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11pt;
  background: white;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #0088cc;
  box-shadow: 0 0 0 3px rgba(0,136,204,0.1);
}
textarea {
  resize: vertical;
  min-height: 100px;
}
button, .btn {
  padding: 10px 20px;
  margin-right: 10px;
  margin-bottom: 10px;
  background: #0088cc;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 11pt;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
button:hover, .btn:hover {
  background: #006699;
}
button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
button.ok {
  background: #28a745;
}
button.ok:hover {
  background: #218838;
}
.btn.chip {
  padding: 6px 12px;
  font-size: 10pt;
  margin: 4px;
}

/* Cards & containers */
.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card.narrow {
  max-width: 400px;
  margin: 50px auto;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.cards .stat {
  background: white;
  border: 2px solid #0088cc;
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.cards .stat:hover {
  box-shadow: 0 4px 8px rgba(0,136,204,0.2);
  transform: translateY(-2px);
}
.cards .stat b {
  display: block;
  font-size: 24pt;
  color: #003366;
  margin-bottom: 5px;
}
.cards .stat span {
  font-size: 10pt;
  color: #666;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
table thead {
  background: #e0e0e0;
}
table th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  border-bottom: 2px solid #999;
  font-size: 10pt;
}
table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  font-size: 10pt;
}
table tbody tr:hover {
  background: #f9f9f9;
}
table a {
  color: #0088cc;
  text-decoration: none;
}
table a:hover {
  text-decoration: underline;
}
table .late {
  background: #ffebee;
  color: #c62828;
  padding: 2px 4px;
  border-radius: 2px;
}
.scrollx {
  overflow-x: auto;
}
.scrollx table {
  margin-bottom: 0;
}

/* Flash messages */
.flash {
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  border-left: 4px solid #0088cc;
}
.flash.ok {
  background: #e8f5e9;
  border-left-color: #28a745;
  color: #2e7d32;
}
.flash.err {
  background: #ffebee;
  border-left-color: #dc3545;
  color: #c62828;
}
.flash.warn {
  background: #fff3e0;
  border-left-color: #ff9800;
  color: #e65100;
}

/* Utilities */
.inline {
  display: inline;
}
.inline-block {
  display: inline-block;
}
.hint {
  font-size: 9pt;
  color: #666;
  font-style: italic;
  margin-top: 5px;
  display: block;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}
@media (max-width: 768px) {
  .grid2, .grid3 {
    grid-template-columns: 1fr;
  }
  nav {
    gap: 5px;
  }
  nav a {
    padding: 5px 8px;
    font-size: 9pt;
  }
  nav .who {
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
  }
}

/* Details/collapsible */
details {
  margin-bottom: 15px;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 3px;
  user-select: none;
}
details summary:hover {
  background: #e8e8e8;
}
details[open] summary {
  background: #e0e0e0;
}

/* Print styles */
@media print {
  nav, .btn, button, input[type="button"] { display: none; }
  body { background: white; }
  .card { box-shadow: none; page-break-inside: avoid; }
  table { page-break-inside: avoid; }
}

/* Code / pre */
pre {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 10px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 9pt;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Links */
a {
  color: #0088cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
