:root {
  /* ===== Brand Colors ===== */
  --color-primary: #2e3092;          /* Main brand color (buttons, headings) */
  --color-primary-light: #4547b3;    /* Hover / highlight variant */
  --color-primary-dark: #1d1e66;     /* Darker version for contrast */

  /* ===== Backgrounds ===== */
  --color-bg-main: #ffffff;          /* Overall app background */
  --color-bg-surface: #f4f4f4;       /* Forms, cards, input sections */
  --color-bg-light: #eeeeee;         /* Panels or modals */

  /* ===== Text ===== */
  --color-text-main: #0a0a0a;        /* On dark backgrounds */
  --color-text-dark: #fff;        /* On light backgrounds */
  --color-text-muted: #999797;       /* Subtle or secondary text */

  /* ===== Feedback / Accent Colors ===== */
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
}

::placeholder {
  color: #2e3092;         
  opacity: 1;             
  font-style: italic;      
  font-size: 15px;         
}
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-image: url("/app/assets/images/loginBackground.png");
  font-size: 15px;
   }

a { color: inherit; }
small { line-height: 1.3; }

h2 {color: #2e3092;
    margin-left:20px;
}
 .muted{opacity:.6;}
/* ---------- Header ---------- */
.header-container {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #2e3092;
  color:#2e3092;
}

