/* ============================
   ELEGANT GLASS THEME
   BASE + ENHANCEMENTS
============================ */

/* Global Styles */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to right, #f4f6f8, #e0eafc);
  margin: 0;
  padding: 20px;
  color: #2c2c2c;
}

.container {
  max-width: 1200px;
  margin: auto;
  background: rgba(255, 255, 255, 0.85);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  backdrop-filter: blur(8px);
}

.logo-container {
  text-align: center;
  margin-bottom: 20px;
}

.logo-container img,
.logo-section img {
  width: 280px;
  height: auto;
  object-fit: contain;
  image-rendering: crisp-edges;
  margin: 0 auto 20px;
  display: block;

}

/* Headings */
h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c2c2c;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Form Elements */
form fieldset {
  border: 1px solid #ccc;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.6);
}

legend {
  font-weight: bold;
  padding: 0 10px;
  color: #0078D4;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #444;
}

input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Buttons */
button {
  background: linear-gradient(to right, #0078D4, #005ea2);
  color: white;
  padding: 14px 30px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

button:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Login Page */
body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 0;
  background: linear-gradient(to right, #f4f6f8, #e0eafc);
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.85);
  padding: 20px 32px 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  text-align: center;
  width: 380px;
}

.logo-section h1 {
  margin: 0;
  font-size: 26px;
  color: #0078D4;
}

.logo-section p {
  margin: 5px 0 25px;
  font-size: 15px;
  color: #555;
  font-style: italic;
}

.login-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-box input {
  padding: 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width:180px;
  margin: 0 auto;
  display: block;
}

.login-box button {
  width: 180px;
  margin: 0 auto;
  display: block;
  padding: 10px;
  font-size: 14px;
  background: linear-gradient(to right, #0078D4, #005ea2);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.login-box button:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================
   Diagnosis & Activities Layout
============================ */
.diagnosis-entry,
.activity-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: rgba(255,255,255,0.6);
}

.diagnosis-fields,
.activity-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  flex: 1;
}

.diagnosis-actions,
.activity-actions {
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.button-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

/* ============================
   Diagnosis Section Styling
============================ */
.diagnosis-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.diagnosis-group {
  display: flex;
  flex-direction: column;
}

.diagnosis-label {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  color: #444;
}

.diagnosis-select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.add-secondary-btn {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 14px;
  background: linear-gradient(to right, #0078D4, #005ea2);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.add-secondary-btn:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================
   Activities Section Styling
============================ */
.activity-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.activity-group {
  display: flex;
  flex-direction: column;
}

.activity-group label {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  color: #444;
}

.activity-group select,
.activity-group input {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Compact input for short numbers */
.short-input {
  width: 120px;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.short-input:focus {
  border-color: #0078D4;
  box-shadow: 0 0 0 3px rgba(0,120,212,0.1);
}

/* Inline hint */
.inline-hint {
  font-size: 13px;
  color: #0078D4;
  margin-top: 4px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Warning state */
.activity-group.warning {
  background-color: #fff7e6;
  border-left: 4px solid #ffb020;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.activity-group.warning.pulse {
  animation: pulse-highlight 1200ms ease-in-out 1;
}

@keyframes pulse-highlight {
  0%   { box-shadow: 0 0 0 0 rgba(255,176,32,0.12); }
  50%  { box-shadow: 0 8px 24px -8px rgba(255,176,32,0.12); }
  100% { box-shadow: 0 0 0 0 rgba(255,176,32,0); }
}

/* Spinner removal */
.no-spinner::-webkit-inner-spin-button,
.no-spinner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spinner {
  -moz-appearance: textfield;
}

input[name="net_amount[]"]::-webkit-inner-spin-button,
input[name="net_amount[]"]::-webkit-outer-spin-button,
input[name="net_payment[]"]::-webkit-inner-spin-button,
input[name="net_payment[]"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[name="net_amount[]"],
input[name="net_payment[]"] {
  -moz-appearance: textfield;
}

/* ============================
   Error & Feedback Messages
============================ */
.error-message {
  background-color: #ffe6e6;
  color: #d8000c;
  border-left: 4px solid #d8000c;
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  animation: fadeIn 0.3s ease-in;
}

.error-message.db-error {
  background-color: #fff0f0;
  border-left-color: #b00020;
  font-weight: 500;
}

/* ============================
   Utilities
============================ */
.button-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.submit-container {
  text-align: center;
  margin-top: 30px;
}

small.hint {
  color: #666;
  font-size: 12px;
}

/* ============================
   Table Styles
============================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background-color: rgba(255,255,255,0.6);
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eaeaea;
}



.financial-summary {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  background-color: rgba(255,255,255,0.75);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.financial-summary th {
  background-color: #e0eafc;
  color: #2c2c2c;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
}

.financial-summary td {
  padding: 12px 16px;
  border-top: 1px solid #eaeaea;
  text-align: right;
  color: #444;
}

.financial-summary tr:nth-child(even) {
  background-color: #f9fbff;
}

.financial-summary tr:hover {
  background-color: #eef4ff;
}

.financial-summary tfoot td,
.financial-summary .total-row td {
  font-weight: bold;
  background-color: #dbe9ff;
}
/* ============================
   Accessibility Focus Outlines
============================ */
button:focus,
a:focus,
input:focus,
select:focus {
  outline: 3px solid rgba(0,120,212,0.12);
  outline-offset: 2px;
}

/* ============================
   Responsive Tweaks
============================ */
@media (max-width:520px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 18px;
    margin: 12px;
  }
}

/* Clinician dropdown styling to match Principal Diagnosis */
.clinician-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto;
  width: 100%;
  max-width: 400px;
}

.clinician-label {
  font-weight: bold;
  margin-bottom: 8px;
  text-align: center;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.clinician-select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
.document-upload-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.document-upload-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.document-upload-label {
  font-weight: bold;
  margin-bottom: 8px;
  text-align: center;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.document-upload-input {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
/* Setup page dropdown styling to match Clinician */
.setup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.setup-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.setup-label {
  font-weight: bold;
  margin-bottom: 8px;
  text-align: center;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.setup-select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
/* Custom Button Colors */
.btn-red {
  background-color: #d9534f !important;
}

.btn-blue {
  background-color: #0275d8 !important;
}

.btn-green {
  background-color: #5cb85c !important;
}
#claimsTable {
  width: 100%;
  border-collapse: collapse;
}

#claimsTable th,
#claimsTable td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

#claimsTable th {
  background-color: #f4f4f4;
  font-weight: bold;
}
@media (max-width: 520px) {
  .logo-container img,
  .logo-section img {
    width: 80vw;
    height: auto;
  }
}
/* Force logo size on setup page */
body.setup-page .logo-section img {
  width: 380px !important;
  height: auto !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 auto 20px !important;
  object-fit: contain !important;
  image-rendering: crisp-edges !important;
}
