/* Hestesolarium Site CSS - Enhanced with Payment Tracking & Mobile Support */

:root {
  --text: #111;
  --card-bg: rgba(255,255,255,0.92);
  --border: rgba(0,0,0,0.12);
  --accent: #0b5ed7;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
}

/* Base Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: url('background_optimized.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  line-height: 1.5;
}

/* Topbar Navigation */
.topbar {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  align-items: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: rgba(255,255,255,1);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Card */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Typography */
h1, h2, h3 {
  margin-top: 0;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

.muted {
  color: rgba(0,0,0,0.6);
  font-size: 13px;
}

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

th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

th {
  background: rgba(0,0,0,0.03);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:hover {
  background: rgba(0,0,0,0.02);
}

.center {
  text-align: center !important;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* Utility Classes */
.success { color: var(--success); }
.warning { color: var(--warning); }
.danger { color: var(--danger); }

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="month"],
input[type="datetime-local"],
select,
textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  width: 100%;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="month"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.1);
}

button[type="submit"],
input[type="submit"] {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

button[type="submit"]:hover,
input[type="submit"]:hover {
  background: #0a52c2;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Checkbox */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--success);
}

/* Payment badges (clickable) */
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.pay-toggle { cursor: pointer; }

.badge-paid {
  background: rgba(40,167,69,0.18);
  color: #1e7e34;
}

.badge-unpaid {
  background: rgba(255,193,7,0.25);
  color: #8a6d3b;
}

.badge-free {
  background: rgba(233,236,239,1);
  color: #495057;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
  }
  
  .btn {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .wrap,
  .container {
    padding: 12px;
  }
  
  .card {
    padding: 16px;
    border-radius: 8px;
  }
  
  h1 { font-size: 22px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }
  
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 8px 4px;
  }
  
  .hide-mobile {
    display: none !important;
  }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
  .wrap,
  .container {
    padding: 20px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  
  .topbar,
  .btn,
  button,
  input[type="checkbox"],
  form {
    display: none !important;
  }
  
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* Accessibility */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #842029;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  border: 1px solid #f5c2c7;
}

/* Success Message */
.success-message {
  background: #d1e7dd;
  color: #0f5132;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  border: 1px solid #badbcc;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(0,0,0,0.5);
}

.empty-state h3 {
  margin-bottom: 8px;
  color: rgba(0,0,0,0.7);
}