.header-left a { color: #2e3092; }

.header-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

.module-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.module-link {
  color: #2e3092;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
}

.module-link:hover {
  background: #2e3092;
  color: #fff;
}

.active-module {
  background: #2e3092;
  color: #fff;
  font-weight: 800;
}

.user-info small { color: #cbd5e1; }

.logout-links a {
  color: #1d1e66;
  text-decoration: none;
}
.logout-links a:hover { color: #f4f4f4; }

/* ---------- Footer ---------- */
.main-footer{
  padding: 6px 8px;
  text-align: center;
  background: #111827;
  border-top: 1px solid #ffc30b;
  font-size: 10px;
  width: 100%;
}
.main-footer p{
  margin: 0;
  color: #fbbf24;
}

.small{opacity:.8;font-size:12px;}
/* ---------- Common Containers ---------- */
.section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  max-width:1300px;
  margin:0 auto;
  color: black;
}
.section button {
  background: var(--color-primary);
  color: var(--color-text-dark);
  border: 0;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
  font-size:15px;
}

.tbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.tbar button {
  background: var(--color-primary);
  color: var(--color-text-dark);
  border: 0;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700; 
  font-size:20px;
}

.search-container {
        display: flex;
        align-items: center;
        gap: 5px;
        width:50%;
        border: solid 1px #2e3092;
    }
/* ---------- Buttons ---------- */
.btn,
button.btn {
  background: var(--color-primary);
  color: var(--color-text-dark);
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.btn:hover { transform: scale(1.09);
  box-shadow: 0 10px 14px rgba(0, 0, 0, 0.55); }

.btn-secondary,
button.btn-secondary {
  background: #fff;
  color: #111827;
  border: 2px solid #2e3092;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.btn-secondary:hover { background: #2e3092; color:#fff; }

button.btn-note{
  appearance:none;
  border:2px dashed rgba(46,48,146,.55);
  background: #06a3c2;
  color:#2e3092;
  border-radius:10px;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
  transition: all .15s ease;
  white-space:nowrap;
}

.btn-note:hover{
  background: rgba(46,48,146,.12);
  border-color: rgba(46,48,146,.85);
  transform: translateY(-1px);
}

.btn-note:active{
  transform: translateY(0);
}

button { font-family: inherit; }

button.btn-save {
    background:#06c228;
    color:#fff;
    border: 2px solid #06c228;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.btn-save::before {
  content: "💾 ";
}

button.btn-delete {
  background: #fff;
  color: #111827;
  border: 2px solid #2e3092;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
button.btn-delete::before {
  content: "❌ ";
}

button.btn-add {
  background: #2e3092;
  color: #fff;
  border: 2px solid #06c228;
  float:right;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  }
.btn-add::before {
  content: "➕ ";
}

.btn-row {
  width: 80%;
  margin-right:100px;
  margin-bottom: 10px;
}
/* === Top layout: two columns (50/50) === */
.top-sections {
    display: flex;
    gap: 5px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 0.6; 
}
.label {
    color: #2e3092;}
.top-sections .top-left,
.top-sections .top-right {
    box-sizing: border-box;
    flex: 0 0 48%;
    max-width: 48%;
}

/* =========================
   FORM LAYOUT
========================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-row.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Optional: force one field to span more columns */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

/* Mobile */
@media (max-width: 900px) {
  .form-row.cols-4,
  .form-row.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .form-row,
  .form-row.cols-2,
  .form-row.cols-3,
  .form-row.cols-4 {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4 {
    grid-column: auto;
  }
}

/* =========================
   LABELS
========================= */
label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: #2e3092;
  line-height: 1.2;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  margin-bottom: 0;
}
.radio-btn input {
  margin: 0;
  accent-color: #2e3092;
}
.radio-btn:hover {
  background: #f3f4f6;
  border-color: #2e3092;
}
/* If browser supports :has() this gives selected pill styling */
.radio-btn:has(input:checked) {
  background: rgba(46, 48, 146, 0.08);
  border-color: #2e3092;
  color: #1d2470;
}

/* fallback text emphasis even if :has is not supported */
.radio-btn input:checked + span {
  font-weight: 700;
  color: #1d2470;
}

/* =========================
   INPUTS / SELECT / TEXTAREA
========================= */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2e3092;
  box-shadow: 0 0 0 3px rgba(46, 48, 146, 0.12);
}

input[readonly],
textarea[readonly],
select:disabled,
input:disabled {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* =========================
   ACTION ROW
========================= */

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  margin-bottom:10px;
}
/* =========================
   CHECKBOXES (optional same look)
========================= */

.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}

.check-btn input {
  margin: 0;
  accent-color: #2e3092;
}

.check-btn:hover {
  background: #f3f4f6;
  border-color: #2e3092;
}

/* Tabs */
    .tabs {
        width: 95%;
        margin: 5px auto;
        display: flex;
        justify-content: space-between
    }
    .tab {
        flex: 1;
        text-align: center;
        padding: 4px;
        cursor: pointer;
        font-weight: bold;
        border-radius:10px;
        border: 2px solid #2e3092;
        color: #2e3092;
        background: #f4f4f4;
        text-decoration: none;
        max-width:200px;
    }
    .tab.active {
       border-bottom: 2px solid #2e3092; background: #2e3092; color: #f4f4f4; 
    }
    
    .tab-content.active { display: block; }
    .tab-content { 
        background: #535f61; border-radius: 0 0 8px 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 10px; display: none; }
    .part-row { border:1px solid #ccc; padding:10px; margin-bottom:10px; border-radius:6px; background:#fff; }
 
  .select2-container {
    width: 50% !important;
  }

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; }
th, td {
  padding: 2px 2px;
  border-bottom: 1px solid #b6b8ba;
  vertical-align: top;
  border-right: 1px solid rgba(0,0,0,0.15);
}
th {
  background: #2e3092;
  font-weight: 700;
  text-align: center;
  color:#fff;
}
.centered { text-align: center; }

tr.clickRow { cursor: pointer; }
tr.clickRow:hover { background: rgba(207,226,230,0.9); }

/* ---------- Small helpers ---------- */
.label { opacity: .75; font-weight: 800; margin-right: 6px; }
.data  { font-weight: 700; }

/* =========================================================
   Modals
   ========================================================= */
.modal-backdrop {
  position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;z-index:2000;
}

.modal {
  max-width:720px;width:92vw;margin:6vh auto;background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.25);overflow:hidden;
}

/* Make modal forms not hide behind footer, and allow scrolling */
.modal form { padding-bottom: 6px; }

.modal-header{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #eee;}
/* =========================================================
   Checkbox Dropdown Widget (Assist tech dropdown)
   ========================================================= */
.multi-dd { position: relative; }

.multi-dd-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.multi-dd-panel {
  position: absolute;
  z-index: 1000;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
  padding: 10px;
}

.multi-dd-panel-top {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.multi-dd-filter {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.multi-dd-list {
  max-height: 240px;
  overflow: auto;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.multi-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  margin: 0;
  cursor: pointer;
}
.multi-dd-item:hover { background: #f9fafb; border-radius: 10px; }

/* If you still use the old always-visible checklist somewhere */
.tech-checklist {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #e1edf2;
}


/* =========================================================
   APP LAYOUT: main scrolls, dock+footer sticky together
   ========================================================= */

html, body { height: 100%; }

body.app {
  margin: 0;
  height: 100%;              /* lock viewport height */
  overflow: hidden;           /* IMPORTANT: body doesn't scroll */
  background: var(--color-bg-main);
}

/* App shell becomes a 3-row layout:
   1) main (scroll)
   2) dock (sticky)
   3) footer (sticky)
*/
.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto auto; /* main takes rest, dock+footer size to content */
}

/* Main scrolls */
.app-main {
  overflow-y: auto;           /* ONLY main scrolls */
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 14px 5px;
  color: var(--color-text-main);
  box-sizing: border-box;
}

/* Dock stays at bottom directly above footer */
.bottom-dock {
  display: flex;
  width: 100%;
  gap: 6px;
  padding: 4px;

  background: #2e3092;
  border-top: 1px solid rgba(0,0,0,0.12);

  min-height: 30px;
  align-items: center;
  box-sizing: border-box;
}

/* Dock links */
.bottom-dock .dock-link {
  flex: 1;
  text-align: center;
  padding: 6px 6px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-dock .dock-link.is-active {
  background: #fff;
  color: #2e3092;
}

.bottom-dock .dock-danger {
  background: rgba(255,195,11,0.12);
  color: #ffc30b;
}

/* Footer sticks under the dock */
.main-footer {
  width: 100%;
  padding: 6px 6px;
  text-align: center;
  background: #111827;
  border-top: 1px solid #ffc30b;
  font-size: 10px;
  box-sizing: border-box;
}

.main-footer p {
  margin: 0;
  color: #ffc30b;
}

.mod-card-img { position: relative; }

.card-badge{
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #d93025;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  z-index: 2;
}


/* Mobile tweaks */
@media (max-width: 700px) {
  .bottom-dock {
    padding: 6px;
    min-height: 50px;
    gap: 4px;
  }
  .bottom-dock .dock-link {
    font-size: 11px;
    padding: 9px 4px;
  }
}

/* ===== Admin pages ===== */
.admin-page {
  max-width: 1200px;
  margin: 20px auto 90px auto;
  padding: 20px;
}

.admin-card {
  background: #ffffff;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 20px;
}

.admin-card h1,
.admin-card h2,
.admin-card h3 {
  color: #1d1e66;
  margin-top: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.admin-tile {
  background: #f8fafc;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  padding: 16px;
}

.admin-tile h3 {
  margin: 0 0 8px 0;
  color: #1d1e66;
}

.admin-tile p {
  margin: 0 0 14px 0;
  color: #334155;
}

.admin-btn,
.admin-page a.admin-btn {
  display: inline-block;
  background: #2e3092;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.admin-btn-secondary,
.admin-page a.admin-btn-secondary {
  display: inline-block;
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.admin-form-row {
  margin-bottom: 14px;
}

.admin-form-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #111827;
}

.admin-form-row input[type="text"],
.admin-form-row input[type="email"],
.admin-form-row input[type="password"],
.admin-form-row select,
.admin-form-row textarea {
  width: 100%;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.admin-checklist label {
  display: block;
  margin-bottom: 8px;
  color: #111827;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  border: 1px solid #dbe3ea;
  padding: 10px 12px;
  text-align: left;
  color: #111827;
}

.admin-table th {
  background: #f1f5f9;
  color: #1d1e66;
}

.admin-alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.admin-alert-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.admin-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ===== Admin permissions matrix ===== */
.admin-inline-form {
  margin-bottom: 20px;
}

.admin-module-section {
  margin-top: 28px;
}

.admin-module-section h2 {
  margin: 0 0 12px 0;
  color: #1d1e66;
  font-size: 20px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 6px;
}

.admin-perm-table th,
.admin-perm-table td {
  text-align: center;
  vertical-align: middle;
}

.admin-perm-table .perm-label-col {
  text-align: left;
  min-width: 260px;
}

.admin-perm-table .perm-feature-label {
  text-align: left;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

.admin-perm-table th {
  white-space: nowrap;
}

.perm-check-cell {
  width: 90px;
}

.perm-check-label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.perm-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.perm-empty {
  color: #94a3b8;
}

.admin-actions-bar {
  margin-top: 20px;
}
