/* ========================
   Global Styles
======================== */
body {
  background: url('../images/bg-dark.png') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

canvas {
  display: none;
}

/* ========================
   Login Page
======================== */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: -1;
}

.login-box {
  margin-top: 80px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.form-label {
  color: #ddd;
}

.btn-primary {
  background-color: #007bff;
  border: none;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.text-muted strong {
  color: #f0f0f0;
}

/* ========================
   Selfie Capture Page
======================== */
.frame-container {
  margin: 50px auto;
  width: 90%;
  max-width: 320px;
  height: 480px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2rem;
  position: relative;
  padding-top: 50px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.oval-frame {
  width: 220px;
  height: 320px;
  margin: 0 auto;
  border-radius: 50% / 40%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capture-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #1e2b50;
  cursor: pointer;
}

.caption {
  font-size: 1rem;
  color: #ddd;
  margin-top: 1.5rem;
}

/* ========================
   Loading Spinner
======================== */
#loading {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  display: none;
}

#loading .spinner-border {
  width: 4rem;
  height: 4rem;
  color: white;
}

/* ========================
   Dashboard / Tables
======================== */
.table td,
.table th {
  vertical-align: middle;
}

/* ========================
   Clock Display
======================== */
#indiaClock {
  font-size: 0.95rem;
  font-weight: 500;
  color: #6c757d;
}

/* ========================
   Responsive Design
======================== */
@media (max-width: 768px) {
  h1, h2, h3, h4 {
    font-size: 1.3rem;
  }

  .btn-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .frame-container {
    height: auto;
  }

  .capture-btn {
    width: 60px;
    height: 60px;
  }
}


/* ========================
   Transaction Type Badge
======================== */
.type-badge {
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.type-badge.income {
  background-color: #198754;
  color: #fff;
}

.type-badge.expense {
  background-color: #dc3545;
  color: #fff;
}

/* ========================
   Modal Overrides (Dark Theme)
======================== */
.modal-content.bg-black {
  background-color: #000 !important;
  color: #fff;
  border: 2px solid #444;
}

.modal-content .btn {
  padding: 10px 18px;
  font-size: 1.1rem;
}

/* ========================
   Dashboard Buttons + Icons
======================== */
.btn-group .btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.btn-group .btn i {
  font-size: 1rem;
}

@media (max-width: 600px) {
  .btn-group {
    flex-direction: column;
    gap: 10px;
  }

  .type-badge {
    font-size: 0.9rem;
    padding: 5px 10px;
  }
}
