/* Station Pt/Pd - Common Styles */
/* All text 11px, weight 400 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 400;
  font-family: inherit;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  padding: 8px;
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 2px solid #333;
  margin-bottom: 8px;
}

.header h1 {
  flex: 1;
  font-weight: bold;
}

.back {
  text-decoration: none;
  color: #333;
  margin-right: 8px;
}

/* Status indicator */
.status {
  padding: 2px 6px;
  border-radius: 8px;
  background: #ddd;
}

.status.online {
  background: #90EE90;
}

.status.offline {
  background: #FFB6C1;
}

/* Menu items */
.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.menu-item:hover {
  background: #f0f0f0;
}

.menu-item:active {
  background: #e0e0e0;
}

.menu-icon {
  margin-right: 8px;
  width: 24px;
  text-align: center;
}

/* Cards / Sections */
.card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 8px;
  margin-bottom: 8px;
}

.card h2 {
  font-weight: bold;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

/* Form elements */
.form-row {
  display: flex;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.form-row:last-child {
  border-bottom: none;
}

.form-row label {
  width: 90px;
  flex-shrink: 0;
}

.form-row input,
.form-row select,
.form-row span {
  flex-shrink: 0;
  padding: 4px;
  border: none;
  background: transparent;
  text-align: left;
}

.form-row textarea {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  font-family: inherit;
  font-size: inherit;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 2.5em;
  padding: 4px;
  box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #999;
}

input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid #333;
  border-radius: 5px;
  background: #fff;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: #333;
  margin-bottom: 6px;
  transition: background 0.2s;
}

.btn:hover {
  background: #f0f0f0;
}

.btn:active {
  background: #e0e0e0;
}

.btn.primary {
  background: #90EE90;
}

.btn.primary:hover {
  background: #7dde7d;
}

.btn.danger {
  background: #FFB6C1;
}

.btn.danger:hover {
  background: #ff9aa2;
}

.btn:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-row .btn {
  flex: 1;
  margin-bottom: 0;
}

/* Big display (UV meter) */
.display {
  text-align: center;
  padding: 30px 15px;
}

.display .value {
  
  font-weight: bold;
  font-family: monospace;
}

.display .unit {
  color: #666;
}

.display .sub {
  margin-top: 15px;
  color: #666;
}

/* Progress bar */
.progress {
  background: #ddd;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  background: #90EE90;
  height: 100%;
  transition: width 0.3s;
}

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

th, td {
  padding: 6px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #f5f5f5;
  font-weight: bold;
}

td input {
  width: 50px;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
  text-align: center;
}

/* Messages */
.msg {
  padding: 8px 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.msg.success {
  background: #d4edda;
  color: #155724;
}

.msg.error {
  background: #f8d7da;
  color: #721c24;
}

.msg.info {
  background: #d1ecf1;
  color: #0c5460;
}

/* Footer */
.footer {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  text-align: center;
  color: #666;
}
