/* Shared styles for all pages */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace; background: #111; color: #eee; }
h1 { font-size: 16px; font-weight: 600; }
h1 a { color: inherit; text-decoration: none; }

/* Header / toolbar */
header, .toolbar { display: flex; align-items: baseline; gap: 16px; padding: 10px 16px; border-bottom: 1px solid #333; flex-shrink: 0; }
header .stat { font-size: 13px; color: #aaa; }
header .stat b { color: #fff; }

/* Form elements */
select, input { background: #222; color: #eee; border: 1px solid #555; border-radius: 4px; padding: 3px 6px; font-size: 12px; font-family: inherit; }
select { cursor: pointer; }
button { background: #335; color: #eee; border: 1px solid #555; border-radius: 4px; padding: 5px 14px; font-size: 12px; font-family: inherit; cursor: pointer; }
button:hover { background: #447; }
button:disabled { opacity: 0.5; cursor: default; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #262626; font-size: 12px; }
th { color: #666; font-weight: 500; position: sticky; top: 0; background: #111; }
td { color: #aaa; }
tr:nth-child(even) td { background: #151515; }
tr:hover td { background: #1a1a2e; }

/* Messages */
.msg { font-size: 12px; margin-top: 8px; }
.msg.error { color: #f44; }
.msg.ok { color: #4f4; }

/* Links */
.delete-link { color: #c66; text-decoration: none; font-size: 12px; }
.delete-link:hover { color: #f44; }

/* Error overlay */
#error-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
#error-overlay.visible { display: flex; }
#error-overlay .error-box {
  background: #1a1a1a;
  border: 1px solid #c44;
  border-radius: 8px;
  padding: 32px 40px;
  max-width: 500px;
  text-align: center;
}
#error-overlay .error-box h2 { font-size: 16px; color: #f66; margin-bottom: 12px; }
#error-overlay .error-box p { font-size: 13px; color: #aaa; margin-bottom: 20px; word-break: break-word; }
#error-overlay .error-box button { min-width: 100px; }

/* Hamburger menu */
.hamburger-btn { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.hamburger-btn:hover { color: #fff; background: none; }

#nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9000;
}
#nav-overlay.visible { display: block; }

#nav-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: #1a1a1a;
  border-right: 1px solid #333;
  z-index: 9001;
  padding: 16px 0;
  transform: translateX(-100%);
  transition: transform 0.15s ease;
  overflow-y: auto;
}
#nav-menu.visible { transform: translateX(0); }
#nav-close { position: absolute; top: 8px; right: 8px; font-size: 18px; }
#nav-menu a { display: block; padding: 10px 20px; color: #6cf; text-decoration: none; font-size: 14px; }
#nav-menu a:hover { background: #252525; color: #fff; }
#nav-menu a.active { color: #fff; background: #252540; }
#nav-menu .nav-section { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 1px; padding: 16px 20px 6px; }
#nav-menu .nav-divider { border-top: 1px solid #333; margin: 8px 0; }
#nav-menu a.nav-signout { color: #f66; }
#nav-menu a.nav-signout:hover { color: #f99; }
