* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f5f9;
}

/* NAVBAR */
.navbar {
  background: linear-gradient(135deg, #3a8fb8 0%, #2c6f96 100%);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  transition: background 0.3s;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.container-form {
  max-width: 700px;
  margin: 30px auto;
  padding: 0 20px;
}

/* BREADCRUMB */
.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #3a8fb8;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* CARDS */
.form-card,
.card,
.recent-section {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card {
  padding: 20px;
}

h2 {
  color: #2c5f7f;
  margin-bottom: 25px;
  font-size: 1.5rem;
  font-weight: 600;
}

h3 {
  color: #2c5f7f;
  font-size: 1.2rem;
  font-weight: 600;
}

/* ALERTS */
.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease-out;
}

.alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border-left: 4px solid #4caf50;
}

.alert-error {
  background: #fce4ec;
  color: #880e4f;
  border-left: 4px solid #c2185b;
}

.alert-info {
  background: #e8f4f8;
  color: #1a5f7a;
  border-left: 4px solid #3a8fb8;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FORMS */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #2c5f7f;
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"],
input[type="date"],
input[type="file"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #d1e7f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3a8fb8;
  box-shadow: 0 0 0 3px rgba(58, 143, 184, 0.1);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

small {
  color: #7a9fb5;
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
}

.required {
  color: #c2185b;
}

/* BUTTONS */
.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #3a8fb8 0%, #2c6f96 100%);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(58, 143, 184, 0.3);
}

.btn-secondary {
  background: #e0e8f0;
  color: #2c5f7f;
  flex: 1;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.btn-add {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  padding: 10px 20px;
}

.btn-add:hover {
  transform: translateY(-2px);
}

.btn-action {
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s;
  display: inline-block;
}

.btn-edit {
  background: #3a8fb8;
  color: white;
}

.btn-delete {
  background: #c2185b;
  color: white;
}

.btn-action:hover {
  transform: translateY(-1px);
}

/* HEADER SECTION */
.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

/* SEARCH */
.search-section {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input {
  flex: 1;
  padding: 10px;
  border: 2px solid #d1e7f0;
  border-radius: 8px;
  font-size: 1rem;
}

.search-form input:focus {
  outline: none;
  border-color: #3a8fb8;
}

.search-form button {
  padding: 10px 25px;
  background: linear-gradient(135deg, #3a8fb8 0%, #2c6f96 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s;
}

.search-form button:hover {
  transform: translateY(-2px);
}

/* TABLES */
.table-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background: #f0f5f9;
  padding: 15px;
  text-align: left;
  color: #2c5f7f;
  font-weight: 600;
  border-bottom: 2px solid #d1e7f0;
}

table td {
  padding: 15px;
  border-bottom: 1px solid #e8eef5;
}

table tr:hover {
  background: #f9fbfd;
}

.action-links {
  display: flex;
  gap: 10px;
}

/* STATUS BADGES */
.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-valid {
  background: #e8f5e9;
  color: #1b5e20;
}

.status-expired {
  background: #fff3e0;
  color: #e65100;
}

.status-invalid {
  background: #fce4ec;
  color: #880e4f;
}

/* NO DATA */
.no-data {
  text-align: center;
  padding: 40px;
  color: #7a9fb5;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  padding: 20px;
  background: white;
  border-radius: 10px;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid #d1e7f0;
  border-radius: 5px;
  text-decoration: none;
  color: #3a8fb8;
  transition: all 0.3s;
}

.pagination a:hover {
  background: #3a8fb8;
  color: white;
}

.pagination .active {
  background: #3a8fb8;
  color: white;
  border-color: #3a8fb8;
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  color: #2c5f7f;
  margin-bottom: 20px;
}

.modal-content img {
  max-width: 100%;
  margin-bottom: 20px;
  border-radius: 8px;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: #000;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* INFO BOX */
.info-box {
  background: #e8f4f8;
  color: #1a5f7a;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  border-left: 4px solid #3a8fb8;
  line-height: 1.6;
}

/* WELCOME BOX */
.welcome {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.welcome h2 {
  color: #2c5f7f;
  margin-bottom: 10px;
}

.welcome p {
  color: #4a7c99;
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
  border-top: 4px solid #3a8fb8;
}

.stat-card h3 {
  color: #3a8fb8;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.stat-card p {
  color: #4a7c99;
  font-weight: 600;
}

/* LOGIN PAGE */
.login-container {
  background: white;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  margin: 15vh auto;
}

.login-container h1 {
  text-align: center;
  color: #2c5f7f;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.subtitle {
  text-align: center;
  color: #7a9fb5;
  margin-bottom: 30px;
  font-size: 0.9rem;
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #3a8fb8 0%, #2c6f96 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
}

.footer-link {
  text-align: center;
  margin-top: 20px;
}

.footer-link a {
  color: #3a8fb8;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-link a:hover {
  text-decoration: underline;
}

/* ACTION BUTTONS */
.action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.action-buttons .btn {
  padding: 12px 25px;
  background: linear-gradient(135deg, #3a8fb8 0%, #2c6f96 100%);
  color: white;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s;
  display: inline-block;
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
}

/* RECENT SECTION */
.recent-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.recent-section h3 {
  color: #2c5f7f;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .header-section {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .btn-group {
    flex-direction: column;
  }

  table {
    font-size: 0.9rem;
  }

  table th,
  table td {
    padding: 10px;
  }

  .action-links {
    flex-direction: column;
    gap: 5px;
  }

  .search-form {
    flex-direction: column;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 15px 20px;
  }

  .navbar h1 {
    font-size: 1.3rem;
  }

  .container,
  .container-form {
    padding: 0 10px;
    margin: 20px auto;
  }

  .form-card,
  .card,
  .recent-section {
    padding: 20px;
  }

  h2 {
    font-size: 1.3rem;
  }

  table {
    font-size: 0.8rem;
  }

  table th,
  table td {
    padding: 8px;
  }

  .login-container {
    padding: 30px 20px;
    margin: 20vh auto;
  }

  .action-buttons {
    flex-direction: column;
  }
}
