:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

  --color-bg: #f1f5f9;
  --color-primary: #3a6ea5;
  --color-secondary: #7ab8cc;
  --color-dark: #2d3e50;
  --color-light: #ffffff;
  --color-muted: #76899d;
  --color-border: #d0d7e2;

  --radius: 6px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --transition: all 0.2s ease;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(to bottom right, #dae6e6, #e1e5ef);
    background-attachment: fixed;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}


/* Navbar */
.navbar {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  box-shadow: var(--shadow);
}

.navbar a {
  color: white;
  margin: 0 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.navbar a:hover {
  opacity: 0.85;
}

/* Headings */
h1, h2 {
  margin: 2rem 0 1rem;
  text-align: center;
  color: var(--color-dark);
}

/* Search Bar */
.search-bar {
  max-width: 600px;
  margin: 0 auto 2rem;
  background: white;
  padding: 0.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 999px;
}

.search-bar button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background: var(--color-secondary);
}

/* Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #f2f8fd;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
}

thead {
  background: linear-gradient(to right, #3a6ea5, #3a6ea5);
  color: white !important;
}

thead tr {
  background: inherit;
}

thead th {
  background: transparent !important;
  color: white !important;
  font-weight: 700;
  padding: 1.2rem 1rem;
  font-size: 1rem;
  text-align: left;
}

thead th:first-child {
  border-top-left-radius: 6px;
}
thead th:last-child {
  border-top-right-radius: 6px;
}

tbody tr {
  border-bottom: 1px solid #d8e6f0;
  transition: background-color 0.2s ease;
}

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

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

td {
  padding: 1rem;
  color: #2d3e50;
  vertical-align: middle;
}

/* Buttons */
button,
.btn {
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: white;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Login */
.btn-login {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
}
.btn-login:hover {
  opacity: 0.5;
}

/* Search */
.btn-search {
  background-color: #7ab8cc;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
}
.btn-search:hover {
  background-color: #67a4b7;
}

/* Edit */
.btn-edit {
  background-color: #3a6ea5;
}
.btn-edit:hover {
  background-color: #345e8b;
  transform: translateY(-1px);
}

/* Delete */
.btn-del {
  background-color: #e06666;
}
.btn-del:hover {
  background-color: #c95050;
  transform: translateY(-1px);
}

/* Footer */
.footer {
  background: #eef3f7;
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Utility */
.text-center { text-align: center; }
.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-bar input,
  .search-bar button {
    width: 100%;
    border-radius: var(--radius);
  }

  table {
    font-size: 0.9rem;
  }
}

/* Dropdown menu fixes */
.dropdown-menu {
  margin-top: 0.5rem !important;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.dropdown-menu a,
.dropdown-menu li,
.dropdown-item {
  color: #2d3e50 !important;
  background-color: white !important;
}

.dropdown-menu a:hover,
.dropdown-item:hover {
  background-color: #f0f4f8;
  color: #3a6ea5 !important;
}

.dropdown-toggle::after {
  vertical-align: middle;
  margin-left: 0.5rem;
  border-top-color: white;
}

/* Search and Clear Button Fix */
input[type="submit"], button[type="submit"], .search-button {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow);
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.search-button:hover {
  background-color: var(--color-secondary);
  color: white;
}
