@import "forms.css";
@import "modals.css";
@import "responsive.css";
@import "buttons.css";
@import "table.css";
@import "table_modal.css";
@import "notifications.css";
@import "select_js.css";
@import "crud.css";
@import "formset.css";
@import "dropdown.css";
@import "accounting_report.css";

/*
Z-INDEX GUIDE
#loading_gif          1100
.modal forms          1200
.navbar, .mega, .profile-dropdown   999
.drop_content         900
.cright               800
.data_table th        50
first 2 th            60
first 2 column        10
.act_dropdown-content 49 >>> This is the hoverabel action links inside table
.tooltip .tooltiptext 1
*/

/* =====================
   GLOBAL & BODY
===================== */
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  height: 100%;
  background-color: #f4f4f4;
  margin-top: var(--nav-height, 60px);
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: #222;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  font-size: 14px;
}

/* =====================
   GRID SYSTEM
===================== */
.row::after {
  content: "";
  clear: both;
  display: table;
}

[class*="col-"] {
  float: left;
  padding: 0px;
  margin: 0px;
  border: none;
}

.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}

/* =====================
   MAIN CONTENT AREA
===================== */

.content {
  border-radius: 15px;
  background: none;
  border: 0px solid #333;
  padding: 12px 24px 6px 24px;
  margin: 12px auto 12px auto;
  width: auto;
  height: auto;
  max-width: 90%;
  min-height: 85vh;
  font-size: 0.9rem;
}

/* =====================
   FOOTER
===================== */

.cright {
  position: fixed;
  margin-top:6px;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 800;
}

.copyright {
  background-color: #444;
  color: white;
  text-align: center;
  font-size: 0.9rem;
  padding: 3px 0;
}


/* =====================
   LINKS & PAGINATION
===================== */
a {
  text-decoration: none;
}

a.link {
  font-weight: bold;
  text-decoration: none;
  color: inherit; /* normal text color */
  transition: color 0.2s ease;
}

a.link:hover {
  color: #007bff; /* blueish hover */
  text-decoration: none; /* ensures no underline even on hover */
}

.sort_icon {
  margin-left: 6px;
  font-size: 16px;
  pointer-events: none;
  color: rgb(0, 156, 255);
}


/* ============================================================
   RESPONSIVE PAGINATION BAR
   ============================================================ */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 2px 16px;
  color: #475467;
  font-size: 13px;
  flex-wrap: nowrap;
}

/* ------------------------------------------------------------
   LEFT: PAGE INFO
------------------------------------------------------------ */
.pagination-info {
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}

/* ------------------------------------------------------------
   RIGHT: CONTROLS
------------------------------------------------------------ */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}

.step-links,
.pagination-controls .current {
  display: inline-flex;
  align-items: center;
}

.step-links {
  gap: 5px;
}

.pagination-controls .current {
  gap: 7px;
  margin: 0 3px;
  color: #344054;
  font-weight: 600;
}

/* ------------------------------------------------------------
   PAGE INPUT
------------------------------------------------------------ */
.page-input {
  display: inline-block;
  width: 54px;
  height: 32px;
  margin: 0;
  padding: 0 4px;
  box-sizing: border-box;
  text-align: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  border: 1px solid #c7d0da;
  border-radius: 6px;
  background: #fff;
  color: #253041;
  vertical-align: middle;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.page-input:hover {
  border-color: #aeb9c6;
}

.page-input:focus,
.page-input:focus-visible {
  border-color: #0b6fb8;
  box-shadow: 0 0 0 3px rgba(11, 111, 184, 0.16);
}

/* ------------------------------------------------------------
   LINKS
------------------------------------------------------------ */
.pagination-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid #cfd7e1;
  border-radius: 6px;
  background: #fff;
  color: #475467;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, transform 0.08s ease;
}

.pagination-nav:hover:not(:disabled) {
  border-color: #9eb4c8;
  background: #eef6fb;
  color: #0b6fb8;
}

.pagination-nav:active:not(:disabled) {
  transform: translateY(1px);
}

.pagination-nav:focus-visible {
  outline: 3px solid rgba(11, 111, 184, 0.2);
  outline-offset: 1px;
}

.pagination-nav:disabled {
  border-color: #e4e7ec;
  background: #f5f6f7;
  color: #b3bbc5;
  cursor: not-allowed;
  opacity: 0.8;
}

