/* base */
/*
 * Light pastel theme inspired by mobile finance dashboard UI.
 * Override base colors to create a bright, friendly look with soft shadows.
 */
:root{
  /* overall page background */
  --bg:#f9fbfc;
  /* card and surface background */
  --card:#ffffff;
  /* primary text color */
  --fg:#2f3e46;
  /* secondary/muted text */
  --muted:#6e8894;
  /* accent colours used for gradients */
  --accent1:#6BCB77; /* soft green */
  --accent2:#4CC9F0; /* soft blue */
  --accent3:#FF9F1C; /* soft orange */
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans",sans-serif;
  /* flat light background with subtle colour */
  background: var(--bg);
  color:var(--fg);
}

/* Utilities */
.hidden{display:none !important;}
.v-ic{display:inline-flex;align-items:center;justify-content:center;margin-left:6px;width:16px;height:16px;border-radius:50%;background:#1877f2;color:#fff;font-size:11px;line-height:1;vertical-align:middle;}

/* sticky header: use a solid light card with subtle shadow */
.sticky-header{
  position:sticky;
  top:0;
  z-index:1000;
  backdrop-filter:none;
  background:#000;
  border-bottom:1px solid rgba(255,255,255,.10);
  box-shadow:0 1px 3px rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  gap:16px;
  padding:10px 16px;
}
.brand a{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.3px;
}

/* navbar with icon bg */
.desktop-nav{ display:flex; gap:10px; flex-wrap:wrap; }
/* nav pills: lighten backgrounds and borders */
.desktop-nav .nav-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:12px;
  text-decoration:none;
  color:var(--muted);
  transition:all .15s ease;
  border:1px solid rgba(0,0,0,.05);
  background: rgba(255,255,255,.6);
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.desktop-nav .nav-pill:hover{
  color:var(--fg);
  background:rgba(255,255,255,.9);
  border-color:rgba(0,0,0,.1);
}
/* icon badge: softer shadows and lighter borders */
.icon-badge{
  width:28px;
  height:28px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:15px;
  line-height:1;
  box-shadow: inset 0 0 4px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.15);
  border:1px solid rgba(0,0,0,.05);
  color:#fff;
}

