/* ============================================================
   ONE PIECE INDIA – Global Dark Mode
   Loaded last on every page. Overrides all inline styles.
   Logos are NOT touched (img tags are excluded).
   ============================================================ */

/* ── Page backgrounds ──────────────────────────────────────── */
html { background: #111318 !important; }

body {
  background: #111318 !important;
  color: #d8dce8 !important;
}

/* Login page has a gradient body — override to dark gradient */
body:has(.box),
body:has(.login-container) {
  background: linear-gradient(135deg, #1a1d2e 0%, #231529 100%) !important;
}

/* ── Surfaces / cards / panels ──────────────────────────────── */
.login-container, .box,
.controls, .header,
.table-container,
.back-nav,
.page-header,
.users-table,
.task-card,
.product-card,
.modal-box,
.container > .page-header,
.placeholder {
  background: #1c1f28 !important;
  color: #d8dce8 !important;
}

/* Slight elevation for nested cards */
.task-card, .product-card, .modal-box {
  box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}

/* ── Sidebar (already mostly dark — just tweak) ─────────────── */
.sidebar               { background: #13161e !important; }
.sidebar-header        { background: #0e1118 !important; border-bottom: 1px solid #252830 !important; }
.sidebar-header h3     { color: #e0e4f0 !important; }
.sidebar-header p      { color: #6b7185 !important; }
.sidebar-menu a        { color: #b0b5c8 !important; }
.sidebar-menu a:hover  { background: #1e2230 !important; color: #7eb8f7 !important; }
.sidebar-menu a.active { background: #1e2230 !important; border-left-color: #3498db !important; color: #7eb8f7 !important; }
.sidebar-footer        { background: #0e1118 !important; border-top-color: #252830 !important; }
.sidebar-footer .login-btn  { background: #2176ae !important; color: #fff !important; }
.sidebar-footer .login-btn:hover { background: #2980b9 !important; }
.sidebar-footer .logout-btn { background: #9b2335 !important; color: #fff !important; }
.sidebar-footer .logout-btn:hover { background: #c0392b !important; }
.user-info             { color: #7a7f94 !important; }
.menu-toggle           { background: #1c1f28 !important; }
.menu-toggle span      { background: #c0c4d0 !important; }
.menu-toggle:hover     { background: #252830 !important; }

/* ── Tables ─────────────────────────────────────────────────── */
table         { background: #1c1f28 !important; }
thead tr      { background: #13161e !important; }
th            { background: #13161e !important; color: #9fa5bc !important; border-bottom: 1px solid #252830 !important; }
td            { color: #c8ccd8 !important; border-bottom-color: #252830 !important; }
tr:last-child td { border-bottom: none !important; }
tr:hover td   { background: #21242f !important; }

/* Log table */
.log-table th,
.log-table td { color: #b0b5c8 !important; }

/* ── Inputs, selects, textareas ─────────────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  background: #21242f !important;
  color: #d8dce8 !important;
  border-color: #333748 !important;
}

input::placeholder,
textarea::placeholder { color: #555970 !important; }

input:focus:not([type="checkbox"]):not([type="radio"]),
select:focus,
textarea:focus {
  border-color: #3498db !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(52,152,219,0.2) !important;
}

/* Disc input in price list */
.disc-input {
  background: #21242f !important;
  color: #d8dce8 !important;
  border-color: #333748 !important;
}

/* ── Text ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { color: #e0e4f2 !important; }

.task-title             { color: #dde1f0 !important; }
.task-detail            { color: #8a8fa4 !important; }
.task-detail span       { color: #b8bccc !important; }
.task-detail b          { color: inherit !important; }  /* priority colour stays */

.header-center h2       { color: #e0e4f2 !important; }
.contact-line           { color: #7a7f94 !important; }
.contact-line span      { color: #7a7f94 !important; }
.breadcrumbs            { color: #7a7f94 !important; }
.breadcrumbs a          { color: #5b96d5 !important; }
.breadcrumbs span       { color: #7a7f94 !important; }
.back-nav               { color: #7a7f94 !important; }
.form-hint              { color: #555970 !important; }
.photo-hint             { color: #7a7f94 !important; }

/* ── Disclaimer bar ─────────────────────────────────────────── */
.disclaimer {
  background: #1e1900 !important;
  border-color: #3a3000 !important;
  color: #e0a020 !important;
}

/* ── Home page firm name / contact ──────────────────────────── */
.firm-name   { color: #e0e4f2 !important; }
.contact-info div { color: #9499b0 !important; }

/* ── Back button ─────────────────────────────────────────────── */
.back-btn {
  background: #1c1f28 !important;
  border-color: #333748 !important;
  color: #b0b5c8 !important;
}
.back-btn:hover {
  background: #21242f !important;
  border-color: #4a5070 !important;
}

/* ── Tab bars ────────────────────────────────────────────────── */
.tab-bar                  { border-bottom-color: #252830 !important; }
.tab-btn                  { color: #555970 !important; background: transparent !important; }
.tab-btn.active           { color: #5b96d5 !important; border-bottom-color: #3498db !important; }
.tab-count                { background: #252830 !important; color: #7a7f94 !important; }
.tab-btn.active .tab-count{ background: #3498db !important; color: #fff !important; }

/* ── Alert boxes ─────────────────────────────────────────────── */
.alert-success {
  background: #0b2018 !important;
  color: #56c97a !important;
  border-color: #164d30 !important;
}
.alert-error {
  background: #2a0d0e !important;
  color: #f07070 !important;
  border-color: #4d1515 !important;
}

/* Login page error/ban */
.err {
  background: #2a0d0e !important;
  color: #ff7070 !important;
}
.ban {
  background: #1a0000 !important;
  color: #ff6b6b !important;
  border-color: #cc0000 !important;
}

/* ── Modal overlay ───────────────────────────────────────────── */
.modal        { background: rgba(0,0,0,0.78) !important; }
.modal-box    { background: #1c1f28 !important; border: 1px solid #2e3348 !important; }
.modal-box h3 { color: #dde1f0 !important; }

/* Close button in modal */
.btn-close { background: #2a2d3a !important; color: #b0b5c8 !important; }
.btn-close:hover { background: #333748 !important; }

/* ── Price list specific ─────────────────────────────────────── */
.high-disc  { color: #ff8a80 !important; }   /* dark-safe red */
.low-disc   { color: #6ee09a !important; }   /* dark-safe green */

/* controls bar */
.controls   { background: #1c1f28 !important; }
#pageInfo   { color: #555970 !important; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge-active   { color: #56c97a !important; }
.badge-inactive { color: #f07070 !important; }

/* ── Users table page header ─────────────────────────────────── */
.page-header p { color: #7a7f94 !important; }

/* ── taskAssigner form container ────────────────────────────── */
.container {
  background: #1c1f28 !important;
  color: #d8dce8 !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.5) !important;
}

.container h1 {
  color: #9fadd4 !important;
  letter-spacing: .06em;
}

.form-group label {
  color: #8b92ab !important;
  font-size: 12px !important;
  letter-spacing: .05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #13161e !important;
  color: #d8dce8 !important;
  border: 1px solid #2e3348 !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 2px rgba(52,152,219,0.18) !important;
}

/* Quick-set deadline buttons — keep blue but darken slightly */
button[onclick^="setDeadline"] {
  background: #1f6fa8 !important;
  color: #e8f2fa !important;
  border: none !important;
  transition: background .2s !important;
}
button[onclick^="setDeadline"]:hover {
  background: #2980b9 !important;
}

/* Main submit button */
.container .btn {
  background: #2176ae !important;
  letter-spacing: .06em;
  font-size: 15px !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(33,118,174,0.35) !important;
}
.container .btn:hover {
  background: #2980b9 !important;
}

/* View all tasks link */
.container a[href="tasks.html"] {
  color: #5b96d5 !important;
}


.price-btn {
  background: #21242f !important;
  border-color: #333748 !important;
  color: #d8dce8 !important;
}
.price-btn:hover { background: #2a2d3a !important; }

/* ── Separate destructive buttons (cancel / reject) from positive ones ── */
.btn-cancel { margin-left: 18px !important; }
@media(max-width:768px) { .btn-cancel { margin-left: 10px !important; } }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar             { width: 7px; height: 7px; }
::-webkit-scrollbar-track       { background: #111318; }
::-webkit-scrollbar-thumb       { background: #2e3348; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #404560; }
* { scrollbar-color: #2e3348 #111318; }
