/* ===== Color system (edit these if you want a different blue) ===== */
:root{
  --primary:#1e40af;          /* dark blue used everywhere */
  --primary-700:#163a9b;
  --primary-800:#0f2f8a;
  --text-on-primary:#ffffff;
  --success:#10b981;
  --danger:#ef4444;
  --danger-700:#dc2626;
  --muted:#e5e7eb;
  --shadow:0 1px 2px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.08);
}

/* ===== Base ===== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
html,body{height:100%}
body{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font-family:'Roboto', Arial, sans-serif;
  margin:0;
  background:#f8fafc;
  color:#333;
  line-height:1.6;
}

/* ===== Header + Nav: same dark blue ===== */
header{
  background-color:var(--primary);
  color:var(--text-on-primary);
  padding:15px 0;
  text-align:center;
  box-shadow:0 2px 4px rgba(0,0,0,0.1);
  flex-shrink:0;
}
nav ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  justify-content:center;
  background-color:var(--primary);   /* unified color */
  border-top:4px solid var(--primary-800);
  border-bottom:4px solid var(--primary-800);
}
nav ul li{ margin:0 15px; }
nav ul li a{
  color:#fff;
  text-decoration:none;
  padding:12px 16px;
  display:block;
  font-weight:600;
  letter-spacing:.2px;
  border-radius:6px;
  transition:background-color .2s ease, transform .06s ease;
}
nav ul li a:hover{ background-color:var(--primary-700); transform:translateY(-1px); }

