/* Reset + basic styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 10px;
  background: #f9f9f9;
  color: #333;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 15px;
}

header h1 {
  font-size: 1.8rem;
  color: #0077cc;
  margin-bottom: 5px;
}

header p {
  font-size: 1rem;
  color: #555;
}

/* Main layout */
main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Panels */
.left-panel, .middle-panel, .right-panel {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.left-panel:hover, .middle-panel:hover, .right-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.left-panel {
  flex: 1 1 260px;
  max-width: 300px;
}

.middle-panel {
  flex: 2 1 450px;
  overflow-x: auto;
}

.right-panel {
  flex: 1 1 260px;
  max-width: 300px;
}

/* Panel headings */
.left-panel h2, .middle-panel h2, .right-panel h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #0077cc;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

/* Form */
form label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.95rem;
}

form input {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

form input:focus {
  border-color: #0077cc;
  box-shadow: 0 0 5px rgba(0,119,204,0.3);
  outline: none;
}

form button {
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  background-color: #0077cc;
  color: #fff;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s;
}

form button:hover {
  background-color: #005fa3;
  transform: translateY(-1px);
}

/* Import/export */
.import-export {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 15px;
}

.import-export input[type="file"] {
  border: none;
}

.import-export button {
  background-color: #00a86b;
  color: #fff;
  border-radius: 6px;
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.import-export button:hover {
  background-color: #008f55;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

th, td {
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  text-align: left;
  transition: background-color 0.2s;
}

th {
  background: #f0f4f8;
  cursor: pointer;
}

tbody tr:hover {
  background-color: #f0f8ff;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

tr.added {
  animation: fadeIn 0.3s;
}

tr.removed {
  animation: fadeOut 0.3s forwards;
}

th span {
  cursor: help;
  font-weight: normal;
  color: #555;
}

/* Buttons in table */
table button {
  padding: 4px 8px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.2s;
}

table button.edit {
  background-color: #ffa500;
  color: #fff;
}

table button.edit:hover {
  background-color: #e59400;
}

table button.delete {
  background-color: #d9534f;
  color: #fff;
}

table button.delete:hover {
  background-color: #c9302c;
}

/* Summary panel */
#summary p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

#summary span {
  font-weight: bold;
  color: #0077cc;
}

/* Chart */
#snr-chart {
  margin-top: 15px;
  border-radius: 8px;
  background: #f9f9f9;
  padding: 5px;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  opacity: 0.9;
  transition: opacity 0.3s, transform 0.2s;
}

#toast.hidden {
  display: none;
}

#toast.show {
  transform: translateY(-10px);
}

/* Daily Logger Panel */
.daily-logger {
  background: #f0f8ff;
  padding: 12px 10px;
  margin-top: 20px;
  border-radius: 8px;
  border: 1px solid #d0e6f7;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.daily-logger h3 {
  font-size: 1rem;
  color: #0077cc;
  margin-bottom: 10px;
  border-bottom: 1px solid #cce4f6;
  padding-bottom: 4px;
}

.daily-logger button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  font-weight: bold;
  color: #fff;
  background: #0077cc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.daily-logger button:hover {
  background: #005fa3;
  transform: translateY(-1px);
}

.daily-logger button:active {
  transform: translateY(1px);
}

.daily-logger p {
  font-size: 0.8rem;
  color: #555;
  margin-top: 5px;
  line-height: 1.2;
}


/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; height: auto; }
  to { opacity: 0; height: 0; padding:0; margin:0; }
}

/* Responsive */
@media (max-width: 900px) {
  main {
    flex-direction: column;
  }
  .middle-panel {
    max-width: 100%;
    overflow-x: auto;
  }
}
