/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
  color: #333;
  margin-bottom: 0.5rem;
}

header p {
  color: #666;
  font-size: 1.1rem;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.card h2 {
  color: #444;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

table th,
table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

table tr:hover {
  background: #f8f9fa;
}

/* Buttons */
.btn,
.btn-small {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn:hover,
.btn-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select,
button {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #667eea;
}

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

/* Operation Badges */
.op-insert {
  background: #10b981;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
}
.op-update {
  background: #f59e0b;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
}
.op-delete {
  background: #ef4444;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
}

/* History Viewer */
.history-record {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border-left: 4px solid #667eea;
}

.history-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.change-table {
  background: white;
  margin: 10px 0;
}

.old-value {
  color: #ef4444;
  text-decoration: line-through;
}

.new-value {
  color: #10b981;
  font-weight: bold;
}

/* Footer */
footer {
  text-align: center;
  color: white;
  padding: 2rem;
  opacity: 0.9;
}

.success {
  background: #d1fae5;
  color: #065f46;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
}

.back-btn {
  display: inline-block;
  margin-top: 1rem;
  color: #667eea;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}
