
/* =========================================================
   Rice Billing - Modern UI
   ========================================================= */

:root {
  --rb-primary: #1f6f5c;
  --rb-primary-dark: #185548;
  --rb-accent: #d9a441;
  --rb-bg: #f5f7f6;
  --rb-card: #ffffff;
  --rb-text: #24332f;
  --rb-muted: #6c7a76;
  --rb-border: #e2e8e5;
  --rb-shadow: 0 8px 24px rgba(31, 54, 47, 0.08);
  --rb-radius: 14px;
}

/* ---------- General ---------- */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--rb-bg) !important;
  color: var(--rb-text);
  min-height: 100vh;
}

pre {
  font-family: inherit;
}

/* ---------- Navigation ---------- */

.navbar {
  background: linear-gradient(
    135deg,
    var(--rb-primary-dark),
    var(--rb-primary)
  ) !important;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.navbar-brand {
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

.navbar .nav-link {
  border-radius: 8px;
  padding: 0.45rem 0.75rem !important;
  margin-left: 0.2rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---------- Main content ---------- */

main.container {
  padding-top: 0.5rem;
}

/* ---------- Cards ---------- */

.card {
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  box-shadow: var(--rb-shadow);
  overflow: hidden;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  color: var(--rb-text);
  font-weight: 650;
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: 9px;
  font-weight: 550;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--rb-primary);
  border-color: var(--rb-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--rb-primary-dark);
  border-color: var(--rb-primary-dark);
}

.btn-outline-primary {
  color: var(--rb-primary);
  border-color: var(--rb-primary);
}

.btn-outline-primary:hover {
  background-color: var(--rb-primary);
  border-color: var(--rb-primary);
}

/* ---------- Forms ---------- */

.form-control,
.form-select {
  border: 1px solid var(--rb-border);
  border-radius: 9px;
  padding: 0.65rem 0.8rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rb-primary);
  box-shadow: 0 0 0 0.2rem rgba(31, 111, 92, 0.12);
}

.form-label {
  color: var(--rb-text);
}

/* ---------- Tables ---------- */

.table {
  color: var(--rb-text);
}

.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rb-muted);
  border-bottom: 1px solid var(--rb-border);
}

.table tbody td {
  border-color: var(--rb-border);
  vertical-align: middle;
}

.order-lines-table tbody tr:nth-child(odd) {
  background-color: rgba(31, 111, 92, 0.025);
}

.order-lines-table tbody tr:hover {
  background-color: rgba(31, 111, 92, 0.07);
}

/* ---------- Alerts ---------- */

.alert {
  border-radius: 10px;
  border: 1px solid transparent;
}

/* ---------- Invoice ---------- */

.invoice-logo {
  max-height: 5rem;
  max-width: 8rem;
  object-fit: contain;
}

/* ---------- Muted text ---------- */

.text-muted {
  color: var(--rb-muted) !important;
}

/* ---------- Mobile ---------- */

@media (max-width: 991.98px) {
  .navbar .nav-link {
    margin-left: 0;
    margin-top: 0.2rem;
  }

  .card-body {
    padding: 1.25rem;
  }
}
/* =========================================================
   APPLICATION LANDING PAGE
   ========================================================= */

.app-landing {
  background:
    radial-gradient(circle at top left, rgba(31, 111, 92, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(217, 164, 65, 0.10), transparent 35%),
    var(--rb-bg) !important;
}

.landing-wrapper {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 70px 0 35px;
}

.landing-header {
  margin-bottom: 50px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;

  background: linear-gradient(
    135deg,
    var(--rb-primary-dark),
    var(--rb-primary)
  );

  color: #fff;
  font-size: 1.15rem;
  font-weight: 750;

  box-shadow: 0 10px 25px rgba(31, 111, 92, 0.22);
}

.landing-header h1 {
  margin-bottom: 8px;

  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.5px;

  color: var(--rb-text);
}

.landing-header p {
  margin: 0;

  color: var(--rb-muted);
  font-size: 1rem;
}


/* ---------- Application cards ---------- */

.application-card {
  height: 100%;

  display: flex;
  align-items: flex-start;
  gap: 22px;

  padding: 30px;

  background: var(--rb-card);

  border: 1px solid var(--rb-border);
  border-radius: 18px;

  box-shadow: var(--rb-shadow);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.application-card:hover {
  transform: translateY(-5px);

  box-shadow:
    0 16px 35px rgba(31, 54, 47, 0.13);

  border-color: rgba(31, 111, 92, 0.25);
}

.application-icon {
  width: 58px;
  height: 58px;

  flex: 0 0 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 15px;

  font-size: 1.7rem;
}

.rice-card .application-icon {
  background: rgba(31, 111, 92, 0.10);
}

.store-card .application-icon {
  background: rgba(217, 164, 65, 0.14);
}

.application-content {
  flex: 1;
}

.application-label {
  display: inline-block;

  margin-bottom: 7px;

  font-size: 0.7rem;
  font-weight: 750;

  letter-spacing: 0.08em;

  color: var(--rb-muted);
}

.application-content h2 {
  margin-bottom: 10px;

  font-size: 1.45rem;
  font-weight: 700;

  color: var(--rb-text);
}

.application-content p {
  min-height: 66px;

  margin-bottom: 22px;

  color: var(--rb-muted);
  line-height: 1.6;
}


/* ---------- Landing buttons ---------- */

.application-button {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;

  padding: 11px 15px;

  border-radius: 10px;

  color: #fff !important;
  text-decoration: none;

  font-weight: 650;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.rice-card .application-button {
  background: var(--rb-primary);
}

.store-card .application-button {
  background: #218c5a;
}

.application-button span {
  font-size: 1.25rem;

  transition: transform 0.15s ease;
}

.application-button:hover {
  color: #fff;

  transform: translateY(-1px);

  box-shadow: 0 7px 18px rgba(31, 54, 47, 0.15);
}

.application-button:hover span {
  transform: translateX(4px);
}


/* ---------- Footer ---------- */

.landing-footer {
  margin-top: 55px;

  text-align: center;

  font-size: 0.8rem;

  color: var(--rb-muted);
}


/* ---------- Mobile ---------- */

@media (max-width: 767.98px) {

  .landing-wrapper {
    padding-top: 45px;
  }

  .landing-header {
    margin-bottom: 35px;
  }

  .application-card {
    padding: 24px;

    gap: 16px;
  }

  .application-icon {
    width: 50px;
    height: 50px;

    flex-basis: 50px;

    font-size: 1.4rem;
  }

  .application-content p {
    min-height: auto;
  }
}
/* =========================================================
   Bags Page
   ========================================================= */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.page-eyebrow {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--rb-primary);
  margin-bottom: 0.35rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--rb-text);
}

.page-subtitle {
  margin: 0.45rem 0 0;
  color: var(--rb-muted);
  font-size: 0.95rem;
}


/* ---------- Section heading ---------- */

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.section-heading h2 {
  font-weight: 700;
  color: var(--rb-text);
}

.section-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rb-primary);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
}