/* Auth and generic form inputs use soft 3D style */
.auth-form input,
.auth-form select,
.auth-form textarea,
.wallet-form input[type="number"],
.wallet-form select,
.wallet-form input[type="text"],
.wallet-form input[type="email"],
.wallet-form input[type="password"],
.wallet-form input[type="file"]{
  width:100%;
  padding:10px;
  border:1px solid rgba(0,0,0,.05);
  border-radius:10px;
  background:#ffffff;
  color:var(--fg);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.05);
  font-size:14px;
  margin-bottom:10px;
}
.auth-form button.rgb3d-btn,
.wallet-form button.rgb3d-btn {
  width:100%;
}
/* individual icon badge gradients: softened pastel palettes */
.i-feed .icon-badge{ background:linear-gradient(135deg,#a99fff,#a6e5ff); }
.i-chat .icon-badge{ background:linear-gradient(135deg,#ffb6b9,#b5b2ff); }
.i-profile .icon-badge{ background:linear-gradient(135deg,#a6e5ff,#a99fff); }
.i-credit .icon-badge{ background:linear-gradient(135deg,#ffdd87,#ffa3b7); }
.i-gov .icon-badge{ background:linear-gradient(135deg,#8be7c4,#9ccae0); }
.i-market .icon-badge{ background:linear-gradient(135deg,#f4a6d7,#c7a6e4); }
.i-remit .icon-badge{ background:linear-gradient(135deg,#a7dcfb,#9bbefb); }
.i-calc .icon-badge{ background:linear-gradient(135deg,#ffcf86,#9ce8d6); }
.i-tutor .icon-badge{ background:linear-gradient(135deg,#9addff,#88aaff); }
.i-training .icon-badge{ background:linear-gradient(135deg,#d0ffe5,#fef9d7); color:#2f3e46; }
.i-rewards .icon-badge{ background:linear-gradient(135deg,#ffe680,#ffb7a5); color:#2f3e46; }
.i-alarm .icon-badge{ background:linear-gradient(135deg,#c5fff5,#a3efdb); color:#2f3e46; }
.i-reports .icon-badge{ background:linear-gradient(135deg,#d0e5ff,#eedaff); color:#2f3e46; }
.i-admin .icon-badge{ background:linear-gradient(135deg,#ff8fa3,#b29cff); }

/* mobile toggle: light border */
.mobile-toggle{
  margin-left:auto;
  display:none;
  background:none;
  border:1px solid rgba(0,0,0,.1);
  color:var(--fg);
  padding:6px 10px;
  border-radius:10px;
}
.mobile-nav{
  display:none;
  position:absolute;
  right:10px;
  top:54px;
  background:var(--card);
  border:1px solid rgba(0,0,0,.1);
  border-radius:12px;
  padding:8px;
  box-shadow:0 4px 12px rgba(0,0,0,.1);
}
.mobile-nav a{
  display:block;
  color:var(--fg);
  text-decoration:none;
  padding:8px 10px;
  border-radius:8px;
}
.mobile-nav a:hover{
  background:rgba(0,0,0,.05);
}

@media (max-width: 960px){ .desktop-nav{ display:none } .mobile-toggle{ display:block } }

.container{
  max-width:1100px;
  margin:24px auto;
  padding:0 16px;
}
.grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
/* card: white surface with subtle shadow */
.card{
  background:var(--card);
  border:1px solid rgba(0,0,0,.05);
  border-radius:16px;
  padding:18px;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}

/* 3D button: use pastel gradient and softer depth */
.rgb3d-btn{
  position:relative;
  display:inline-block;
  width:100%;
  text-align:center;
  padding:14px 16px;
  border-radius:16px;
  font-weight:700;
  letter-spacing:.3px;
  text-decoration:none;
  color:white;
  background:linear-gradient(135deg, var(--accent1), var(--accent3), var(--accent2));
  background-size:300% 300%;
  animation:flow 6s ease infinite;
  box-shadow:0 6px 12px rgba(0,0,0,.2);
  transform:translateY(0);
  transition:transform .15s ease, box-shadow .15s ease;
  border:none;
}
.rgb3d-btn:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 16px rgba(0,0,0,.25);
}
.rgb3d-btn:active{
  transform:translateY(0);
  box-shadow:0 4px 8px rgba(0,0,0,.2);
}

/* Responsive tweaks for small screens. On phones the admin grid should stack
   into a single column and cards should have slightly smaller padding and
   rounded corners for better fit. */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr !important;
  }
  .card {
    padding: 12px;
    border-radius: 12px;
  }
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@keyframes flow{ 0%{ background-position:0% 50% } 50%{ background-position:100% 50% } 100%{ background-position:0% 50% } }

/*
 * Generic 3D form styling
 *
 * Many pages across the public frontend include simple forms (e.g. profile
 * update, search filters, application forms, etc.) that previously used
 * unstyled browser defaults. To provide a consistent, modern appearance
 * across the site, all native form fields are now given a subtle 3D look.
 * Inputs, selects and textareas receive rounded corners, a light border and
 * an inset shadow to create depth. Submit buttons (and submit‑type inputs)
 * inherit the same rainbow gradient and depth effects as our `rgb3d-btn`.
 *
 * The selectors intentionally exclude file, checkbox and radio inputs so
 * those retain their native styles (file inputs have custom styling
 * elsewhere and checkboxes/radios often require bespoke markup). If you
 * need to opt out of these styles on a particular form, add
 * `class="no-form-3d"` to the form element.
 */
form:not(.no-form-3d) input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
form:not(.no-form-3d) select,
form:not(.no-form-3d) textarea{
  width:100%;
  padding:10px;
  border:1px solid rgba(0,0,0,.05);
  border-radius:10px;
  background:#ffffff;
  color:var(--fg);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.05);
  font-size:14px;
  margin-bottom:10px;
}

/* Target all buttons within a form, not just submit types, so even
   secondary or search buttons carry the same 3D appearance. Inputs of
   type=submit are also covered for compatibility with older markup. */
form:not(.no-form-3d) button,
form:not(.no-form-3d) input[type="submit"]{
  position:relative;
  display:inline-block;
  /* let button width be determined by its content or surrounding layout; remove
     forced 100% width so action bars with multiple buttons can align side by side */
  width:auto;
  text-align:center;
  padding:14px 16px;
  border-radius:16px;
  font-weight:700;
  letter-spacing:.3px;
  text-decoration:none;
  color:white;
  background:linear-gradient(135deg, var(--accent1), var(--accent3), var(--accent2));
  background-size:300% 300%;
  animation:flow 6s ease infinite;
  box-shadow:0 6px 12px rgba(0,0,0,.2);
  transform:translateY(0);
  transition:transform .15s ease, box-shadow .15s ease;
  border:none;
}
form:not(.no-form-3d) button:hover,
form:not(.no-form-3d) input[type="submit"]:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 16px rgba(0,0,0,.25);
}
form:not(.no-form-3d) button:active,
form:not(.no-form-3d) input[type="submit"]:active{
  transform:translateY(0);
  box-shadow:0 4px 8px rgba(0,0,0,.2);
}

/* section titles and small text */
.section-title{
  font-size:18px;
  margin:8px 0 12px;
  color:var(--fg);
}
.small{
  color:var(--muted);
  font-size:13px;
}
/* flash messages: light backgrounds and friendly colours */
.flash{
  padding:10px 12px;
  border-radius:12px;
  margin:10px 0;
}
.flash.ok{
  background:#e9f7ef;
  color:#276749;
  border:1px solid #c6f6d5;
}
.flash.err{
  background:#ffe5e5;
  color:#b91c1c;
  border:1px solid #feb2b2;
}
.site-footer{ padding:24px; text-align:center; color:var(--muted) }
.table{ width:100%; border-collapse: collapse; font-size:14px; }
.table th,.table td{ border-bottom:1px solid rgba(255,255,255,.08); padding:10px; }
.table th{ text-align:left; color:#cfe8ff }


/* === PATCH: Mobile 3-per-line icon buttons === */
.grid.btn-grid { gap: 10px; }

@media (max-width: 640px) {
  .grid.btn-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .rgb3d-btn.micon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 14px;
    width: 100%;
    text-align: center;
  }
  .rgb3d-btn.micon .ico {
    font-size: 18px;
    line-height: 1;
    display: block;
  }
}
@media (max-width: 400px) {
  .rgb3d-btn.micon { font-size: 11px; padding: 8px 6px; }
  .rgb3d-btn.micon .ico { font-size: 16px; }
}

/* === Admin panel redesign === */
/* Apply a vibrant gradient sidebar and colourful cards to the admin section without altering markup */
/* --- Admin layout and sidebar redesign --- */
/* The admin area uses a two‑column layout: a narrow sidebar on the left and a content area on the right. */
.admin-layout{
  display:flex;
  min-height:100vh;
}
/* Sidebar: fixed width, semi‑transparent blue with a subtle blur. */
.admin-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  width:240px;
  overflow-y:auto;
  /* Remove top padding so the sidebar aligns directly underneath the header. */
  padding-top:0;
  /* translucent blue background with blur to allow content behind to softly show through */
  background:rgba(2,122,255,0.4);
  backdrop-filter: blur(10px);
  color:#fff;
  border:none;
  border-radius:0;
  position:relative;
}
/* Branding and user info inside the sidebar */
.admin-sidebar::before{
  content:'M/s Sarker & sons\A POS / BMS Suite';
  white-space:pre;
  display:block;
  font-weight:700;
  font-size:18px;
  line-height:1.2;
  padding:0 16px 12px;
  border-bottom:1px solid rgba(255,255,255,0.2);
}
.admin-sidebar::after{
  content:'👤 Super Admin (super_admin)';
  display:block;
  font-size:14px;
  padding:12px 16px;
  border-bottom:1px solid rgba(255,255,255,0.15);
}
.admin-sidebar nav{
  margin-top:8px;
}
.admin-sidebar nav a{
  display:flex;
  align-items:center;
  gap:8px;
  color:#fff;
  padding:12px 16px;
  margin-bottom:4px;
  border-radius:8px;
  text-decoration:none;
  transition:background .15s ease;
  font-size:14px;
  position:relative;
}
/* Caret indicator for potential submenus */
.admin-sidebar nav a::after{
  content:'▾';
  margin-left:auto;
  font-size:12px;
  opacity:.7;
}
/* Simple icons: define using emoji for each item by order */
.admin-sidebar nav a::before{
  font-family:inherit;
  font-size:16px;
  margin-right:8px;
}
.admin-sidebar nav a:nth-child(1)::before{ content:'👤'; }
.admin-sidebar nav a:nth-child(2)::before{ content:'🛡️'; }
.admin-sidebar nav a:nth-child(3)::before{ content:'📝'; }
.admin-sidebar nav a:nth-child(4)::before{ content:'💼'; }
.admin-sidebar nav a:nth-child(5)::before{ content:'🎁'; }
.admin-sidebar nav a:nth-child(6)::before{ content:'💳'; }
.admin-sidebar nav a:nth-child(7)::before{ content:'🏛️'; }
.admin-sidebar nav a:nth-child(8)::before{ content:'📒'; }
.admin-sidebar nav a:nth-child(9)::before{ content:'💱'; }
.admin-sidebar nav a:nth-child(10)::before{ content:'🛍️'; }
.admin-sidebar nav a:nth-child(11)::before{ content:'🧑‍🏫'; }
.admin-sidebar nav a:nth-child(12)::before{ content:'📚'; }
.admin-sidebar nav a:nth-child(13)::before{ content:'🎖️'; }
.admin-sidebar nav a:nth-child(14)::before{ content:'⏰'; }
.admin-sidebar nav a:nth-child(15)::before{ content:'🕵️'; }
.admin-sidebar nav a:nth-child(16)::before{ content:'⚙️'; }
.admin-sidebar nav a:nth-child(17)::before{ content:'🖼️'; }
.admin-sidebar nav a:nth-child(18)::before{ content:'📰'; }
.admin-sidebar nav a:nth-child(19)::before{ content:'👪'; }
.admin-sidebar nav a:nth-child(20)::before{ content:'🎟️'; }
.admin-sidebar nav a:nth-child(21)::before{ content:'🏢'; }
.admin-sidebar nav a:nth-child(22)::before{ content:'🏠'; }
.admin-sidebar nav a:nth-child(23)::before{ content:'📄'; }
.admin-sidebar nav a:nth-child(24)::before{ content:'👥'; }
/* Hover/active states: lighten the background for readability */
.admin-sidebar nav a:hover{
  background:rgba(255,255,255,0.15);
}
.admin-sidebar nav a.active{
  background:rgba(255,255,255,0.25);
}
/* Content area: bright white with dark text */
.admin-content{
  flex-grow:1;
  padding:20px;
  background:#ffffff;
  color:#000000;
  min-height:100vh;
}
/* Admin card surfaces: white with subtle border and dark text */
.admin-content .card{
  background:#ffffff;
  border:1px solid rgba(0,0,0,0.05);
  color:#000000;
  box-shadow:0 2px 4px rgba(0,0,0,0.05);
}
.admin-content .card h2.section-title{
  color:#000000;
}
/* Form controls inside admin: ensure black text */
.admin-content input,
.admin-content select,
.admin-content textarea{
  color:#000;
}
/* Links inside cards in admin content: dark blue for readability */
.admin-content a{
  color:#0066cc;
}
/* Ensure section titles within admin cards are dark for readability */
.admin-content .card .section-title{
  color:#000;
}
.admin-content .grid > a.rgb3d-btn{
  /* Buttons inside admin index page - keep white text on gradient */
  color:#fff;
}


/* Global news ticker shown below header */
.global-ticker {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
  padding: 6px 0;
  margin: 8px 0;
}
.global-ticker .ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: globalTickerMove 20s linear infinite;
}
.global-ticker .ticker-track span {
  display: inline-block;
  margin-right: 30px;
  color: var(--muted);
  font-size: 14px;
}
@keyframes globalTickerMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

