* { box-sizing: border-box; font-family: 'Hind Siliguri', Arial, sans-serif; }
body { margin:0; background:#f2f4f7; }

/* Header */
header{
  background:#0d6efd;
  color:#fff;
  padding:14px;
  text-align:center;
  font-size:18px;
  font-weight:bold;
}

/* Layout */
.container{ padding:12px; }

/* Card */
.card{
  background:#fff;
  border-radius:12px;
  margin-bottom:12px;
  box-shadow:0 4px 8px rgba(0,0,0,.08);
  overflow: hidden; /* Ensures color stays inside rounded corners */
}

/* Accordion */
.accordion{
  padding:14px;
  cursor:pointer;
  font-weight:bold;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #eee;
  background: #fdfdfd;
}
.accordion:hover { background: #f8f9fa; }
.accordion span{ font-size:18px; }

/* Panel - Defaulted Dashboard to Block for better UX */
.panel{ display:none; padding:14px; }
.panel-active { display: block; } 

/* Dashboard */
.dashboard{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px;
}
.stat{
  padding:12px;
  border-radius:10px;
  color:#fff;
  text-align:center;
}
.sales{ background:#198754;}
.expense{ background:#dc3545;}
.profit{ background:#0d6efd;}
.due{ background:#fd7e14;}

/* Form Improvements */
.form-row { display: flex; gap: 8px; }
label{ font-size:14px; font-weight:bold;}
input,select{
  width:100%;
  padding:12px; /* Slightly larger for touch friendliness */
  margin:6px 0 12px;
  border-radius:8px;
  border:1.5px solid #ddd;
  outline: none;
}
input:focus { border-color: #0d6efd; }

/* Buttons */
button{
  padding:8px 12px;
  border:none;
  border-radius:6px;
  background:#0d6efd;
  color:#fff;
  cursor:pointer;
  font-size:13px;
  transition: 0.2s;
}
button:active { transform: scale(0.96); }
.btn-danger{ background:#dc3545;}
.btn-warning{ background:#fd7e14;}
.full{ width:100%; padding:14px; font-size:15px; font-weight:bold; margin-top: 5px;}

/* Table */
.table-responsive { overflow-x: auto; }
table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
th,td{
  border:1px solid #eee;
  padding:10px 8px;
  text-align:center;
}
th{ background:#f8f9fa; color: #666; }

hr{ border: 0; border-top: 1px solid #eee; margin:16px 0; }
/* Print Specific Styles */
@media print {
  body * { visibility: hidden; }
  #print-section, #print-section * { visibility: visible; }
  #print-section {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
    color: #000;
  }
  .no-print { display: none !important; }
}

/* Modal/Popup for Invoice Preview */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  text-align: center;
}
.invoice-box {
  text-align: left;
  border: 1px dashed #333;
  padding: 15px;
  margin-top: 10px;
  font-family: 'Courier New', Courier, monospace;
}

/* Full Screen Loader */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d6efd, #084298);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* Loader Content */
.loader-box {
  text-align: center;
  color: #fff;
  animation: fadeIn 0.6s ease-in-out;
}

.loader-box h2 {
  margin: 15px 0 5px;
  font-size: 24px;
  letter-spacing: 1px;
}

.loader-box p {
  font-size: 14px;
  opacity: 0.9;
}

/* Spinner */
.spinner {
  width: 55px;
  height: 55px;
  border: 5px solid rgba(255,255,255,0.3);
  border-top: 5px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}


/* for header part */
/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d6efd;
  color: #fff;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Left */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.company-name {
  font-weight: 600;
  font-size: 16px;
}

/* Right */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Icon Buttons */
.icon-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 110%;
  background: #fff;
  color: #333;
  min-width: 180px;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: #f1f5f9;
}

.dropdown-menu hr {
  margin: 5px 0;
  border: none;
  border-top: 1px solid #eee;
}

.dropdown-menu.right {
  right: 0;
}

.dropdown-menu .danger {
  color: #dc3545;
}

/* Mobile Adjust */
@media (max-width: 600px) {
  .company-name {
    display: none;
  }
}

/* header part end */