/* =====================
   PLATFORM (DARK THEME)
===================== */
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top left, #0f172a, #020617);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #e5e7eb;
}

/* =====================
   MAIN LAYOUT
===================== */
.wrapper {
  width: 1150px;
  margin: 40px auto;
  display: flex;
  gap: 30px;
}

/* =====================
   FORM PANEL
===================== */
.form {
  width: 35%;
  background: linear-gradient(
    180deg,
    rgba(30,41,59,0.96),
    rgba(15,23,42,0.96)
  );
  padding: 26px;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.form h2 {
  color: #f8fafc;
}

.form input,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
}

.form button {
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #020617;
  transition: 0.25s;
}

.form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(34,211,238,0.35);
}

/* =====================
   INVOICE (WHITE – PRINT SAFE)
===================== */
.invoice {
  width: 65%;
  background: #ffffff;
  color: #0f172a;
  padding: 35px;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  overflow: hidden;
}

/* =====================
   WATERMARK (FIXED)
===================== */
.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.watermark img {
  width: 260px;
  max-width: 260px;
}

/* =====================
   HEADER
===================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #0f172a;
  padding-bottom: 15px;
  position: relative;
  z-index: 1;
}

.invoice-title {
  font-size: 26px;
  font-weight: 700;
}

/* =====================
   META
===================== */
.meta {
  display: flex;
  justify-content: space-between;
  margin: 22px 0;
  font-size: 14px;
}

/* =====================
   TABLE
===================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #0f172a;
  color: #ffffff;
  padding: 12px;
  font-size: 14px;
}

td {
  padding: 14px;
  border: 1px solid #cbd5e1;
}

.amount-col {
  min-width: 160px;
  text-align: right;
}


/* =====================
   TOTAL
===================== */
.total {
  margin-top: 24px;
  text-align: right;
  font-size: 20px;
  font-weight: bold;
}

/* =====================
   QR
===================== */
.qr-code {
  margin-top: 22px;
  text-align: right;
}

.qr-code img {
  width: 190px;
}

/* =====================
   NOTE
===================== */
.note {
  margin-top: 30px;
  font-size: 13px;
  color: #475569;
  text-align: center;
}

/* =====================
   PRINT PERFECT (A4)
===================== */
@media print {

  @page {
    size: A4;
    margin: 0;          /* browser margins hatao */
  }

  html, body {
    width: 210mm;       /* full A4 size */
    height: 297mm;
    margin: 0;
    padding: 0;
  }

  body {
    background: white;
  }

  body * {
    visibility: hidden;
  }

  .invoice,
  .invoice * {
    visibility: visible;
  }

  .invoice {
    position: absolute;   
    box-shadow: none;
    border-radius: 0;
    width: 100%;          /* full page width */
    max-width: 100%;
    height: 100%;         /* optional: full height */
    padding: 15mm;        /* andar ka margin */
    box-sizing: border-box;
  }

  .watermark {
    opacity: 0.04;
  }

  .watermark img {
    width: 240px;
  }
}
/* =====================
   PLATFORM ACCENT COLORS
===================== */
:root {
  --blue-main: #1e3a8a;   /* Dark Blue */
  --blue-glow: #2563eb;
  --red-main: #dc2626;    /* Red Accent */
  --red-glow: #ef4444;
}

/* =====================
   FORM PANEL GLOW
===================== */
.form {
  border: 1px solid rgba(37,99,235,0.25);
  position: relative;
}

.form::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(220,38,38,0.35),
    rgba(37,99,235,0.35),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.form:hover::before {
  opacity: 1;
}

/* =====================
   INPUT HOVER EFFECT
===================== */
.form input:hover,
.form textarea:hover {
  border-color: var(--red-main);
}

/* =====================
   PRIMARY BUTTON (BLUE → RED)
===================== */
.form button {
  background: linear-gradient(
    135deg,
    var(--blue-main),
    var(--red-main)
  );
  color: #ffffff;
}

.form button:hover {
  background: linear-gradient(
    135deg,
    var(--red-main),
    var(--blue-main)
  );
  box-shadow:
    0 0 0 1px rgba(220,38,38,0.4),
    0 18px 45px rgba(220,38,38,0.45);
}

/* =====================
   SECONDARY / ACTION BUTTON
===================== */
.form button.secondary {
  background: linear-gradient(
    135deg,
    #020617,
    var(--blue-main)
  );
  border: 1px solid rgba(37,99,235,0.5);
}

.form button.secondary:hover {
  background: linear-gradient(
    135deg,
    var(--blue-main),
    var(--red-main)
  );
}

/* =====================
   WHATSAPP BUTTON (RED TOUCH)
===================== */
.whatsapp-btn {
  background: linear-gradient(
    135deg,
    #16a34a,
    var(--red-main)
  ) !important;
  color: white !important;
}

.whatsapp-btn:hover {
  box-shadow: 0 15px 40px rgba(239,68,68,0.45);
}

/* =====================
   SUBTLE SECTION HOVER
===================== */
.form h2 {
  position: relative;
}

.form h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 6px;
  background: linear-gradient(
    90deg,
    var(--blue-main),
    var(--red-main)
  );
  border-radius: 2px;
}
/* =====================
   DATE PICKER ICON FIX
===================== */
input[type="date"] {
  color: #f8fafc;
  background-color: #020617;
}

/* Date text parts */
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: #f8fafc;
}

/* ✅ Calendar icon visible (Chrome / Edge / Brave) */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  opacity: 1;
  cursor: pointer;
}

/* Hover effect */
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.8;
}

/* Focus border (theme match) */
input[type="date"]:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.25);
}

* =====================
   TOTAL BOX – PROFESSIONAL LOOK
===================== */
.total-box {
  margin-top: 30px;
  margin-left: auto;
  width: 320px;
  font-size: 15px;
}

.total-box .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.total-box .row span:last-child {
  min-width: 120px;
  text-align: right;
}

.total-box .divider {
  border-top: 2px solid #0f172a;
  margin: 10px 0;
}

.total-box .grand {
  font-size: 18px;
  font-weight: 700;
}





