/* dark_mode.css */

/* Base Dark Mode */
body.dark-mode {
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #ffffff;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

/* Headers, Footers */
header, footer {
    background-color: #1f1f1f;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header h1 {
    margin: 0;
    color: #ffcc00;
}
.header-right nav a {
    color: #ccc;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s;
}
.header-right nav a:hover {
    color: #ffcc00;
}
footer p {
    margin: 0;
    color: #ccc;
}

main {
    padding: 20px;
}

/* Tabs */
.tabs {
    margin-bottom: 20px;
}
.tab-button {
    padding: 8px 16px;
    margin-right: 5px;
    cursor: pointer;
    background-color: #2c2c2c;
    color: #fff;
    border: none;
    outline: none;
    border-radius: 4px;
}
.tab-button.active {
    background-color: #ffcc00;
    color: #000;
}
.tab-content {
    display: none;
}

/* Admin Form Container */
.form-container {
    background-color: #1f1f1f;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 0 5px rgba(0,0,0,0.4);
    max-width: 600px; /* or as you prefer */
    margin-left: 0;   /* left-aligned for admin panel forms */
    margin-right: 0;
}
.form-container h4 {
    margin-top: 0;
}
.form-container label {
    display: block;
    margin: 8px 0 4px;
}
.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background-color: #333;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}
.form-container button {
    background-color: #ffcc00;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 4px;
}
.form-container button:hover {
    background-color: #cc9e00;
}

/* Login Container (centered) */
.login-container {
    background-color: #1f1f1f;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    max-width: 400px;
    margin: 80px auto; /* center */
}
.login-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
}
.login-container form label {
    display: block;
    margin: 8px 0 4px;
}
.login-container form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background-color: #333;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}
.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #ffcc00;
    border: none;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}
.login-container button:hover {
    background-color: #cc9e00;
}

/* Popup Messages */
.popup-message {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #333;
    padding: 10px 15px;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0.95;
    margin: 5px 0;
    color: #fff;
}
.popup-message.success {
    border-left: 4px solid #0f0;
}
.popup-message.error {
    border-left: 4px solid #f00;
}

/* Stats & Dashboard Layout (Flexbox) */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
.stat-box {
    background-color: #1f1f1f;
    flex: 1 1 150px;
    min-width: 150px;
    max-width: 220px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.stat-box h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #ffcc00;
}
.stat-box p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
    background-color: #1f1f1f;
}
table thead {
    background-color: #2c2c2c;
}
table thead th {
    padding: 10px;
    text-align: left;
}
table tbody tr:nth-child(even) {
    background-color: #2a2a2a;
}
table tbody td {
    padding: 10px;
    border-bottom: 1px solid #333;
}

/* Pagination */
.pagination {
    margin: 10px 0;
}
.pagination button {
    margin-right: 5px;
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.pagination button:hover {
    background-color: #555;
}

/* Date Filter Form */
.date-form {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.date-form label {
    margin-right: 5px;
}
.date-form input {
    background-color: #333;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    padding: 5px;
}
.date-form button {
    background-color: #ffcc00;
    border: none;
    color: #000;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.date-form button:hover {
    background-color: #cc9e00;
}

/* Stats Chooser (toggle) Buttons */
.stats-chooser {
    margin-bottom: 20px;
}
.stats-chooser button {
    padding: 8px 16px;
    margin-right: 5px;
    cursor: pointer;
    background-color: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 4px;
}
.stats-chooser button:hover {
    background-color: #444;
}

/* Profit Color Classes */
.negative-profit {
    color: red;
    font-weight: bold;
}
.positive-profit {
    color: #0f0;
    font-weight: bold;
}
.zero-profit {
    color: #fff; /* or #ccc if you want it more subdued */
    font-weight: bold;
}
/* Fancy toggle switch for registration */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input {
  opacity: 0; 
  width: 0; 
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #555;
  transition: .4s;
  border-radius: 26px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #ffcc00;
}
input:focus + .slider {
  box-shadow: 0 0 1px #ffcc00;
}
input:checked + .slider:before {
  transform: translateX(24px);
}
.slider.round { border-radius: 26px; }
.slider.round:before { border-radius: 50%; }
/* Two-column layout for the Site Settings tab */
.settings-two-col {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

/* Left side: toggles area */
.settings-left {
  background-color: #2c2c2c;
  width: 300px; /* fixed width, adjust as you like */
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
}
.settings-left h4 {
  margin-top: 0;
  color: #ffcc00;
}

/* Right side: normal form */
.settings-right {
  flex: 1; /* fill remaining space */
  background-color: #1f1f1f;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
}
.settings-right h4 {
  margin-top: 0;
  color: #ffcc00;
}

/* Each toggle row: label + fancy switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* label on left, switch on right */
  margin-bottom: 10px;
}
.toggle-row label {
  margin-right: 10px;
  color: #fff;
  font-weight: bold;
}

/* The fancy toggle switch snippet */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}
.switch input {
  opacity: 0; 
  width: 0; 
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #444;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #ffcc00;
}
input:focus + .slider {
  box-shadow: 0 0 1px #ffcc00;
}
input:checked + .slider:before {
  transform: translateX(24px);
}
.slider.round { 
  border-radius: 24px;
}
.slider.round:before {
  border-radius: 50%;
}

