/* Base Page */




html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* Login */
.login-body {
  background: linear-gradient(
    135deg,
    #fffaf0,
    #f5e6a7,
    #ffffff 
  );
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* CONTAINER */
.login-container {
  width: 100%;
  max-width: 400px;
}

.login-switch{
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.login-switch button{
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: white;

    background: #2b2b2b;

    transition: all 0.3s ease;
}

.login-error{
    width:100%;
    padding:14px 18px;
    border-radius:12px;
    background:#ffe5e5;
    color:#d63031;
    border:1px solid #ffb3b3;
    font-weight:600;
    margin-bottom:18px;
    text-align:center;
}

.login-switch button.active{
    background: linear-gradient(
        135deg,
        var(--gold),
        #c49b2c
    );

    transform: translateY(-2px);
    color: black;

    box-shadow: 0 8px 20px rgba(252, 185, 1, 0.70);
}

.login-switch button:hover{
    transform: scale(1.02);
}

/* CARD */
.login-box {
  position: relative;
  background: white;
  padding: 50px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}



/* TITLE */
.login-box h2 {
  margin-bottom: 20px;
  color: #000;
  text-align: center;
}

/* INPUT */
.login-box input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: 0.2s;
  font-size: 15px;
}

/* INPUT FOCUS */
.login-box input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
  outline: none;
}

/* BUTTON */
.login-box button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold), #c49b2c);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

/* BUTTON HOVER */
.login-box button:hover {
  background: linear-gradient(135deg, #c49b2c, #b8962e);
  transform: translateY(-1px);
}

/* OPTIONS */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 15px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 500;
}

.remember input {
  margin: 0;
}

.form-options a {
  text-decoration: none;
  color: #1e1e1e;
  font-weight: 500;
}

.form-options a:hover {
  text-decoration: underline;
  color: var(--gold);
}
.forgot-back {
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
  font-size: 15px;
}
.forgot-back a {
  text-decoration: none;
  color: var(--gold);
}

.forgot-back a:hover {
  color: var(--gold);
}

.otp-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0;
}

.otp-box {
  width: 45px;
  height: 50px;
  text-align: center;
  font-size: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.otp-box:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.otp-info {
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
  color: #555;
}

.resend-container {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.resend-container a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.resend-container a:hover {
  text-decoration: underline;
}

.password-field {
  position: relative;
  margin: 10px 0;
}

.password-field input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

.toggle-password:hover {
  color: var(--gold);
}

/* SideBar */
/* :root {
    --bg-page: #f4f5f7;
    --bg-card: #ffffff;
    --text: #1a1d21;
    --text-muted: #6b7280;
    --border: #e8eaed;
    --sidebar-w: 240px;
    --accent-yellow: #f5c542;
    --accent-yellow-soft: #fff8e6;
    --purple: #8b5cf6;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --radius-sm: 12px;
} */

:root {
    /* CORE THEME */
    --gold: #D4AF37;
    --gold-soft: #F5E6A7;
    --black: #1E1E1E;
    --dark: #2C2C2C;
    --green: #16A34A;
    --green-soft: #DCFCE7;
    --bg-page: #f4f5f7;
    --bg-card: #ffffff;
    --text: #1a1d21;
    --text-muted: #6b7280;
    --border: #e8eaed;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --radius-sm: 12px;
    --sidebar-w: 240px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg-page);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.45;
}



.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #0f172a;
  padding: 22px 25px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  z-index: 2;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* LOGO SECTION */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;   /* center horizontally */
  justify-content: center;
  text-align: center;
  margin-bottom: 20px;
}

/* IMAGE */
.sidebar-logo img {
  width: 70px;
  height: auto;
}

/* TEXT */
.sidebar-logo h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.nav { 
    list-style: none; 
    flex: 1; 
}

.nav a {
    display: flex; 
    align-items: center; 
    gap: 12px;
    padding: 12px 14px; 
    border-radius: var(--radius-sm);
    color: #cbd5e1; 
    text-decoration: none;
    font-weight: 500; 
    font-size: 0.95rem;
    transition: color 0.15s, background 0.15s;
}
    
.nav a svg { 
    width: 20px; 
    height: 20px; 
    opacity: 0.85; 
    color: #94a3b8
}
    
.nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff; 
}
    
.nav a.active { 
    background: linear-gradient(135deg, var(--gold), #c49b2c);
    color: #000;
    font-weight: 600;
}
    
.nav a.active svg { 
    stroke: #d4a012; 
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  transition: 0.2s;
}

/* ICON */
.nav i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: #fff;
}

/* HOVER */
.nav a:hover {
  background: var(--gold);
}