/* mobile nav toggle */
.hamburger{ display:none; font-size:24px; cursor:pointer; color:#fff; padding:10px; }
@media (max-width:768px){
  nav{ position:relative; }
  nav ul{
    display:none; flex-direction:column;
    position:absolute; top:50px; left:0; width:100%;
  }
  nav ul.active{ display:flex; }
  .hamburger{ display:block; }
}

/* ===== Content wrapper ===== */
.container,
.app-container{           /* keep both names working */
  max-width:1200px;
  margin:30px auto;
  padding:20px;
  background:#fff;
  border-radius:8px;
  box-shadow:0 4px 8px rgba(0,0,0,.1);
  position:relative;
  z-index:1;
}
.container:hover,
.app-container:hover{ transform:translateY(-3px); }

/* Index/hero polish (works without HTML changes) */
.container h1, .app-container h1{
  text-align:left;
  color:var(--primary);
  font-weight:700;
  margin:0 0 12px;
  font-size:clamp(28px,3.2vw,42px);
}
.container > a:not([class]),
.container p > a:not([class]){ /* plain links inside content look like CTA buttons */
  display:inline-block;
  margin:8px 10px 0 0;
  padding:.55rem .9rem;
  background:var(--primary);
  color:#fff !important;
  text-decoration:none;
  border-radius:.5rem;
  box-shadow:var(--shadow);
  transition:transform .06s, box-shadow .2s, background .2s;
}
.container > a:not([class]):hover,
.container p > a:not([class]):hover{ background:var(--primary-700); transform:translateY(-1px); }

/* ===== Sections ===== */
.section{ margin-bottom:20px; padding:15px; border-radius:6px; background:#f9fafb; }
.section h2{ cursor:pointer; background:#e5e7eb; padding:10px; margin:0; border-radius:4px; font-weight:500; color:var(--primary); }

/* ===== Forms ===== */
input, textarea, select{
  width:100%;
  padding:.6rem .75rem;
  margin:4px 0;
  box-sizing:border-box;
  border:1px solid #cbd5e1;
  border-radius:.5rem;
  font-size:14px;
  background:#fff;
  transition:border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus{
  outline:0;
  border-color:#60a5fa;
  box-shadow:0 0 0 3px rgba(59,130,246,.2);
}
textarea{ height:100px; resize:vertical; }

/* ===== Quotation Items table fit ===== */
table{ width:100%; border-collapse:collapse; margin-bottom:15px; }
th, td{ padding:10px; text-align:left; border-bottom:1px solid #e5e7eb; }
th{ background:var(--primary); color:#fff; font-weight:500; }

/* Make items table behave on all screens */
#items-table{ table-layout:fixed; width:100%; }
#items-table th:nth-child(1), #items-table td:nth-child(1){ width:60px; }        /* SrNo */
#items-table th:nth-child(2), #items-table td:nth-child(2){ width:38%; }        /* Description */
#items-table th:last-child,   #items-table td:last-child{ width:60px; text-align:center; } /* action */
#items-table input{ width:100%; min-width:0; }
#items-table td, #items-table th{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* On small screens allow horizontal scroll instead of wrapping mess */
@media (max-width:992px){
  #items-table{ display:block; overflow-x:auto; }
  #items-table td, #items-table th{ white-space:nowrap; }
}

/* ===== Buttons (global polish) ===== */
button,
.action-btn, .edit-btn, .delete-btn, .remove-btn, .remove-row,
.btn{
  -webkit-appearance:none; appearance:none;
  border:0;
  border-radius:.6rem;
  padding:.6rem .9rem;
  background:var(--primary);
  color:#fff;
  font-weight:600;
  line-height:1;
  box-shadow:var(--shadow);
  transition:transform .06s ease, box-shadow .2s ease, background-color .2s ease;
}
button:hover,
.action-btn:hover, .btn:hover{ background:var(--primary-700); transform:translateY(-1px); }
button:active,
.action-btn:active, .btn:active{ transform:translateY(0); box-shadow:var(--shadow); }
button:focus, .btn:focus{ outline:2px solid #93c5fd; outline-offset:2px; }

/* keep your semantic colors */
.edit-btn{ background:var(--success); }
.edit-btn:hover{ background:#059669; }
.delete-btn, .remove-btn, .remove-row{ background:var(--danger); }
.delete-btn:hover, .remove-btn:hover, .remove-row:hover{ background:var(--danger-700); }

/* Button group containers */
.button-container{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:20px; }
@media (max-width:768px){
  .button-container{ flex-direction:column; align-items:center; }
  .action-btn, .btn{ width:100%; max-width:240px; }
}

/* ===== Footer (no overlay) ===== */
footer{
  background-color:var(--primary);
  color:#fff;
  padding:12px 0;
  width:100%;
  box-shadow:0 -2px 4px rgba(0,0,0,.1);
  display:flex; justify-content:center; gap:15px;
  position:relative;           /* not fixed; no overlap */
  flex-shrink:0;
  z-index:0;
}
footer div{ flex:1; max-width:250px; }
footer h3{ font-size:13px; margin:0 0 4px; }
footer p, footer a{ font-size:11px; margin:2px 0; }
footer a{ color:#93c5fd; text-decoration:none; }
footer a:hover{ text-decoration:underline; }

/* ===== Mobile misc ===== */
@media (max-width:768px){
  .container, .app-container{ margin:15px; padding:15px; }
  .custom-field{ flex-direction:column; align-items:flex-start; }
  .custom-field label{ flex:none; }
}
/* ---- Mobile nav: always on top & scrollable ---- */
:root{
  --header-h: 56px; /* tweak if your header is taller/shorter */
}

header{
  position: sticky;     /* keeps header visible */
  top: 0;
  z-index: 5000;        /* above page content */
  min-height: var(--header-h);
}

nav{ position: relative; z-index: 5001; }

@media (max-width: 768px){
  nav ul{
    /* overlay the page instead of sitting behind it */
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;

    display: none;          /* toggled by .active from your JS */
    flex-direction: column;

    background: var(--primary);
    border-bottom: 4px solid var(--primary-800);
    padding: 8px 0;

    z-index: 6000;          /* higher than .container (z-index:1) */
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;       /* scroll menu if it’s tall */
  }
  nav ul.active{ display: flex; }
}

/* === Drafts page normalization (matches site look) === */