.section-icon-soft {
  background: rgba(31, 111, 92, 0.10);
  color: var(--rb-primary);
}


/* ---------- Create bag ---------- */

.bag-create-card,
.existing-bags-card {
  border-radius: 16px;
}

.form-help {
  margin-top: 0.45rem;
  color: var(--rb-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.bag-create-card .form-control,
.bag-create-card .form-select {
  background-color: #fff;
}

.bag-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(31, 111, 92, 0.15);
  background: rgba(31, 111, 92, 0.045);
  border-radius: 11px;
}

.bag-info-icon {
  width: 25px;
  height: 25px;
  min-width: 25px;
  border-radius: 50%;
  background: var(--rb-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.bag-info-box strong {
  display: block;
  font-size: 0.84rem;
  color: var(--rb-text);
  margin-bottom: 0.15rem;
}

.bag-info-box p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--rb-muted);
}

.bag-submit-btn {
  border: none;
  padding: 0.78rem 1rem;
  font-weight: 650;
}

.button-arrow {
  margin-left: 0.35rem;
  font-size: 1.1rem;
}


/* ---------- Bag count ---------- */

.item-count {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 111, 92, 0.09);
  color: var(--rb-primary);
  font-size: 0.76rem;
  font-weight: 700;
}


/* ---------- Bag table ---------- */

.bag-table-wrapper {
  border: 1px solid var(--rb-border);
  border-radius: 12px;
  overflow-x: auto;
}

.bag-table {
  min-width: 720px;
}

.bag-table thead th {
  background: #f8faf9;
  padding: 0.8rem 0.75rem;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  color: var(--rb-muted);
  white-space: nowrap;
}

.bag-table tbody td {
  padding: 0.85rem 0.75rem;
  background: #fff;
}

.bag-table tbody tr {
  transition: background-color 0.15s ease;
}

.bag-table tbody tr:hover td {
  background: rgba(31, 111, 92, 0.025);
}

.bag-name {
  font-weight: 650;
  color: var(--rb-text);
  line-height: 1.35;
}

.pack-name {
  max-width: 170px;
  color: var(--rb-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.quantity-badge {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  padding: 0 0.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f0f4f2;
  color: var(--rb-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.table-number {
  font-weight: 650;
  color: var(--rb-text);
}

.table-unit {
  margin-left: 0.15rem;
  color: var(--rb-muted);
  font-size: 0.75rem;
}

.price-value {
  font-weight: 700;
  color: var(--rb-primary);
  white-space: nowrap;
}


/* ---------- Actions ---------- */

.action-buttons {
  display: inline-flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.btn-edit,
.btn-delete {
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.35rem 0.65rem;
}

.btn-edit {
  color: var(--rb-primary);
  border: 1px solid rgba(31, 111, 92, 0.35);
  background: #fff;
}

.btn-edit:hover {
  color: #fff;
  background: var(--rb-primary);
  border-color: var(--rb-primary);
}

.btn-delete {
  color: #b54747;
  border: 1px solid rgba(181, 71, 71, 0.35);
  background: #fff;
}

.btn-delete:hover {
  color: #fff;
  background: #b54747;
  border-color: #b54747;
}


/* ---------- Empty state ---------- */

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  border: 1px dashed var(--rb-border);
  border-radius: 12px;
  background: #fafcfb;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(31, 111, 92, 0.09);
  color: var(--rb-primary);
  font-size: 1.4rem;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.empty-state p {
  color: var(--rb-muted);
  font-size: 0.85rem;
  margin: 0;
}


/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .page-title {
    font-size: 1.7rem;
  }

  .existing-bags-card {
    margin-top: 0;
  }
}

@media (max-width: 575.98px) {
  .page-header {
    display: block;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .page-subtitle {
    font-size: 0.88rem;
  }

  .card-body {
    padding: 1.15rem !important;
  }

  .section-heading {
    gap: 0.65rem;
  }

  .section-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
}