/* ACTIVE */
.nav a.active {
  background: linear-gradient(135deg, var(--gold), #c49b2c);
color: #000;
}

.nav a.active i {
  color: #000;
}

/* SideMenu */
/* Arrow */
.arrow {
  margin-left: auto;
  transition: transform 0.25s ease;
}

.arrow.rotate {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  padding-left: 35px;

  max-height: 0;
  overflow: hidden;

  transition: max-height 0.3s ease;
}

.submenu.show {
  max-height: 200px; /* enough height */
}

/* SUBMENU ITEMS */
.submenu li a {
  padding: 8px 10px;
  font-size: 14px;
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* HOVER */
.submenu li a:hover {
  background: var(--gold);
}

.submenu a.active i {
  color: var(--gold);
}


/* ACTIVE CHILD */
.submenu li a.active {
  background: transparent;
  color: var(--gold);
  font-weight: 600;
}



/* STAFF MAIN ACTIVE MENU ONLY */
.staff-sidebar .nav > li > a.active {
    background: #16a34a;
    color: white;
}

.staff-sidebar .nav > li > a.active i {
    color: white;
}

/* STAFF HOVER */
.staff-sidebar .nav a:hover {
    background: rgba(22, 163, 74, 0.15);
}

/* STAFF LOGO */
.staff-sidebar .sidebar-logo h3 {
    color: #22c55e;
}

/* STAFF SUBMENU ACTIVE */
.staff-sidebar .submenu li a.active {
    background: transparent !important;
    color: #22c55e;
    font-weight: 600;
}

.staff-sidebar .submenu li a.active i {
    color: #22c55e;
}

/* DashBoard */
/* Container */
.dash-container {
  padding: 20px;
}

/* Header */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dash-actions button {
  margin-left: 10px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--gold);
  color: black;
  border-radius: 8px;
  text-decoration: none;
}

.btn-primary:hover {
  background: #c49b2c;
}

.btn-danger{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #dc2626;
  color: white;
  border-radius: 8px;
  text-decoration: none;
}

.btn-danger:hover {
  background: #d51717;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #019e25;
}

/* Grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

/* Cards */
.dash-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-left: 5px solid var(--gold);
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.dash-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

.dash-card h3 {
  margin-top: 5px;
  font-size: 18px;
  color: #111;
  font-weight: 600;
}

/* Colors */
.gold { border-color: var(--gold); }
.green { border-color: var(--green); }
.red { border-color: #dc2626; }
.gray { border-color: #9ca3af; }

/* Bottom section */
.dash-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}

.dash-box {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.dash-box ul {
  list-style: none;
  padding: 0;
}

.dash-box li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* Avatar circle */
.avatar {
  width: 35px;
  height: 35px;
  background: var(--gold);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Text */
.info {
  display: flex;
  flex-direction: column;
}

.info span {
  font-size: 12px;
  color: #777;
}

.bill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* Icon */
.bill-icon {
  width: 35px;
  height: 35px;
  background: var(--gold);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.expire-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.expire-icon {
  width: 35px;
  height: 35px;
  background: #ef4444;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.expire-danger { color: #dc3545; font-weight: 500; }
.expire-warning { color: #f59e0b; }


/* Customers List Page */
.customers-page {
  padding: 20px;
}

.customers-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.customers-add-btn {
  padding: 10px 15px;
  background: var(--gold);
  color: black;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}

.customers-add-btn:hover {
  background: #c49b2c;
}

.customers-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

.customers-filter input,
.customers-filter select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.customers-filter button {
  padding: 8px 20px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  border: none;
}

.customers-table-box {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.customers-table {
  width: 100%;
  border-collapse: collapse;
}

.customers-table th {
  background: #f9fafb;
  color: #444;
  font-weight: 700;
  padding: 12px;
  text-align: center;
}

.customers-table td {
  padding: 12px;
  border-top: 1px solid #eee;
  text-align: center;
}

.customers-table tbody tr:hover {
  background: #f9fafb;
}

.c-tag {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}

.student { 
  background: #e8f5e9; 
  color: var(--green); 
  font-weight: bold;
}
.customer { 
  background: #f3f4f6; 
  color: #333; 
  font-weight: bold;
}
.shop { 
  background: #fff8e1; 
  color: var(--gold); 
  font-weight: bold;
}

.c-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.c-status.member {
  background: #e6f4ea;
  color: var(--green);
}

.c-status.non-member {
  background: #fdecea;
  color: #dc3545;
}

/* .c-member-id {
  background: #eef2ff;
  color: var(--gold);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
} */

.c-due {
  background: #fdecea;
  color: #dc2626;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: bold;
}

/* ACTIONS */
.actions {
  display: flex;
  gap: 8px;
}

/* COMMON BUTTON */
.action-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: white;
  font-size: 14px;
  transition: all 0.2s ease;
}

/* EDIT */
.action-btn.edit {
  background: var(--green);
}
.action-btn.edit:hover {
  background: #218838;
}

/* DELETE */
.action-btn.delete {
  background: #dc3545;
}
.action-btn.delete:hover {
  background: #c82333;
}

/* RENEW */
.action-btn.renew {
  background: var(--gold);
  color: black;
}
.action-btn.renew:hover {
  background: black;
  color: var(--gold);
}

/* HOVER EFFECT */
.action-btn:hover {
  transform: translateY(-2px);
}

/* Tooltip wrapper */
.tooltip {
  position: relative;
  display: inline-block;
}

/* Tooltip text */
.tooltip-text {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Arrow */
.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}

/* Show tooltip */
.tooltip:hover .tooltip-text {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.c-member-id {
  background: #4e4e4c;
  color: var(--gold);
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* Wrapper */
.customers-filter-new {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Each field */
.customers-filter-new .filter-group {
  position: relative;
}

/* Input + Select same style */
.customers-filter-new input,
.customers-filter-new select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: #fff;
  min-width: 180px;
  transition: 0.2s;
}

/* Button */
.filter-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--black);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

.filter-btn:hover {
  background: #333;
}


.select-wrapper {
  position: relative;
}

/* Remove default arrow */
.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 35px;
}

/* Custom arrow */
.select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
  pointer-events: none;
}

.suggestion-box {
  position: absolute;
  top: 45px;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
  background: #f5f5f5;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  z-index: 999;

  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 320px;
  text-align: center;

  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.confirm-btn {
  background: red;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
}

.cancel-btn {
  margin-left: 10px;
  padding: 8px 15px;
  border-radius: 6px;
  border: none;
  background: #747373;
  color: white;
}




/* Add & Edit Customer-form */
.add-customer-page {
  max-width: 600px;
  margin: 30px auto;
}

.add-customer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.back-btn {
  text-decoration: none;
  color: #007bff;
}

.add-customer-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ac-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.ac-group label {
  margin-bottom: 5px;
}

.ac-group input,
.ac-group select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.checkbox-group {
  margin-bottom: 10px;
}

.membership-fields {
  display: none;
}

.ac-submit-btn {
  width: 100%;
  padding: 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.error-text {
  color: #dc3545;
  font-size: 13px;
  display: block;
  margin-bottom: 5px;
}

/* Top edit message */
.msg-container {
  margin: 10px 20px;
}

.msg {
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

/* colors */
.msg.success {
  background: #e6f4ea;
  color: #2e7d32;
}

.msg.error {
  background: #fdecea;
  color: #c62828;
}

.msg.info {
  background: #e3f2fd;
  color: #1565c0;
}


/* =========================
   MODERN BILLING UI UPGRADE
   Replace / append to style.css
========================= */

.bill-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bill-page {
  padding: 20px;
}

/* TITLE */
.bill-title {
  margin-bottom: 28px;
  font-size: 38px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
}

/* CARD */
.bill-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 22px;
  margin-bottom: 28px;
  border: 1px solid #eef2f7;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.06),
    0 4px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
}

.bill-card:hover {
  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.08),
    0 6px 14px rgba(15, 23, 42, 0.05);
}

.bill-card label {
  font-size: 20px;
  font-weight: 600;
}

/* SEARCH */
.bill-search-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
}

.bill-search-row label {
  font-weight: 700;
  font-size: 20px;
  color: #1f2937;
}

/* INPUT GLOBAL */
.bill-card input,
.bill-card select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 16px;
  background: #ffffff;
  transition: all 0.25s ease;
  outline: none;
}

.bill-card input:focus,
.bill-card select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* SEARCH INPUT */
#customerInput {
  width: 55%;
  font-size: 18px;
  font-weight: 500;
}

/* REMOVE NUMBER ARROWS */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* input[type=number] {
  -moz-appearance: textfield;
} */

/* CUSTOMER RESULT */
.bill-customer-result {
  margin-top: 20px;
}

.cust-box {
  background: linear-gradient(135deg, #fffdf5, #f5e6a7);
  border: 1px solid var(--gold-soft);
  padding: 15px;
  border-radius: 18px;
  line-height: 2;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.cust-box p {
  margin: 4px 0;
}

/* STATUS COLORS */
.active {
  color: var(--green);
  font-weight: 700;
}

.expired {
  color: #dc2626;
  font-weight: 700;
}

.non-member {
  color: var(--gold);
  font-weight: 700;
}

/* ITEM GRID */
.bill-item-input {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}



/* Billing Mode Row */
.billing-mode-box{
    grid-column: span 1;
}

/* Billing Type Text */
.bill-item-input label{
    display:flex;
    align-items:center;
    font-size:18px;
    font-weight:700;
    margin-left:4px;
}

/* Qty full row */
#itemQty{
    grid-column: span 4;
}

/* Mobile */
@media (max-width:768px){

    .billing-grid{
        grid-template-columns:1fr;
    }

    #itemQty{
        grid-column: span 1;
    }

    .auto-bill-box{
        grid-template-columns:1fr;
    }

    .extra-charge-box{
        grid-template-columns:1fr;
    }
}

.auto-bill-box {
  grid-column: span 4;
    display:grid;
    grid-template-columns: 1.5fr 1.5fr 1.5fr;
    gap:16px;
    width:100%;
    margin-top:-4px;

}

/* =========================
   MODERN CLEAN DROPDOWN STYLE
   Replace your current select block
========================= */

select {
    width: 50%;
    padding: 12px 42px 12px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    background-color: #ffffff;

    /* Remove ugly default */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Custom arrow */
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5.5 7.5l4.5 4.5 4.5-4.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;

    cursor: pointer;
    outline: none;

    transition: all 0.25s ease;
}

/* Hover */
select:hover {
    border-color: #9ca3af;
}

/* Focus */
select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Disabled */
select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* OPTION STYLE (browser limited but helps) */
select option {
    padding: 10px;
    font-size: 15px;
    background: white;
    color: #111827;
}

/* Small cleaner height */
.bill-card select,
.section-card select {
    min-height: 48px;
}

/* Mobile */
@media (max-width: 768px) {
    select {
        font-size: 14px;
        padding: 11px 40px 11px 12px;
    }
}


/* ADD BUTTON */
.bill-add-btn {
  grid-column: span 4;
  padding: 13px;
  background: linear-gradient(135deg, var(--gold), #c49b2c);
  color: black;
  justify-self: end;
  margin-left: auto;
  border: none;
  border-radius: 16px;
  width: 300px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.bill-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(212, 175, 55, 0.3);
}

/* TABLE */
.bill-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #dbe4ee;
}

.bill-table th {
  background: linear-gradient(135deg, #fff8e1, #f5e6a7);
  font-size: 16px;
  font-weight: 800;
  color: #111;
}

.bill-table th,
.bill-table td {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.bill-table tr:last-child td {
  border-bottom: none;
}

.bill-table td {
  background: #ffffff;
  border: 1px solid #000;
  border-radius: 1px;
}

.bill-table td:first-child {
  min-width: 230px;
  text-align: left;
  font-weight: 600;
  color: #111827;
}

.bill-table tbody tr:hover {
  background: #f9fafb;
}

#extraPurpose,
#itemExtraCharge{
    height:52px;
}

.extra-charge-box{
    grid-column: span 4;
    display:grid;
    grid-template-columns: 2fr 1fr;
    gap:16px;
    width:100%;
    margin-top:-4px;
}

/* SUMMARY */
/* =========================
   COMPACT BILL SUMMARY AREA
   Replace only summary section CSS
========================= */

/* SUMMARY ROW NORMAL */
.bill-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;              /* reduced from 16 */
  font-size: 18px;              /* reduced */
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
  line-height: 1.3;
}



/* FINAL ROW */
.bill-summary-row.final {
  font-size: 26px;              /* reduced from 42 */
  font-weight: 800;
  color: var(--gold);
  padding: 12px 0;
  margin-top: 6px;
}

/* FIELD BLOCK */
.bill-field {
  margin-top: 12px;             
}

.bill-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bill-field label {
  flex: 0.8;
  font-size: 14px;
}

.bill-field input {
  flex: 0.5;
}

/* SUMMARY CARD ONLY */
.bill-card.summary-card {
  padding: 18px 24px;           /* compact */
}

/* OPTIONAL: smaller generate button spacing */
.bill-submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #333,var(--green), #c1ae1f);
  color: white;
  border: none;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.bill-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(22, 163, 74, 0.3);
}


/* MOBILE */
@media (max-width: 600px) {
  .bill-summary-row {
    font-size: 16px;
    padding: 8px 0;
  }

  .bill-summary-row.final {
    font-size: 22px;
  }

  .bill-field input {
    padding: 9px 12px;
  }
}

/* ACTION BUTTONS */
.action-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.action-btns button {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.a-edit {
  background: #f3f4f6;
}

.a-edit:hover {
  background: var(--gold);
  color: black;
}

.a-close {
 background: #dc2626;
}

.a-close:hover {
  background: #dc2626;
  color: white;
}

/* MOBILE */
@media (max-width: 992px) {
  .bill-item-input {
    grid-template-columns: repeat(2, 1fr);
  }

  .bill-add-btn {
    grid-column: span 2;
  }

  .bill-search-row {
    grid-template-columns: 1fr;
  }

  #customerInput {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .bill-page {
    padding: 0 14px;
  }

  .bill-card {
    padding: 18px;
    border-radius: 16px;
  }

  .bill-title {
    font-size: 28px;
  }

  .bill-item-input {
    grid-template-columns: 1fr;
  }

  .bill-add-btn {
    grid-column: span 1;
  }

  .bill-table {
    display: block;
    overflow-x: auto;
  }

  .bill-summary-row.final {
    font-size: 32px;
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* each section card */
.bill-section {
  background: #f8fafc;
  padding: 15px;
  border-radius: 12px;
}





/* PAGE */
.invoice-page{
    display:flex;
    justify-content:center;
    background:#f4f4f4;
    padding:20px;
}

/* CARD */
.invoice-card{
    width:760px;
    background:#fff;
    padding:28px;
    border-radius:12px;
    border:1px solid #e5e5e5;
    box-shadow:0 4px 12px rgba(0,0,0,0.05);
}

.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) {
    width: 10%;
}

.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6) {
    width: 12%;
}

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) {
    width: 30%;
}

/* TOP */
.invoice-top{
    text-align:center;
    margin-bottom:10px;
}

.invoice-top h4{
    font-size:13px;
    letter-spacing:1px;
    color:#b68a00;
    margin:0;
    font-weight:600;
}

/* SHOP */
.invoice-shop{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 20px 18px 20px;
    margin-bottom:20px;
    border-bottom:1px solid #ececec;
}

.shop-logo{
    width:120px;
    height:120px;
    object-fit:contain;
    margin-left:15px;
}

.shop-right{
    text-align:right;
}

.shop-right h1{
    font-size:28px;
    margin:0 0 6px;
    color:#111;
    font-weight:700;
}

.shop-right p{
    margin:2px 0;
    color:#555;
    font-size:13px;
}

/* HEADER */
.invoice-header{
    display:flex;
    justify-content:space-between;
    margin-bottom:18px;
    background:#fafafa;
    border:1px solid #eee;
    border-radius:10px;
    padding:15px 18px;
}

.invoice-header p{
    margin:4px 0;
    font-size:14px;
}

/* TABLE */
.invoice-table{
    width:100%;
    border-collapse:collapse;
    margin-top:10px;
    font-size:13px;
}

.invoice-table thead{
    background:#f7f7f7;
}

.invoice-table th{
    border:1px solid #dcdcdc;
    padding:10px 8px;
    font-weight:600;
    text-align:center;
    color:#222;
}

.invoice-table td{
    border:1px solid #e3e3e3;
    padding:10px 8px;
    text-align:center;
    vertical-align:top;
    color:#222;
}

.invoice-table td:nth-child(2){
    text-align:left;
    line-height:1.5;
}

/* SUMMARY */
.summary-box{
    width:290px;
    margin-left:auto;
    margin-top:22px;
    border-top:1px solid #ddd;
    padding-top:12px;
}

.summary-box-quo{
    width:290px;
    margin-left:auto;
    margin-top:15px;
    padding-top:12px;
}
.summary-row.final-quo{
    margin-top:12px;
    padding-top:10px;
    font-size:18px;
    font-weight:700;
}

.summary-row{
    display:flex;
    justify-content:space-between;
    margin-bottom:8px;
    font-size:14px;
}

.summary-row.final{
    margin-top:12px;
    padding-top:10px;
    border-top:1px dashed #ccc;
    font-size:18px;
    font-weight:700;
}

.signature-img{
    width:120px;
    height:auto;
    object-fit:contain;
    position:absolute;
    top:-20px;
    left:50%;
    transform:translateX(-50%);
    background:#fff;
    padding:0 5px;
}

/* STATUS */
.paid-status{
    color:green;
    font-weight:700;
}

.due-status{
    color:red;
    font-weight:700;
}

/* SIGN */
.signature-box{
    margin-top:55px;
    display:flex;
    justify-content:space-between;
}

.sign-left,
.sign-right{
    width:220px;
    text-align:center;
    font-size:13px;
    position:relative;
    padding-top:45px;
}

/* BUTTONS */
.bill-actions{
    margin-top:30px;
    display:flex;
    gap:10px;
}

.back-btn,
.print-btn{
    flex:1;
    border:none;
    padding:12px;
    border-radius:8px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    text-align:center;
}

.back-btn{
    background:#6c757d;
    color:#fff;
}

.print-btn{
    background:#d4af37;
    color:#fff;
}

/* PRINT */
@media print{

    body{
        background:white;
    }

    .bill-actions{
        display:none;
    }

    .invoice-card{
        box-shadow:none;
        border:none;
    }

    .invoice-page{
        padding:0;
        background:white;
    }
}




/* PRINT FIX */
@media print {

  body {
    margin: 0;
    background: white;
  }

  .invoice-page {
    padding: 0;
    background: white;
  }

  .invoice-card {
    width: 100%;
    box-shadow: none;
    padding: 10px;
  }

  .print-btn,
  .back-btn {
    display: none;
  }
}

/* PAGE MARGIN */
@page {
  margin: 10mm;
}

.alert {
  background: #ffe0e0;
  color: #c00;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
}

@media print {
  .invoice-card {
    border: none;
  }

  .invoice-table,
  .invoice-table th,
  .invoice-table td {
    border: 1px solid #000 !important;
  }
}






/* Bill History (Orders) */
.history-page {
  padding: 30px 15px;
  max-width: 100%;
  margin: auto;
}

.history-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.history-search {
  display: flex;
  flex: 1;
  gap: 10px;
  justify-content: center ;
}

.history-search input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 250px;
}

.history-search button {
  padding: 10px 15px;
  background: var(--gold);
  color: black;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.history-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.pagination {
  margin-top: auto;   /* 🔥 THIS IS THE FIX */
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,  
.history-table td {
  padding: 12px;
  text-align: center;
}

.history-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.history-table tr {
  border-bottom: 1px solid #eee;
}


.action-icons {
  text-align: center;
}

.icon {
  display: inline-block;
  margin: 0 6px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Hover bulge effect */
.icon:hover {
  transform: scale(1.5);
  filter: brightness(1.2);
}

/* Colors */
.icon.view {
  color: #0033ff;
}

.icon.delete {
  color: #f20707;
}

.icon.bill {
  color: #000;
}





/* Reports */
/* Container */
.reports-container {
  max-width: 1100px;
  margin: auto;
}

/* Header */
.reports-header {
  margin-bottom: 20px;
}

/* Filters */
.reports-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.reports-filters select,
.reports-filters input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.reports-btn {
  padding: 8px 14px;
  background: var(--gold);
  color: black;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.reports-btn:hover {
  background: #c49b2c;
}

/* Cards */
.reports-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.report-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  box-shadow: var(--shadow);
  transition: 0.2s;
}

.report-card {
  border-left: 4px solid var(--gold);
}

.report-card:hover {
  transform: translateY(-2px);
}

.report-card p {
  color: #6b7280;
}

.report-card h3 {
  color: #111;
  font-weight: 700;
  margin: 5px 0 0;
}

.reports-filters select:focus,
.reports-filters input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
  outline: none;
}

/* Table */
.reports-table-wrapper {
  background: white;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
}

.reports-table th,
.reports-table td {
  padding: 12px;
  text-align: left;
}

.reports-table th {
  background: #fff8e1;
  color: #111;
  font-weight: 600;
}

.reports-table tr {
  border-bottom: 1px solid #eee;
}

.reports-table tr:hover {
  background: #f9fafb;
}


.flatpickr-months .flatpickr-month {
    background: transparent;
    /* color: rgba(0, 0, 0, 0.9); */
    fill: rgba(0, 0, 0, 0.9);
    height: 50px !important;
    line-height: 1;
    text-align: center;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.flatpickr-calendar {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', sans-serif;
}

.flatpickr-day.selected {
    background: var(--gold);
    color: black;
    border-radius: 8px;
}

.flatpickr-day:hover {
    background: #fff8e1;
}

.flatpickr-month {
    color: #333;
    font-weight: 600;
}






/* ===== Offers Page ===== */
/* Page */
.offers-container {
  padding: 30px 0;
}

/* Card */
.offers-container .offers-card {
  max-width: 600px;
  margin: auto;
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Heading */
.offers-container .offers-title {
  margin-bottom: 20px;
}

/* Form Group */
.offers-container .offers-group {
  margin-bottom: 18px;
}

/* Labels */
.offers-container .offers-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Inputs */
.offers-container .offers-input,
.offers-container .offers-select,
.offers-container .offers-textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

/* Focus */
.offers-container .offers-input:focus,
.offers-container .offers-textarea:focus,
.offers-container .offers-select:focus {
  border-color: #007bff;
}

/* Textarea */
.offers-container .offers-textarea {
  height: 120px;
  resize: none;
}

/* Dual select spacing */
.offers-container .offers-group select {
  margin-bottom: 10px;
}

/* Button */
.offers-container .offers-btn {
  width: 100%;
  padding: 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
}

.offers-container .offers-btn:hover {
  background: #218838;
}






/* ===== Settings Wrapper ===== */
.settings-container {
  max-width: 800px;
  margin: auto;
}

.settings-title {
  margin-bottom: 20px;
}

/* Card */
.settings-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.settings-card h3 {
  margin-bottom: 15px;
}

/* Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

/* Inputs */
.settings-card input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* BUTTON ALIGNMENT */
.settings-card button {
  margin-top: 10px;
}

/* SAVE BUTTON */
.btn-save {
  padding: 10px 18px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-save:hover {
  background: #218838;
}

.settings-card {
  display: flex;
  flex-direction: column;
}

.btn-save {
  align-self: flex-end;
}





/* ===== REPORT PAGE ===== */
/* ===== PAGE ===== */
.reports-page {
  padding: 20px;
}

/* ===== HEADER ===== */
.reports-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.btn-download {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
  text-decoration: none;
  margin-left:10px ;
}

.btn-download:hover {
  background: #218838;
}

.reports-filter-new {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Each field */
.reports-filter-new .filter-group {
  position: relative;
}

/* Input + Select same style */
.reports-filter-new input,
.reports-filter-new select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: #fff;
  min-width: 180px;
  transition: 0.2s;
}

/* INPUT + SELECT */
.filter-input {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f9fafb;
  font-size: 14px;
  transition: 0.2s;
}

/* FOCUS */
.filter-input:focus {
  border-color: #007bff;
  background: #fff;
  outline: none;
}


/* APPLY BUTTON */
.btn-apply {
  background: var(--black);
  color: #fff;
  border: none;
  padding: 0 16px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-apply:hover {
  background: #333;
}

.btn-clear {
  background-color: #bbb9b9;
  color: #000;
  border: none;
  padding: 0 16px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-clear:hover {
  background: #9c9797;
}

/* ===== SUMMARY CARDS ===== */
.reports-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.summary-card {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  border-left: 4px solid #007bff;
  position: relative;
}

/* DIFFERENT COLORS */
.summary-card:nth-child(2) { border-left-color: #28a745; }
.summary-card:nth-child(3) { border-left-color: #6f42c1; }
.summary-card:nth-child(4) { border-left-color: #fd7e14; }

/* TEXT */
.summary-card p {
  font-size: 13px;
  color: #777;
}

.summary-card h3 {
  margin-top: 5px;
  font-size: 20px;
}


.reports-analytics {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.analytics-chart {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}



.analytics-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-card {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.info-card p {
  font-size: 13px;
  color: #666;
}

.info-card h4 {
  margin: 5px 0;
}

/* ===== TABLE ===== */
.reports-table-box {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* HEADER */
.reports-table th {
  background: #f5f5f5;
  padding: 10px;
  font-weight: 600;
  text-align: center;
  font-size: 14px;
}

/* BODY */
.reports-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: center;
  font-size: 14px;
}


/* FINAL COLUMN */
.reports-table .final {
  color: #28a745;
  font-weight: 600;
}


.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 18px;
  margin-bottom: 10px;
  border-radius: 8px;
  min-width: 250px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideIn 0.4s forwards, fadeOut 0.4s forwards 3s;
}

/* SUCCESS */
.toast.success {
  background: #28a745;
}

/* ERROR */
.toast.error {
  background: #dc3545;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}





.offer-history-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.offer-history-table {
  width: 100%;
  border-collapse: collapse;
}

/* .offer-history-table td {
  padding: 12px;
  text-align: center;
  max-width: 250px;       
  word-wrap: break-word;   
  word-break: break-word;  
  white-space: normal;    
} */

.message-cell {
  max-width: 300px;
  word-break: break-word;
  white-space: normal;
  text-align: left;
}

.offer-history-table th,
.offer-history-table td {
  padding: 12px;
  text-align: center;
}

.offer-history-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.offer-history-table tr {
  border-bottom: 1px solid #eee;
}


.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.popup.show {
  display: block;
}

.popup-content {
  background: white;
  padding: 20px;
  width: 400px;
  margin: 100px auto;
  border-radius: 10px;
  text-align: left;
}

.message-cell {
  max-width: 250px;
  cursor: pointer;
  color: var(--green);
}

.message-cell:hover {
  text-decoration: underline;
}


.c-status.active {
  background: #e6f7ee;
  color: #28a745;
  padding: 4px 8px;
  border-radius: 5px;
}

.c-status.expired {
  background: #fdecea;
  color: #dc3545;
  padding: 4px 8px;
  border-radius: 5px;
}

.c-renew {
  color: #007bff;
  margin: 0 8px;
  text-decoration: none;
  font-weight: 500;
}


/* Memnbership History */
/* PAGE */
.history-page {
  padding: 20px;
}

/* HEADER */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

/* FILTER */
.history-filter {
  display: flex;
  gap: 10px;
}

.history-filter input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.history-filter button {
  padding: 8px 14px;
  border: none;
  background: var(--gold);
  color: black;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

/* TOTAL */
.history-total {
  background: #111;
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
}



/* TABLE */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  background: #f9fafb;
  padding: 14px;
  text-align: center;
  font-size: 14px;
}

.history-table td {
  padding: 14px;
  border-top: 1px solid #eee;
  font-size: 14px;
}

/* NAME */
.name {
  font-weight: 600;
}

/* TYPE */
.type-tag {
  background: #e0f2fe;
  color: #0284c7;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* AMOUNT */
.amount {
  font-weight: 600;
}

/* PAYMENT */
.pay {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.pay.cash {
  background: #f3f4f6;
}

.pay.upi {
  background: #e0f2fe;
  color: #0284c7;
}

.pay.card {
  background: #fef3c7;
  color: #92400e;
}

/* EMPTY */
.empty {
  text-align: center;
  padding: 20px;
  color: #888;
}

/* Renewal Modal */
.modal-content input,
.modal-content select {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}


/* Pagination */
.customers-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* Info box */
.page-info {
  background: #1e1e1e;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid #333;
}

/* Buttons */
.nav-btn {
  background: var(--gold); /* your red */
  color: black;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s ease;
}

/* Hover */
.nav-btn:hover {
  background: #a07622d3;
}

/* Disabled */
.nav-btn.disabled {
  background: #555;
  color: #ccc;
  pointer-events: none;
}

/* Optional: different shades */
.nav-btn.prev {
  background: var(--gold);
  color: black;
}

.nav-btn.next {
  background: var(--gold);
  color: black;
}


.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}







.active {
  color: green;
  font-weight: bold;
}

.expired {
  color: red;
  font-weight: bold;
}

.non-member {
  color: gray;
}


.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 40px;
}

.password-field span {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
}


.paginations {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* All buttons */
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  background: #1e1e1e;
  color: #fff;
  text-align: center;
  line-height: 38px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Hover */
.page-btn:hover {
  background: #333;
}

/* Active page */
.page-btn.active {
  background: var(--gold);  /* green */
  color: #000;
  font-weight: 600;
}

/* Prev / Next buttons */
.page-btn.nav {
  background: #ef4444;  /* red */
}

.page-btn.nav:hover {
  background: #dc2626;
}

/* Disabled */
.page-btn.disabled {
  background: #555;
  color: #aaa;
  cursor: not-allowed;
}

/* Dots */
.dots {
  color: #999;
  padding: 0 6px;
  font-size: 14px;
}


/* Orders */
.ordx-page{
    padding:20px;
}

.ordex-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.ordex-add-btn {
  padding: 10px 15px;
  background: var(--gold);
  color: black;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}

.ordex-filter-new {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Each field */
.ordex-filter-new .filter-group {
  position: relative;
}

/* Input + Select same style */
.ordex-filter-new input,
.ordex-filter-new select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: #fff;
  min-width: 180px;
  transition: 0.2s;
}

/* Button */
.ordex-filter-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--black);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.ordex-filter-btn:hover {
  background: #333;
}


.ordex-select-wrapper {
  position: relative;
}

/* Remove default arrow */
.ordex-select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 35px;
}

/* Custom arrow */
.ordex-select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
  pointer-events: none;
}

/* TABLE */
.ordx-table-box{
    background:#fff;
    border-radius:12px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    overflow:hidden;
}

.ordx-table{
    width:100%;
    border-collapse:collapse;
}

.ordx-table th{
    background:#f8f9fa;
    padding:14px;
    text-align:center;
    font-size:14px;
    font-weight:700;
}

.ordx-table td{
    padding:14px;
    border-top:1px solid #eee;
    font-size:14px;
    text-align: center;
}

/* STATUS */
.ordx-status{
    padding:6px 12px;
    border-radius:8px;
    font-size:12px;
    font-weight:700;
    text-decoration:none;
    display:inline-block;
}

.ordx-status.pending{
    background:#fef3c7;
    color:#b45309;
}

.ordx-status.progress{
    background:#dbeafe;
    color:#1d4ed8;
}

.ordx-status.completed{
    background:#dcfce7;
    color:#15803d;
}

.ordx-status.delivered{
    background:#ede9fe;
    color:#6d28d9;
}

.notes-row {
    display: none;
}

.notes-row td {
    padding: 0;
    border: none;
}

.ordx-table tr {
    border-bottom: 1px solid #eee;
}

.notes-box {
    margin: 8px 0;
    padding: 12px;
    background: #f4f7fb;
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    font-size: 14px;
}

.toggle-arrow {
    margin-left: 6px;
    cursor: pointer;
    font-size: 12px;
}

.notes-row {
    display: none;
}

.notes-box {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ACTION */
.ordx-actions{
    display:flex;
    gap:8px;
    text-align: center;
}

/* Action buttons */
.ordx-actions{
    display:flex;
    gap:8px;
    justify-content:center;
    align-items:center;
}

.ordx-btn.delete{
    background:#ff4d4f;
    color:#fff;
    border:none;
    cursor:pointer;
}

.ordx-btn.delete:hover{
    background:#d9363e;
}

.ordx-btn.bill{
    background: #2563eb;
    color: white;
}

.ordx-btn.bill i{
    color: white;
    font-size: 15px;
}

/* Modal */
.ordx-modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.ordx-modal-content{
    background:#fff;
    padding:30px;
    border-radius:14px;
    width:350px;
    text-align:center;
}

.confirm-delete{
    background:#ff4d4f;
    color:#fff;
    border:none;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
    margin-right:10px;
}

.cancel-delete{
    background:#ccc;
    border:none;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
}

.ordx-btn{
    width:34px;
    height:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    color:#fff;
    text-decoration:none;
}

.ordx-btn.edit{
    background:#f59e0b;
}

/* EMPTY */
.ordx-empty{
    text-align:center;
    padding:20px;
    color:#888;
}

/* PAGINATION */
.ordx-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:14px;
    margin-top:24px;
}

.ordx-nav{
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
    color:#fff;
}

.ordx-nav.prev{
    background:#4b5563;
}

.ordx-nav.next{
    background:#ef4444;
}

.ordx-nav.disabled{
    background:#d1d5db;
    color:#666;
}

.ordx-page-info{
    background:#111827;
    color:#fff;
    padding:10px 18px;
    border-radius:10px;
    font-weight:600;
}

/* MOBILE */
@media (max-width:1100px){

    .ordx-topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .ordx-filter-bar{
        width:100%;
        flex-direction:column;
        align-items:stretch;
    }

    .ordx-filter-bar input,
    .ordx-filter-bar select,
    .ordx-filter-bar button,
    .ordx-add-btn{
        width:100%;
    }

    .ordx-table-box{
        overflow-x:auto;
    }

    .ordx-table{
        min-width:1100px;
    }
}


/* New add-order */
/* ITEMS SECTION */
.order-items-card{
    margin-top:30px;
}

/* GRID */
.items-grid{
    display:grid;
    grid-template-columns:
        1.2fr
        1fr
        1fr
        120px
        140px
        140px
        120px;

    gap:14px;
    align-items:end;
    margin-top:15px;
}

/* INPUTS */
.items-grid select,
.items-grid input{
    width:100%;
    height:56px;
    border:1px solid #d8dce5;
    border-radius:14px;
    padding:0 18px;
    font-size:15px;
    background:#fff;
}

/* ADD BUTTON */
.add-item-btn{
    height:56px;
    border:none;
    border-radius:14px;
    background:#d4af37;
    color:#000;
    font-weight:700;
    font-size:18px;
    cursor:pointer;
}

/* TABLE */
.order-items-table{
    width:100%;
    border-collapse:collapse;
    margin-top:25px;
    overflow:hidden;
    border-radius:16px;
}

.order-items-table th{
    background:#efe2a3;
    padding:18px;
    font-size:18px;
}

.order-items-table td{
    padding:18px;
    border-top:1px solid #eee;
    text-align:center;
}

/* SUMMARY */
.payment-summary-card{
    margin-top:35px;
}

.summary-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
}

/* MOBILE */
@media(max-width:1100px){

    .items-grid{
        grid-template-columns:1fr 1fr;
    }

    .summary-grid{
        grid-template-columns:1fr;
    }
}

@media(max-width:700px){

    .items-grid{
        grid-template-columns:1fr;
    }
}



/* =========================
   STATUS BADGES
========================= */
.status-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

.status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.status-badge.progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-badge.completed {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.delivered {
  background: #ede9fe;
  color: #6d28d9;
}

.status-badge.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.addx-form-grids{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-top: 20px;
}

/* =========================
   ACTION BUTTONS
========================= */
.edit-btn,
.start-btn,
.complete-btn,
.deliver-btn {
  padding: 8px 14px;
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  display: inline-block;
  margin: 3px;
}

.edit-btn {
  background: #f59e0b;
}

.edit-btn:hover {
  background: #d97706;
}

.start-btn {
  background: #2563eb;
}

.complete-btn {
  background: #16a34a;
}

.deliver-btn {
  background: #7c3aed;
}

.done-label {
  color: #15803d;
  font-weight: 700;
}

/* =========================
   PAGINATION
========================= */
.orders-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.orders-pagination a {
  background: var(--gold);
  color: black;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.orders-pagination span {
  font-weight: 700;
  color: #111827;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

  .orders-page {
    padding: 16px;
  }

  .orders-header h1 {
    font-size: 30px;
  }

  .orders-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .add-order-top-btn {
    width: 100%;
    justify-content: center;
  }

  .orders-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-filter input,
  .orders-filter select,
  .orders-filter button,
  .reset-btn {
    width: 100%;
  }

  .orders-pagination {
    flex-direction: column;
  }

  .orders-summary {
    grid-template-columns: 1fr;
  }
}

/* =========================
   ADD ORDER PAGE
========================= */
.add-order-page {
  padding: 28px;
  max-width: 1450px;
  margin: auto;
}

/* =========================
   HEADER CARD
========================= */
.add-order-header {
  background: #ffffff;
  padding: 32px;
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  margin-bottom: 28px;
}

.add-order-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.add-order-header h1 {
  font-size: 58px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.1;
}

.add-order-header p {
  color: #64748b;
  margin-top: 10px;
  font-size: 18px;
}

.back-orders-btn {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  font-size: 17px;
}

.back-orders-btn:hover {
  text-decoration: underline;
}

/* =========================
   FORM CARD
========================= */
.order-form-card {
  background: white;
  padding: 32px;
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

/* =========================
   FORM GRID
========================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.full-width {
  grid-column: span 2;
}

/* =========================
   LABELS
========================= */
.form-group label {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}

/* =========================
   INPUTS
========================= */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  font-size: 15px;
  background: white;
  color: #111827;
  transition: all 0.25s ease;
}



.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* TEXTAREA */
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* READONLY DUE */
.form-group input[readonly] {
  background: #f9fafb;
  color: #6b7280;
}

/* =========================
   PLACEHOLDER
========================= */
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

/* =========================
   BUTTON ROW
========================= */
.order-btn-row {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* SAVE BUTTON */
.save-order-btn {
  background: linear-gradient(135deg, #16a34a, #15803d);
  margin-top: 15px;
  color: white;
  padding: 16px 34px;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.save-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(22,163,74,0.25);
}

/* CANCEL BUTTON */
.cancel-order-btn {
  background: #f3f4f6;
  color: #111827;
  padding: 16px 34px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  border: 1px solid #d1d5db;
  transition: all 0.25s ease;
}

.cancel-order-btn:hover {
  background: #e5e7eb;
}

/* =========================
   STATUS COLORS
========================= */
select[name="status"] {
  font-weight: 700;
}

/* =========================
   DATE INPUT FIX
========================= */
input[type="date"] {
  min-height: 54px;
}

/* =========================
   NUMBER INPUT FIX
========================= */
input[type="number"] {
  min-height: 54px;
}

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 992px) {

  .add-order-page {
    padding: 16px;
  }

  .add-order-header {
    padding: 24px;
  }

  .add-order-header h1 {
    font-size: 40px;
  }

  .add-order-header p {
    font-size: 15px;
  }

  .add-order-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: span 1;
  }

  .order-form-card {
    padding: 22px;
  }

  .order-btn-row {
    flex-direction: column;
  }

  .save-order-btn,
  .cancel-order-btn {
    width: 100%;
    text-align: center;
  }
}


/* Mew Order Add */
/* ===== ADD ORDER PAGE COMPACT FIX ===== */

/* MAIN WRAPPER */
.addx-page{
    max-width:1180px;
    margin:0 auto;
    padding:18px 24px 40px;
}

/* HEADER COMPACT */
.addx-header{
    margin-bottom:18px;
}

.addx-header h1{
    font-size:34px;
    line-height:1.1;
    margin-bottom:6px;
}

.addx-header p{
    font-size:15px;
    margin:0;
}

.addx-back-link{
    display:inline-block;
    margin-top:8px;
    font-size:15px;
}

/* FORM CARD */
.addx-form-card{
    padding:26px 34px;
    border-radius:18px;
}

/* GRID MORE COMPACT */
.addx-form-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:22px 24px;
}

/* LABELS */
.addx-form-group label{
    display:block;
    font-size:15px;
    font-weight:700;
    margin-bottom:8px;
}

/* INPUTS */
.addx-form-group input,
.addx-form-group select,
.addx-form-group textarea{
    width:100%;
    height:52px;
    padding:12px 18px;
    font-size:16px;
    border-radius:14px;
    box-sizing:border-box;
}

/* TEXTAREA */
.addx-form-group textarea{
    min-height:120px;
    height:120px;
    resize:vertical;
    padding-top:16px;
}

/* FULL WIDTH */
.addx-full{
    grid-column:1 / -1;
}

/* BUTTON ROW */
.addx-btn-row{
    display:flex;
    gap:14px;
    margin-top:18px;
}

/* BUTTONS */
.addx-save-btn,
.addx-cancel-btn{
    min-width:170px;
    height:52px;
    border-radius:14px;
    font-size:18px;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}

/* SAVE */
.addx-save-btn{
    background:#16a34a;
    color:#fff;
}

/* CANCEL */
.addx-cancel-btn{
    background:#f3f4f6;
    color:#111827;
}

/* RESPONSIVE */
@media (max-width:992px){
    .addx-form-grid{
        grid-template-columns:1fr;
    }

    .addx-full{
        grid-column:auto;
    }
}

@media (max-width:768px){
    .addx-page{
        padding:14px;
    }

    .addx-header h1{
        font-size:28px;
    }

    .addx-form-card{
        padding:20px;
    }

    .addx-btn-row{
        flex-direction:column;
    }

    .addx-save-btn,
    .addx-cancel-btn{
        width:100%;
    }
}

/* CLICKABLE STATUS */
.status-badge {
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}

.status-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Mobile View */
/* =========================
   MOBILE SIDEBAR
========================= */

.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background: var(--black);
  color: white;
  border: none;
  padding: 10px 12px;
  font-size: 18px;
  border-radius: 8px;
  z-index: 1001;
}

.mobile-logo {
  display: none;
}

/* Mobile View */
@media (max-width: 768px) {

    html,
    body{
        overflow-x:hidden;
    }

    /* APP */
    .app{
        display:block;
    }

    /* TOPBAR */
    .mobile-topbar{
        position:fixed;
        top:0;
        left:0;
        width:100%;
        height:65px;
        background:var(--black);
        z-index:9999;

        display:flex;
        align-items:center;
        justify-content:space-between;

        padding:0 18px;
    }

    /* LOGO */
    .mobile-logo{
        width:55px;
        height:auto;
        display:block;
    }

    .menu-toggle:hover,
    .menu-toggle:focus,
    .menu-toggle:active{
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    /* TOGGLE */
    .menu-toggle{
        background:none;
        border:none;
        color:#fff;

        font-size:32px;
        cursor:pointer;

        display:flex;
        align-items:center;
        justify-content: right;

        padding:0 40px;
    }

    /* SIDEBAR */
    .sidebar{
        position:fixed !important;
        top:0;
        left:-260px !important;

        width:260px;
        height:100vh;

        background:var(--black);

        z-index:10000;

        transition:0.3s ease;

        overflow-y:auto;
    }

    .sidebar.active{
        left:0 !important;
    }

    /* OVERLAY */
    .overlay{
        display:none;
    }

    .overlay.show{
        display:block;
        position:fixed;
        inset:0;
        background:rgba(0,0,0,0.5);
        z-index:9998;
    }

    /* MAIN */
    .main{
        margin-left:0 !important;
        width:100%;

        padding:
            85px
            14px
            20px
            14px;

        min-height:100vh;

        overflow-y:auto;
    }

    /* FIX SCROLL */
    body{
        overflow-y:auto !important;
    }
}

@media (max-width: 768px) {

    /* Hide hamburger when sidebar open */
    .sidebar.active ~ .main .menu-toggle {
        opacity: 0;
        pointer-events: none;
    }

}

/* =========================
   MOBILE FULL RESPONSIVE FIX
========================= */


@media (max-width: 768px) {

  /* App layout */
  .app {
    display: block;
  }

  .main {
    width: 100%;
    padding: 70px 12px 20px;
    margin-left: 0;
  }

  /* Dashboard */
  .dash-container {
    padding: 10px;
  }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dash-header h1 {
    font-size: 22px;
  }

  .dash-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .dash-actions a,
  .dash-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Dashboard cards */
  .dash-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dash-card {
    width: 100%;
  }

  /* Bottom dashboard boxes */
  .dash-bottom {
    grid-template-columns: 1fr;
  }

  /* Tables */
  .customers-table-box,
  .reports-table-box,
  .history-card,
  .offer-history-card,
  .ordx-table-box {
    overflow-x: auto;
    width: 100%;
  }

  .customers-table,
  .reports-table,
  .history-table,
  .offer-history-table,
  .ordx-table {
    min-width: 900px;
  }

  /* Forms */
  .settings-grid,
  .bill-item-input,
  .auto-bill-box,
  .extra-charge-box,
  .customers-filter-new,
  .reports-filter-new,
  .ordex-filter-new {
    grid-template-columns: 1fr !important;
    display: grid;
    width: 100%;
  }

  /* Inputs */
  input,
  select,
  button,
  textarea {
    width: 100%;
    font-size: 16px;
  }

  /* Billing */
  .bill-search-row {
    grid-template-columns: 1fr;
  }

  #customerInput {
    width: 100%;
  }

  .bill-add-btn,
  .bill-submit-btn {
    width: 100%;
  }

  /* Modal */
  .modal-content,
  .popup-content,
  .ordx-modal-content {
    width: 92%;
    max-width: 400px;
  }

  /* Pagination */
  .pagination,
  .paginations,
  .orders-pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Logo smaller */
  .sidebar-logo img {
    width: 55px;
  }

  .sidebar-logo h3 {
    font-size: 16px;
  }
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

@media (max-width:768px){

    .staff-table{
        width:100%;
        display:block;
        overflow-x:auto;
    }

    .staff-table table{
        min-width:650px;
    }

    .staff-table td,
    .staff-table th{
        white-space:nowrap;
    }

    .staff-actions{
        display:flex;
        gap:8px;
        flex-wrap:nowrap;
    }

    .staff-actions a,
    .staff-actions button{
        font-size:14px;
        padding:8px 12px;
    }
}


/* DUE BADGE */
.due-clickable{
    cursor: pointer;
    transition: 0.2s;
}

.due-clickable:hover{
    transform: scale(1.05);
    opacity: 0.9;
}

/* MODAL BACKDROP */
.due-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);

    display: none;
    justify-content: center;
    align-items: center;

    z-index: 9999;
    padding: 20px;
}

/* MODAL BOX */
.due-modal-content{
    width: 100%;
    max-width: 420px;

    background: #ffffff;

    border-radius: 18px;

    padding: 28px;

    border-top: 5px solid var(--gold);

    box-shadow:
      0 10px 35px rgba(0,0,0,0.12);
}

/* TITLE */
.due-modal-content h3{
    margin-bottom: 22px;

    color: var(--black);

    font-size: 28px;
    font-weight: 700;
}

/* INFO AREA */
.due-info{
    background: #fffaf0;

    border: 1px solid #f5e6a7;

    border-radius: 12px;

    padding: 16px;

    margin-bottom: 20px;
}

.due-info p{
    margin: 8px 0;

    color: #333;

    font-size: 16px;
}

.due-info strong{
    color: var(--black);
}

/* INPUT */
.due-modal-content input{
    width: 100%;

    padding: 14px 16px;

    border-radius: 12px;

    border: 1px solid #ddd;

    font-size: 16px;

    transition: 0.2s;

    outline: none;
}

.due-modal-content input:focus{
    border-color: var(--gold);

    box-shadow:
      0 0 0 3px rgba(212,175,55,0.18);
}

/* BUTTONS */
.due-modal-actions{
    display: flex;
    gap: 10px;

    margin-top: 24px;
}

/* COMMON BUTTON */
.due-modal-actions button{
    flex: 1;

    padding: 12px;

    border: none;

    border-radius: 10px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

/* FULL PAY */
.due-modal-actions button:nth-child(1){
    background: linear-gradient(
      135deg,
      var(--gold),
      #c49b2c
    );

    color: #111;
}

/* SUBMIT */
.due-modal-actions button:nth-child(2){
    background: linear-gradient(
      135deg,
      #16a34a,
      #15803d
    );

    color: white;
}

/* CANCEL */
.due-modal-actions button:nth-child(3){
    background: #efefef;

    color: #444;
}

/* HOVER */
.due-modal-actions button:hover{
    transform: translateY(-1px);

    opacity: 0.95;
}








.page-number{
    padding:10px 16px;
    background:#f1f1f1;
    border-radius:10px;
    text-decoration:none;
    color:#111;
    font-weight:600;
}

.page-number.active{
    background:#111;
    color:#fff;
}

.page-number:hover {
  background: gray;
}



.staff-table{
    width:100%;
    border-collapse:collapse;
}

.staff-table th,
.staff-table td{
    padding:14px;
    border-bottom:1px solid #ddd;
    text-align:center;
}

.active-badge{
    background:#d4f7d4;
    color:green;
    padding:6px 12px;
    border-radius:20px;
    font-size:14px;
}

.blocked-badge{
    background:#ffd6d6;
    color:red;
    padding:6px 12px;
    border-radius:20px;
    font-size:14px;
}

.btn-block,
.btn-unblock{
    padding:8px 16px;
    border-radius:8px;
    text-decoration:none;
    color:white;
    font-size:14px;
}

.btn-block{
    background:#e74c3c;
}

.btn-unblock{
    background:#27ae60;
}

.staff-actions{
    display:flex;
    gap:10px;
    align-items:center;
}

.staff-actions{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
}

.staff-actions a,
.staff-actions button{
    width:110px;
    height:42px;
    border:none;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:16px;
    cursor:pointer;
}

.btn-edit:hover {
  background: gray;
}

.staff-actions button{
  margin-bottom: 10px;
}

.btn-delete{
    background:#e74c3c;
    color:white;
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}

.password-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.5);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.password-modal-content{
    background:white;
    padding:30px;
    border-radius:16px;
    width:350px;
    position:relative;
}

.close-modal{
    position:absolute;
    right:15px;
    top:10px;
    font-size:28px;
    cursor:pointer;
}

.staff-name{
    margin-bottom:15px;
    font-weight:600;
}

.delete-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.5);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.delete-modal-content{
    width:380px;
    background:white;
    border-radius:18px;
    padding:30px;
    text-align:center;
    position:relative;
    animation:popup .2s ease;
}

.delete-text{
    margin:20px 0;
    font-size:17px;
    color:#444;
}

.delete-actions{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:20px;
}

.cancel-btn{
    background:#ddd;
    border:none;
    padding:10px 22px;
    border-radius:10px;
    cursor:pointer;
}

.cancel-btn:hover {
  background:gray ;
}

.confirm-delete-btn{
    background:#e74c3c;
    color:white;
    padding:10px 22px;
    border-radius:10px;
    text-decoration:none;
}

.staff-user-info{
    display:flex;
    align-items:center;
    gap:10px;
}

.online-dot{
    width:5px;
    height:5px;
    border-radius:50%;
    background:#00d26a;
    margin-top: 5px;

    box-shadow:
        0 0 5px #00d26a,
        0 0 10px #00d26a,
        0 0 18px #00d26a;

    animation:pulseGlow 1.5s infinite;
}

.offline-dot{
    width:5px;
    height:5px;
    border-radius:50%;
    background:#ff3b30;
    margin-top: 5px;

    box-shadow:
        0 0 5px #ff3b30,
        0 0 10px #ff3b30;
}

@keyframes pulseGlow{
    0%{
        transform:scale(1);
        opacity:1;
    }

    50%{
        transform:scale(1.2);
        opacity:.7;
    }

    100%{
        transform:scale(1);
        opacity:1;
    }
}


/* =========================================
   CLEAN BILLING LAYOUT
========================================= */

.bill-item-input{
    display:flex;
    flex-direction:column;
    gap:18px;
}

/* Titles */
.bill-field-title{
    display:flex;
    flex-direction:center;
    gap:12px;
}



.bill-field-title label,
.bill-field-title h3{
    font-size:20px;
    font-weight:700;
    color:#111827;
}

/* Billing dropdown */
.billing-mode-box{
    width:320px;
}

/* 5 columns */
/* NORMAL = 4 columns */
.billing-grid-normal{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:20px;
    margin-top:20px;
}

/* DIGITAL = 5 columns */
.billing-grid-digital{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:20px;
    margin-top:20px;
}

/* Price Row */
.auto-bill-box{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}

/* Extra Row */
.extra-charge-box{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:16px;
}

/* Add Button */
.bill-add-btn{
    width:260px;
}

/* Remove old broken styles */
#itemQty{
    grid-column:auto;
}

/* MOBILE */
@media(max-width:768px){

    .billing-grid{
        grid-template-columns:1fr;
    }

    .auto-bill-box{
        grid-template-columns:1fr;
    }

    .extra-charge-box{
        grid-template-columns:1fr;
    }

    .billing-mode-box{
        width:100%;
    }

    .bill-add-btn{
        width:100%;
    }
}

.billing-type-row{
    display:flex;
    align-items:center;
    gap:20px;
    margin-bottom:30px;
}

.billing-type-row label{
    font-size:20px;
    font-weight:700;
    min-width:220px;
}

.billing-type-row select{
    width:250px;
    height:50px;
    border-radius:18px;
    padding:0 20px;
}


/* NORMAL */
.items-grid-normal{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:20px;
    margin-bottom:20px;
}


/* DIGITAL */
.items-grid-digital{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:20px;
    margin-bottom:20px;
}


/* INPUTS */
.items-grid-normal select,
.items-grid-normal input,
.items-grid-digital select,
.items-grid-digital input,
.price-row input{

    width:100%;
    height:50px;

    border:1px solid #cfd5df;
    border-radius:18px;

    padding:0 20px;

    font-size:18px;

    background:white;
}


/* PRICE ROW */
.price-row{
    display:grid;
    grid-template-columns: 1fr 1fr 220px;
    gap:20px;
    align-items:center;
}


/* BUTTON */
.add-item-btn{

    height:50px;

    border:none;
    border-radius:18px;

    background:#d8b037;

    color:black;

    font-size:25px;
    font-weight:700;

    cursor:pointer;

    transition:0.3s;
}

.add-item-btn:hover{
    transform:translateY(-2px);
}


.billing-top-row{
    display:grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap:30px;
    align-items:end;
    margin-bottom:20px;
}

.billing-top-row > div{
    width:100%;
}

.billing-top-row label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

.billing-top-row select{
    width:100%;
}

.items-grid.edit{
    display:grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap:30px;
    align-items:end;
    margin-bottom:20px;
    width: 50% !important;
}

.items-grid.edit{
    display:grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap:15px;
}




.items-grid{
    display:grid;
    gap:18px;
    margin-bottom:18px;
}

.top-grid select,
.top-grid input,
.digital-grid select,
.digital-grid input,
.bottom-grid input{
    width:100%;
    height:62px;
    border:1px solid #cfd6e4;
    border-radius:20px;
    padding:0 20px;
    font-size:18px;
    background:#fff;
    outline:none;
    box-sizing:border-box;
}

.bottom-grid{
    align-items:center;
}

.add-item-btn{
    height:62px;
    border:none;
    border-radius:20px;
    font-size:24px;
    font-weight:700;
    background:#d4af37;
    color:#000;
    cursor:pointer;
}

/* NORMAL PRINT */
#normalFields{
    grid-template-columns:repeat(5,1fr);
}

/* DIGITAL PRINT */
#digitalFields{
    grid-template-columns:repeat(7,1fr);
}

.top-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    margin-bottom:20px;
}

.digital-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:18px;
    margin-bottom:20px;
}

.bottom-grid{
    display:grid;
    grid-template-columns:1fr 1fr 220px;
    gap:18px;
    margin-bottom:20px;
}

.items-grid input,
.items-grid select,
.items-grid button{
    width:100%;
    height:58px;
    border-radius:18px;
}

.add-item-btn{
    background:#d4af37;
    color:#000;
    font-weight:700;
    border:none;
}



/* Order */
.clear-btn{
    background:#b9b9b9;
    color:#000;
    padding:12px 25px;
    border-radius:10px;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.ordx-status.quotation{
    background:#fff4d6;
    color:#c58b00;
}


.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1) { width: 7%; }

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) { width: 58%; }

.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3) { width: 10%; }

.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) { width: 12%; }

.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) { width: 13%; }


.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 52px !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 14px !important;
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
}

.select2-container .select2-selection__rendered {
    line-height: normal !important;
    font-size: 18px !important;
    color: #222 !important;
    padding-left: 0 !important;
}

.select2-container .select2-selection__arrow {
    height: 52px !important;
    right: 10px !important;
}

.select2-dropdown {
    border-radius: 15px !important;
    overflow: hidden;
}

.select2-search__field {
    padding: 10px !important;
    border-radius: 10px !important;
}

.ordx-status.cancelled{
    background:#ffe5e5;
    color:#d10000;
}