/* ===============================
   RATTNANJALEE UI THEME
   Jewellery Showroom Style
   =============================== */

body.rg-login {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f8f5f0, #efe7da);
  min-height: 100vh;
}

/* Center wrapper */
.rg-login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Login card */
.rg-login-card {
  background: #fffaf3;
  width: 100%;
  max-width: 380px;
  padding: 30px 28px;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  border: 1px solid #eadcc8;
}

/* Brand */
.rg-login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.rg-login-brand h1 {
  font-size: 24px;
  font-weight: 600;
  color: #9c6b1c;
  margin-bottom: 4px;
}

.rg-login-brand p {
  font-size: 13px;
  color: #777;
}

/* Inputs */
.rg-input {
  border-radius: 8px;
  border: 1px solid #d8c9b0;
  padding: 10px 12px;
}

.rg-input:focus {
  border-color: #b8860b;
  box-shadow: 0 0 0 0.15rem rgba(184,134,11,.15);
}

/* Gold button */
.rg-btn-gold {
  background: linear-gradient(135deg, #c9a24d, #9c6b1c);
  border: none;
  color: #fff;
  padding: 10px;
  font-weight: 500;
  border-radius: 8px;
}

.rg-btn-gold:hover {
  opacity: 0.95;
}

/* Footer */
.rg-login-footer {
  margin-top: 18px;
  font-size: 12px;
  color: #777;
  text-align: center;
}

/* ===============================
   APP BASE (Dashboard + Others)
   =============================== */

body.rg-app{
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f8f5f0, #efe7da);
  min-height: 100vh;
  color: #1f1f1f;
}

.rg-page { padding-bottom: 40px; }
.rg-container { max-width: 1120px; }

/* Headings */
.rg-title{
  font-weight: 600;
  color: #8c5f16;
  letter-spacing: .2px;
}
.rg-subtitle{
  font-size: 13px;
  color: #7c7265;
}

.rg-pill{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #6f655a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
}
.rg-dot{
  width: 6px; height: 6px;
  border-radius: 99px;
  background: #b8860b;
  display: inline-block;
}

/* KPI cards */
.rg-kpi{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(0,0,0,.06);
}
.rg-kpi-label{
  font-size: 13px;
  color: #7c7265;
}
.rg-kpi-value{
  font-size: 28px;
  font-weight: 600;
  color: #1f1f1f;
  margin-top: 2px;
}
.rg-kpi-meta{
  font-size: 12px;
  color: #7c7265;
  margin-top: 4px;
}

/* Buttons */
.rg-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rg-btn-soft{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  color: #4f4539;
  border-radius: 10px;
  padding: 10px 14px;
}
.rg-btn-soft:hover{
  background: #fff4e4;
  border-color: #e3cfae;
}

.rg-btn-gold{
  background: linear-gradient(135deg, #c9a24d, #9c6b1c);
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 500;
  box-shadow: 0 14px 26px rgba(156,107,28,.25);
}
.rg-btn-gold:hover{ opacity: .95; }

.rg-btn-blue{
  background: #0b5ed7;
  border: 1px solid rgba(0,0,0,.08);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 500;
}
.rg-btn-blue:hover{ opacity: .95; }

/* Section title */
.rg-section-title{
  font-weight: 600;
  color: #5b3f12;
}

/* Card wrapper */
.rg-card{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(0,0,0,.06);
  overflow: hidden;
}

/* Table */
.rg-table thead th{
  font-size: 12px;
  color: #6f655a;
  font-weight: 600;
  background: #fff4e4;
  border-bottom: 1px solid #eadcc8 !important;
}
.rg-table tbody td{
  border-top: 1px solid #f0e4d3;
  padding-top: 14px;
  padding-bottom: 14px;
}
.rg-table tbody tr:hover{
  background: rgba(255, 244, 228, .55);
}

.rg-badge{
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #eadcc8;
  background: #fff;
  color: #6b4a14;
}

/* Mobile Purchase Cards */
.rg-empty{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  color: #7c7265;
  box-shadow: 0 18px 36px rgba(0,0,0,.06);
}

.rg-mobile-list{
  display: grid;
  gap: 12px;
}

.rg-purchase-card{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 18px 36px rgba(0,0,0,.06);
}

.rg-pc-top{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.rg-pc-receipt{
  font-weight: 600;
  color: #1f1f1f;
  font-size: 14px;
}
.rg-pc-name{
  font-size: 12px;
  color: #7c7265;
  margin-top: 2px;
}
.rg-pc-amount{
  font-weight: 700;
  color: #1f1f1f;
  white-space: nowrap;
}

.rg-pc-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0e4d3;
}
.rg-mini-label{
  font-size: 11px;
  color: #7c7265;
}
.rg-mini-value{
  font-size: 12px;
  color: #1f1f1f;
  margin-top: 2px;
}

.rg-pc-actions{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0e4d3;
}

/* ===============================
   NAVBAR (Jewellery Showroom)
   =============================== */

.rg-navbar{
  background: rgba(255, 250, 243, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eadcc8;
  box-shadow: 0 14px 30px rgba(0,0,0,.05);
  padding: 10px 0;
}

.rg-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.rg-brand-mark{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #c9a24d, #9c6b1c);
  box-shadow: 0 14px 26px rgba(156,107,28,.25);
}

.rg-brand-text{
  font-weight: 600;
  color: #8c5f16;
  letter-spacing: .2px;
}

/* Toggler */
.rg-toggler{
  border: 1px solid #eadcc8 !important;
  border-radius: 12px;
  padding: 6px 10px;
}
.navbar-toggler-icon{
  filter: grayscale(1) contrast(1.2);
}

/* Links */
.rg-navlinks .rg-navlink{
  color: #4f4539 !important;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 2px;
}
.rg-navlinks .rg-navlink:hover{
  background: rgba(255, 244, 228, .85);
  border: 1px solid #eadcc8;
}

/* Right side user chip */
.rg-nav-right{
  margin-top: 10px;
}
@media (min-width: 992px){
  .rg-nav-right{ margin-top: 0; }
}

.rg-userchip{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 12px 22px rgba(0,0,0,.05);
  min-width: 200px;
}

.rg-user-name{
  font-weight: 600;
  font-size: 13px;
  color: #1f1f1f;
  line-height: 1.2;
}

.rg-user-meta{
  font-size: 11px;
  color: #7c7265;
  margin-top: 2px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.rg-role{
  color: #6b4a14;
  font-weight: 600;
}
.rg-sep{ opacity: .8; }

/* Logout button */
.rg-btn-outline{
  background: #fff;
  border: 1px solid #eadcc8;
  color: #4f4539;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 500;
}
.rg-btn-outline:hover{
  background: #fff4e4;
  border-color: #e3cfae;
}

/* ===============================
   PURCHASE LIST PAGE
   =============================== */

.rg-headbar{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px){
  .rg-headbar{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.rg-head-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rg-filter{
  padding: 0;
}
.rg-filter-head{
  padding: 14px 16px;
  border-bottom: 1px solid #eadcc8;
  background: #fff4e4;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.rg-filter-title{
  font-weight: 600;
  color: #5b3f12;
}
.rg-filter-hint{
  font-size: 12px;
  color: #7c7265;
}
.rg-filter-body{
  padding: 14px 16px 16px;
}

.rg-summary{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(0,0,0,.06);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}
@media (min-width: 768px){
  .rg-summary{
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }
}
.rg-summary-item .rg-mini-value{
  font-weight: 600;
}
.rg-summary-note{
  font-size: 12px;
  color: #7c7265;
  text-align: left;
}
@media (min-width: 768px){
  .rg-summary-note{ text-align: right; }
}

/* ===============================
   PURCHASE CREATE (Voucher Entry)
   =============================== */

.rg-form-head{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 768px){
  .rg-form-head{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.rg-form-head-note{
  display:flex;
  align-items:center;
  gap: 10px;
  background:#fffaf3;
  border:1px solid #eadcc8;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 22px rgba(0,0,0,.05);
}
.rg-note-badge{
  background: linear-gradient(135deg, #c9a24d, #9c6b1c);
  color:#fff;
  font-weight:600;
  font-size:12px;
  padding: 6px 10px;
  border-radius: 999px;
}
.rg-note-text{
  font-size:12px;
  color:#7c7265;
}

.rg-form{
  padding: 0;
}

.rg-block{
  padding: 16px;
  border-bottom: 1px solid #eadcc8;
}
.rg-block:last-child{ border-bottom: none; }

.rg-block-title{
  font-weight: 600;
  color: #5b3f12;
  margin-bottom: 12px;
}

.rg-hint{
  font-size: 12px;
  color: #7c7265;
}

/* File upload row */
.rg-file-row{
  display:flex;
  gap: 10px;
  align-items: center;
}
@media (max-width: 420px){
  .rg-file-row{
    flex-direction: column;
    align-items: stretch;
  }
}

.rg-cam-btn{
  white-space: nowrap;
}

/* Previews */
.preview-img{
  width: 100%;
  max-width: 220px;
  height: auto;
  border: 1px solid #eadcc8;
  border-radius: 12px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 12px 22px rgba(0,0,0,.05);
}
.preview-box{ display:none; margin-top: 8px; }

.preview-video{
  width: 100%;
  max-width: 420px;
  border: 1px solid #eadcc8;
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(0,0,0,.05);
}

.rg-hr{
  border-top: 1px dashed #eadcc8;
  opacity: 1;
  margin: 6px 0;
}

/* Action bar (sticky on mobile) */
.rg-actionbar{
  padding: 14px 16px;
  position: sticky;
  bottom: 0;
  background: rgba(255, 250, 243, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eadcc8;
  display:flex;
  justify-content: flex-end;
  gap: 10px;
}
.rg-save-btn{
  min-width: 240px;
}
@media (max-width: 576px){
  .rg-save-btn{
    width: 100%;
    min-width: 0;
  }
  .rg-actionbar{
    justify-content: stretch;
  }
}

/* Modal */
.rg-modal{
  border-radius: 16px;
  border: 1px solid #eadcc8;
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
}

.rg-alert{
  border-radius: 14px;
}

/* ===============================
   PURCHASE VIEW
   =============================== */

.rg-view-head{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px){
  .rg-view-head{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.rg-sep{
  margin: 0 6px;
  opacity: .7;
}

.rg-view-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Danger button (soft delete) */
.rg-btn-danger{
  background: #dc3545;
  color: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 500;
}
.rg-btn-danger:hover{ opacity: .95; }

/* Info cards */
.rg-info{
  overflow: hidden;
}
.rg-info-head{
  padding: 14px 16px;
  background: #fff4e4;
  border-bottom: 1px solid #eadcc8;
  font-weight: 600;
  color: #5b3f12;
}
.rg-info-body{
  padding: 14px 16px 16px;
}

/* key-value grid */
.rg-kv{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 420px){
  .rg-kv{
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 12px;
  }
}
.rg-k{
  font-size: 12px;
  color: #7c7265;
}
.rg-v{
  font-size: 13px;
  font-weight: 500;
  color: #1f1f1f;
}
.rg-strong{
  font-weight: 700 !important;
  color: #1f1f1f !important;
}

/* Docs wrapper */
.rg-docs{
  overflow: hidden;
}
.rg-docs-head{
  padding: 14px 16px;
  background: #fff4e4;
  border-bottom: 1px solid #eadcc8;
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.rg-docs-title{
  font-weight: 600;
  color: #5b3f12;
}
.rg-docs-sub{
  font-size: 12px;
  color: #7c7265;
}
.rg-docs-body{
  padding: 14px 16px 16px;
}

/* Doc cards */
.rg-doc-card{
  background: #fffaf3;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.06);
  display:flex;
  flex-direction: column;
}
.rg-doc-top{
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #eadcc8;
}
.rg-doc-label{
  font-size: 12px;
  font-weight: 600;
  color: #6b4a14;
}

.rg-doc-media{
  padding: 10px 12px 0;
}
.rg-doc-img, .rg-doc-video{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eadcc8;
  background: #fff;
}
.rg-doc-link{ display:block; }

.rg-doc-mid{
  padding: 10px 12px 0;
}
.rg-doc-name{
  font-size: 12px;
  color: #7c7265;
}

.rg-doc-actions{
  margin-top: auto;
  padding: 12px;
  display:flex;
  gap: 10px;
}
.rg-doc-actions .btn{
  flex: 1 1 auto;
}

/* ===============================
   DASHBOARD
   =============================== */

.rg-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fffaf3;
  border: 1px solid #eadcc8;
  box-shadow: 0 12px 22px rgba(0,0,0,.05);
  color: #5b3f12;
  font-size: 13px;
}
.rg-dot{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c9a24d;
  display:inline-block;
}

/* KPI cards */
.rg-kpi{
  border: 1px solid #eadcc8;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf3, #ffffff);
  box-shadow: 0 18px 36px rgba(0,0,0,.06);
  overflow: hidden;
}
.rg-kpi .card-body{
  padding: 18px;
}
.rg-kpi-label{
  font-size: 12px;
  color: #7c7265;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rg-kpi-value{
  font-size: 28px;
  font-weight: 700;
  color: #1f1f1f;
  margin-top: 6px;
}
.rg-kpi-meta{
  font-size: 12px;
  color: #7c7265;
  margin-top: 6px;
}

/* quick actions row */
.rg-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* section title */
.rg-section-title{
  font-weight: 600;
  color: #5b3f12;
}

/* ===============================
   USERS LIST
   =============================== */

.rg-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #eadcc8;
}
.rg-status-ok{
  background: #e9fff0;
  border-color: #bfe6c9;
  color: #146c2e;
}
.rg-status-off{
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

/* ===============================
   USER CREATE (small additions)
   =============================== */

.rg-form .rg-block-title{
  display:flex;
  align-items:center;
  justify-content: space-between;
}

.rg-actionbar .btn{
  min-width: 120px;
}

/* ===============================
   RESET PASSWORD
   =============================== */

.rg-kv{ display:flex; flex-direction:column; gap:10px; }
.rg-kv-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding: 10px 12px;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  background: #fffaf3;
}
.rg-kv-label{ color:#7c7265; font-size:13px; }
.rg-kv-value{ font-weight:600; color:#1f1f1f; text-align:right; }

.rg-warn{
  background: #fff4e4;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  padding: 12px 14px;
}
.rg-warn-title{ font-weight:600; color:#5b3f12; margin-bottom:4px; }
.rg-warn-text{ font-size:13px; color:#7c7265; }

/* Reports helpers */
.rg-unit{ font-size: 14px; font-weight: 600; opacity: .7; margin-left: 6px; }

.rg-actionbar{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.rg-alert{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
}

/* Branch table action buttons alignment */
@media (max-width: 576px){
  .rg-table .btn{ width: 100%; }
}

/* Audit logs: keep long message readable on small screens */
@media (max-width: 576px){
  td.rg-msg{ min-width: 280px !important; }
}

/* ===============================
   SITE-WIDE FOOTER CREDIT
   =============================== */
.rg-footer{
  background: rgba(255, 250, 243, .85);
  border-top: 1px solid #eadcc8;
  backdrop-filter: blur(10px);
}

.rg-footer-text{
  text-align: center;
  font-size: 12px;
  color: #7c7265;
}

.rg-footer-name{
  font-weight: 600;
  color: #8c5f16;
}
