@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --font-family: 'Inter', Arial, sans-serif;
  --primary: #4a4a8c;
  --primary-hover: #363679;
  --secondary: #6c757d;
  --secondary-hover: #5a6268;
  --success: #28a745;
  --error: #dc3545;
  --bg: #f4f4f9;
  --surface: #ffffff;
  --text: #333;
  --radius: 0.75rem;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

h1,
h2 {
  text-align: center;
  color: var(--primary);
  margin: 0 0 1rem 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  width: 100%;
}

input[autocomplete="off"],
input[autocomplete="new-password"] {
  background-color: #f9f9f9;
}

textarea {
  resize: vertical;
}

button,
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.15s ease;
}

button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary,
button[type="submit"] {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover,
button[type="submit"]:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-danger {
  background-color: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background-color: #c82333;
}

.admin-link,
.logout-link {
  align-self: flex-end;
}

.admin-link a,
.logout-link a {
  text-decoration: none;
}

.admin-link,
.logout-link,
#balance {
  margin-top: 0.5rem;
}

#balance {
  font-weight: 600;
  color: var(--success);
}

/* Table styling */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e1e1e8;
}

th {
  background-color: #f0f0f5;
  font-weight: 600;
}

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

tr:hover {
  background-color: #eef1ff;
}

/* Loader overlay */

.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.loader-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-overlay p {
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* Media queries */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}


/* #badge */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: .5rem;
  background: #eee;
  font-size: 12px
}

.badge-success {
  background: #03911b;
  color: #fff
}

.badge-warning {
  background: #ffcc80;
  color: #2f4858
}

/* #end */

