/* GLOBAL */
body, html {
  background-color: #0d1117;
  color: #c9d1d9;
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
}

/* LOGIN PAGE CENTER BOX */
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100vh;
  padding-top: 15vh; /* Start box lower in viewport */
}

.login-box {
  background-color: #161b22;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  width: 90%;
  max-width: 480px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.login-box input[type="email"],
.login-box input[type="password"] {
  background-color: #161b22;
  color: #c9d1d9;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 10px;
  width: 100%;
  font-size: 1rem;
  margin-bottom: 16px;
}

.login-box button {
  background-color: #003366;
  color: #c9d1d9;
  border: 1px solid #003366;
  border-radius: 4px;
  padding: 12px;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
}
.login-box button:hover {
  background-color: #0055aa;
  border-color: #0055aa;
}

/* Error Message */
.login-error {
  color: #ff6b6b;
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
}

/* Footer */
.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #c9d1d9;
}

/* --- DASH ELEMENTS BELOW --- */

/* TABS */
.tab {
  background-color: #161b22 !important;
  color: #c9d1d9 !important;
  border: none !important;
}
.tab--selected {
  background-color: #1f2937 !important;
  color: #c9d1d9 !important;
  font-weight: bold;
}

/* HEADERS */
h1, h2, h3, h4 {
  color: #c9d1d9;
  margin: 1em 0 0.5em;
  font-weight: 600;
}

/* Dash DataTable */
.dash-table-container {
  overflow-x: auto;
}
.dash-cell {
  background-color: #161b22 !important;
  color: #c9d1d9 !important;
  border: 1px solid #2f3541 !important;
}
.dash-header {
  background-color: #21262d !important;
  color: #c9d1d9 !important;
  font-weight: 600;
  border: 1px solid #2f3541 !important;
}
.dash-row:hover .dash-cell {
  background-color: #2d333b !important;
}

/* INPUTS & DROPDOWNS */
input, .dash-input, .Select-control {
  background-color: #161b22 !important;
  color: #c9d1d9 !important;
  border: 1px solid #30363d !important;
  border-radius: 4px;
}
input::placeholder, .Select-placeholder {
  color: #6e7681 !important;
}

/* BUTTONS */
button, .btn {
  background-color: #003366 !important;
  color: #c9d1d9 !important;
  border: 1px solid #003366 !important;
  border-radius: 4px;
  padding: 10px 16px;
}
button:hover, .btn:hover {
  background-color: #0055aa !important;
  border-color: #0055aa !important;
}

/* LINKS */
a {
  color: #58a6ff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* FOOTER */
footer {
  background-color: #161b22;
  color: #c9d1d9;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}

/* Layout fixes */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

#tab-content {
  margin-top: 4rem;
  margin-bottom: 3rem;
  height: calc(100vh - 7rem);
  overflow-y: auto;
  padding: 1rem 2.5%;
}

.dash-table-container .dash-pagination {
  position: sticky;
  bottom: 0;
  background: #161b22;
  z-index: 500;
}
/* Force full dark background on all devices */
body, html {
  background-color: #0d1117;
  color: #c9d1d9;
  height: 100%;
}

/* Fix title color inside login box */
.login-box h2 {
  color: #c9d1d9;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 24px;
}

/* Ensure labels are visible */
.login-box label {
  color: #c9d1d9;
  font-size: 1.1rem;
  margin-bottom: 4px;
  display: block;
}

/* Improve input and button sizing */
.login-box input[type="email"],
.login-box input[type="password"],
.login-box button {
  font-size: 1.2rem;
  padding: 14px;
  margin-bottom: 20px;
}

/* Mobile specific improvements */
@media screen and (max-width: 600px) {
  .login-box {
    width: 95%;
    padding: 40px 20px;
    min-height: 400px;
  }

  .login-box h2 {
    font-size: 2.4rem;
  }

  .login-box input,
  .login-box button {
    font-size: 1.3rem;
    padding: 16px;
  }
}
/* Style the "Facturé" markdown link as a button */
a[href^="facture:"] {
    background-color: #2ea44f;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s ease-in-out;
}

a[href^="facture:"]:hover {
    background-color: #218739;
}