/* ------------------------------------------------------------
   MOBILE FALLBACK (ONLY WHEN NECESSARY)
------------------------------------------------------------ */
@media (max-width: 560px) {

  .pagination-bar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  .pagination-info {
    width: 100%;
    text-align: center;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
  }

  .pagination-nav {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  .page-input {
    width: 48px;
    height: 30px;
  }
}



/* =====================
   VIEW BOX
===================== */
.view {
  background-color: white;
  padding: 5px 20px;
  border-radius: 2px;
}

/* =====================
   FORM ERRORS
===================== */
.form_error {
  position: relative;
  background: #ffe6e6;
  color: #b30000;
  border: 1px solid #ff4d4d;
  border-radius: 10px;
  padding: 20px 40px 20px 20px;
  max-width: 600px;
  margin: 20px auto;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
}

.field_error input,
.field_error select,
.field_error textarea {
  border: 2px solid red;
  background-color: #ffe6e6;
}

.field_error_msg {
  color: red;
  font-size: 0.85rem;
}

/* =====================
   HEADERS
===================== */

.header h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

.header {
  margin: 3px;
  padding: 3px;
}

h1 { font-size: 2.1rem; font-weight: 625; }
h2 { font-size: 1.8rem; font-weight: 575; }
h3 { font-size: 1.5rem; font-weight: 550; }
h4 { font-size: 1.3rem; font-weight: 525; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1.0rem; }

/* =====================
   hr
===================== */

hr {margin: 3px 0px 3px 0px;
  display: block;
  clear: both;}

/* Normal horizontal rule */
hr.normal-hr {
  height: 2px;
  background-color: #ccc;
  border: none;
  border-radius: 12px;
}

/* Slightly bold horizontal rule */
hr.bold-hr {
  height: 2px;
  background-color: black;
  border: none;
  border-radius: 12px;
}



.hr-text {
    position: relative;
    border: none;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    margin: 2rem 0;
}

.hr-text::before {
    content: attr(data-text);
    position: absolute;
    top: -0.8em;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 0.75rem;
    font-size: 1.25rem;
    color: rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}




/* =====================
   Button Bar
===================== */

.btn_bar{padding-bottom: 3px;}

/* =====================
   LOADING GIF
===================== */
#loading_gif {
  display: none;
  align-content: center;
  position: absolute;
  z-index: 1100;
  height: 100%;
  width: 100%;
  margin: auto;
  background-color: transparent;
}

#loading_gif img {
  height: 150px;
  width: 150px;
}

/* =====================
   TEXT & PARAGRAPHS
===================== */
p {
  font-weight: normal;
  font-size: 0.95rem;
}

/* =====================
   SUB HEADER
===================== */
.sub_header_2 {
  background: #e0e7eb;
  color: #111;
  font-size: 1rem;
  margin: 0% 0.5%;
  padding: 4px 2%;
  font-weight: bold;
}

/* =====================
   TOOLTIP
===================== */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  min-width: 300px;
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 8px 2px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  top: 0px;
  left: 105%;
  opacity: 0;
  transition: opacity 0.5s;
}

.tooltip .tooltiptext::after {
  content: " ";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* =====================
   TABS
===================== */
.tab {
  overflow: hidden;
  border: 2px solid #ccc;
  background-color: #f1f1f1;
  margin: 0 auto;
}

.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 12px 16px;
  transition: 0.3s;
  font-size: 0.95rem;
}

.tab button:hover {
  background-color: #ddd;
}

.tab button.active {
  background-color: #ccc;
  font-weight: bold;
}

.tabcontent {
  display: none;
  padding: 6px 12px;
  border: 0;
  border-top: none;
}

/* =====================
   SELECTS & INPUTS
===================== */
.selection {
  font-size: 1rem;
}

.select2-container {
  margin-top: 6px;
}

/* =====================
   STATUS BADGES
===================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 20px;
  padding: 4px 10px;
  color: #333;
  background-color: #f1f1f1;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-expired {
  background-color: #f8d7da;
  color: #721c24;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-cancelled {
  background-color: #e2e3e5;
  color: #383d41;
}

/* =====================
   INVOICE LINK
===================== */
.invoice-link {
  color: #0a66c2;
  text-decoration: underline;
  font-weight: bold;
}

.invoice-link:hover {
  color: #004a99;
  text-decoration: none;
}

/* =====================================================
   SORTABLE ROW STATES (Column Modal)
   ===================================================== */

/* Row placeholder (where item will drop) */
.sortable-ghost {
    opacity: 0.5;
    background: #dbeafe !important;   /* light blue */
    border: 2px dashed #60a5fa;       /* clear drop indicator */
}

/* Row selected before dragging */
.sortable-chosen {
    background: #e0e7ff !important;   /* soft indigo */
}

/* Row currently being dragged */
.sortable-drag {
    opacity: 0.9;
    background: #bfdbfe !important;   /* stronger blue */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Drag handle cursor */
.drag-handle {
    cursor: grab;
    user-select: none;
}

/* While dragging */
.sortable-drag .drag-handle,
.drag-handle:active {
    cursor: grabbing;
}

/* ===================================================================================
   RESPONSIVE TEXT - DON'T MOVE ELSEWHERE - THIS WILL APPLY THROUGHOUT WITH PRIORITY
======================================================================================= */

@media (max-width: 1400px) {
  html {
    font-size: 13.5px;
  }
}

@media (max-width: 1200px) {
  html {
    font-size: 13px;
  }
  .content{max-width: 95%;}
}

@media (max-width: 992px) {
  html {
    font-size: 12.5px;
  }
  .content{max-width: 100%;}
}

@media (max-width: 768px) {
  html {
    font-size: 12px;
  }
  .content{max-width: 100%;}
}
