*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f9fafb;
  color: #111827;
}

#app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 5vw 1.25rem;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fef2f2;
}

.brand h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
}

.brand p {
  margin: 0;
  max-width: 32rem;
  font-size: 0.9rem;
  opacity: 0.95;
}

.hero {
  flex: 0 0 auto;
  margin-top: 1rem;
}

.hero img {
  width: 260px;
  max-width: 100%;
  border-radius: 1.25rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(254, 242, 242, 0.8);
  object-fit: cover;
}

.app-main {
  flex: 1;
  padding: 1.75rem 5vw 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  padding: 1.5rem 1.75rem;
}

.auth-card {
  max-width: 920px;
  margin: 0 auto;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.tab-button {
  border: none;
  background: transparent;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 999px 999px 0 0;
  color: #6b7280;
  position: relative;
}

.tab-button.active {
  color: #b91c1c;
  font-weight: 600;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.tab-panels {
  padding-top: 0.5rem;
}

.tab-panel {
  animation: fadeIn 0.18s ease-out;
}

.tab-panel.hidden {
  display: none;
}

h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

form {
  margin-top: 0.5rem;
}

.form-row {
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #374151;
}

.form-row input,
.form-row select {
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.form-row.two-col {
  flex-direction: row;
  gap: 0.9rem;
}

.form-row.two-col > div {
  flex: 1 1 0;
}

.radio-group {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.25rem;
}

.radio-group input {
  margin-right: 0.35rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  height: 100%;
}

.checkbox-row input {
  margin-right: 0.35rem;
}

button {
  padding: 0.55rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fef2f2;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(248, 113, 113, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 20px rgba(248, 113, 113, 0.55);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(248, 113, 113, 0.4);
}

button.secondary {
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
}

button.secondary:hover {
  filter: none;
  background: #e5e7eb;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.inline-actions {
  flex-direction: row;
  justify-content: flex-start;
}

.otp-display {
  margin: 0.6rem 0 0.9rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  background-color: #fef2f2;
  border: 1px dashed #f97373;
  color: #7f1d1d;
  font-size: 0.85rem;
}

.otp-display p {
  margin: 0 0 0.25rem;
}

.otp-display span#otp-code {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.otp-display small {
  font-size: 0.75rem;
  opacity: 0.9;
}

.dashboard {
  max-width: 1120px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.summary-item {
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
}

.summary-item .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.summary-item .value {
  font-size: 0.9rem;
  font-weight: 600;
}

.spaced-top {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed #e5e7eb;
}

.filters {
  margin-bottom: 1rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead {
  background-color: #f3f4f6;
}

th,
td {
  padding: 0.55rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

tbody tr:hover {
  background-color: #fee2e2;
}

td.actions {
  white-space: nowrap;
}

.action-btn {
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  margin-right: 0.25rem;
}

.action-btn.edit {
  background: #fef3c7;
  color: #92400e;
}

.action-btn.delete {
  background: #fee2e2;
  color: #991b1b;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background-color: #111827;
  color: #f9fafb;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 0.98;
  transform: translate(-50%, -4px);
}

.toast.error {
  background-color: #b91c1c;
}

.toast.success {
  background-color: #15803d;
}

.toast.hidden {
  display: none;
}

.app-footer {
  padding: 1rem 5vw 1.25rem;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.app-footer a {
  color: #b91c1c;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 1.25rem 1.25rem 1rem;
  }

  .app-main {
    padding: 1.25rem 1.25rem 2rem;
  }

  .card {
    padding: 1.25rem 1.25rem;
  }

  .form-row.two-col {
    flex-direction: column;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6fb;
  color: #1f2933;
}

.app-header {
  background: #1f3b70;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.app-header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.nav-links a,
.link-btn {
  margin-left: 1rem;
  color: #e5ecff;
  text-decoration: none;
  font-size: 0.95rem;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-links a:hover,
.link-btn:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.card h2 {
  margin-top: 0;
}

.card.narrow {
  max-width: 420px;
  margin: 2rem auto;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  font-weight: 500;
  font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cbd2e1;
  font-size: 0.95rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
}

.btn.primary {
  background: #2563eb;
  color: #fff;
}

.btn.primary:hover {
  background: #1d4ed8;
}

.btn.primary.danger-btn,
.danger-btn.btn {
  background: #dc2626;
}

.btn.primary.danger-btn:hover,
.danger-btn.btn:hover {
  background: #b91c1c;
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn.secondary:hover {
  background: #d1d5db;
}

.actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.app-footer {
  text-align: center;
  padding: 1rem;
  color: #6b7280;
  font-size: 0.85rem;
}

.message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.message.error {
  color: #b91c1c;
}

.message.success {
  color: #15803d;
}

.info-text {
  font-size: 0.9rem;
  color: #4b5563;
}

.info-text.small {
  font-size: 0.8rem;
}

.otp-section.hidden,
.hidden {
  display: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.2rem;
}

.checkbox-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding-top: 0.5rem;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1.2rem;
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: #1f3b70;
  color: #fff;
}

th,
td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

tbody tr:nth-child(even) {
  background: #f9fafb;
}

tbody tr:hover {
  background: #e5ecff;
}

@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links a,
  .link-btn {
    margin-left: 0;
    margin-right: 0.75rem;
  }
}
.auth-card {
  position: relative;
  overflow: hidden;
}

.auth-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;   /* 👈 50% appearance */
  z-index: 0;
}

/* content mela varanum */
.auth-card > * {
  position: relative;
  z-index: 1;
}


