/* assets/style.css */

/* Root variables */
:root {
  --bg: #121212;
  --primary: #1f1f1f;
  --secondary: #1a1a1a;
  --accent: #bb86fc;
  --accent-hover: #9a65d1;
  --text-light: #e0e0e0;
  --text-muted: #888;
  --border-color: #2e2e2e;
}

/* Global reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--text-light);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.5;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color .3s;
}
a:hover {
  color: var(--accent-hover);
}

/* Header */
header {
  background: var(--primary);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
nav li a {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background .3s, color .3s;
}
nav li a:hover {
  background: var(--secondary);
  color: var(--accent);
}

/* Container */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Panels */
.panel {
  background: var(--primary);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.panel h2 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.5rem;
}

/* Form Elements */
form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}
form input[type="text"],
form input[type="email"],
form input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--secondary);
  color: var(--text-light);
  transition: border .2s;
}
form input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Buttons */
button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background .3s, transform .1s;
}
button:hover:not(:disabled) {
  background: var(--accent-hover);
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
button:disabled,
button[disabled] {
  background: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  transition: none;
}

/* Delete button variation */
button.delBtn {
  background: #cf6679;
  color: #fff;
}
button.delBtn:hover:not(:disabled) {
  background: #b94b64;
}

/* Notification Messages */
.error, .success {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.error {
  background: #b00020;
  color: #fff;
}
.success {
  background: #03dac6;
  color: #000;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}
thead {
  background: var(--secondary);
}
thead th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 500;
  color: var(--text-light);
}
tbody tr {
  border-bottom: 1px solid var(--border-color);
}
tbody td {
  padding: 0.75rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 600px) {
  nav ul { flex-direction: column; }
  .logo-text { display: none; }
}

/* Make table container scrollable */
.table-responsive {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for table container */
.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 3px;
}

/* Compact padding for table cells */
thead th, tbody td {
  padding: 0.5rem;
}

/* Hide less important columns on narrow screens */
@media (max-width: 700px) {
  /* Hide Description and Date columns */
  .table-responsive th:nth-child(2),
  .table-responsive td:nth-child(2),
  .table-responsive th:nth-child(4),
  .table-responsive td:nth-child(4) {
    display: none;
  }
}
