body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: var(--surface-page, #f4f7f4);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.footer {
  background-color: #007749;
  color: #ffffff;
  text-align: center;
}

.footer p {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* =========================
   TOP GREEN BAR
========================= */

/* ==========================================
   HEADER VARIABLES
========================================== */

:root {
    --agnvet-green: #007749;
    --agnvet-green-dark: #035f3c;
    --agnvet-orange: #df5934;
    --agnvet-leaf: #4d7c3f;

    --text-primary: #1f2933;
    --text-secondary: #667267;
    --text-heading: #17221a;

    --surface: #ffffff;
    --surface-light: #f8faf8;
    --surface-page: #f4f7f4;

    --border: #e3e9e2;
    --border-soft: #dfe7df;

    --radius-card: 22px;
    --radius-panel: 16px;
    --shadow-card: 0 8px 24px rgba(28, 49, 31, 0.06);
}

/* ==========================================
   HEADER WRAPPER
========================================== */

header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: #fff;
}

/* ==========================================
   TOP BAR
========================================== */

.top-bar {
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    background: var(--agnvet-green);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 8px;
}

.social-icons a {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255,255,255,.85);

    border-radius: 8px;

    transition: all .2s ease;

    text-decoration: none;
}

.social-icons a:hover {
    color: white;
    background: rgba(255,255,255,.12);
    transform: translateY(-1px);
}

.top-bar-right {
    display: flex;
    gap: 10px;
}

.top-bar-right .group-button {
    height: 30px;

    padding: 0 12px;

    display: flex;
    align-items: center;

    color: white;

    background: rgba(255,255,255,.12);

    border: none;

    border-radius: 8px;

    font-size: 0.8rem;
    font-weight: 600;

    text-decoration: none;

    transition: all .2s ease;
}

.top-bar-right .group-button:hover {
    background: #df5934;
    color: white;
}

/* ==========================================
   MAIN HEADER
========================================== */

.main-header {
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    background: white;

    border-bottom: 1px solid var(--border);

    box-shadow:
        0 4px 20px rgba(0,0,0,.04);
}

.main-header-left {
    display: flex;
    align-items: center;
}

.main-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   LOGO
========================================== */

.logo-link {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 56px;
    width: auto;

    transition: transform .2s ease;
}

.logo-link:hover .header-logo {
    transform: scale(1.02);
}

/* ==========================================
   NAVIGATION LINKS
========================================== */

.header-link-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-link {
    display: flex;
    align-items: center;

    padding: 10px 14px;

    color: var(--text-primary);

    border-radius: 10px;

    font-size: .9rem;
    font-weight: 600;

    text-decoration: none;

    transition: all .2s ease;
}

.header-link:hover {
    color: var(--agnvet-green);
    background: #eef5ec;
}

/* ==========================================
   HOME ICON
========================================== */

.home-icon-button {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--agnvet-green);

    background: var(--surface-light);

    border: 1px solid var(--border);

    border-radius: 12px;

    text-decoration: none;

    transition: all .2s ease;
}

.home-icon-button:hover {
    background: var(--agnvet-green);
    color: white;

    transform: translateY(-2px);
}

/* ==========================================
   BUTTONS / DROPDOWNS
========================================== */

.group-button,
.dropdown-toggle {

    height: 42px;

    padding: 0 16px;

    display: flex;
    align-items: center;
    gap: 8px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    color: var(--text-primary);

    font-size: .9rem;
    font-weight: 600;

    cursor: pointer;

    transition: all .2s ease;
}

.group-button:hover,
.dropdown-toggle:hover {
    color: var(--agnvet-green);

    border-color: var(--agnvet-green);

    background: #eef5ec;
}

/* ==========================================
   DROPDOWNS
========================================== */

.admin-dropdown {
    position: relative;
}

.admin-dropdown-menu {

    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 1200;

    min-width: 180px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 4px;

    box-shadow:
        0 15px 40px rgba(0,0,0,.08);

    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);

    transition: all .2s ease;
}

.admin-dropdown:hover .admin-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-dropdown-menu a {

    display: flex;
    align-items: center;

    padding: 12px 14px;

    border-radius: 10px;

    color: var(--text-primary);

    text-decoration: none;

    font-size: .88rem;
    font-weight: 500;

    transition: all .2s ease;
}

.admin-dropdown-menu a:hover {
    background: #eef5ec;

    color: var(--agnvet-green);
}

/* ==========================================
   PROFILE BUTTON
========================================== */

.profile-dropdown {
    position: relative;
}

.profile-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            130deg,
            var(--agnvet-green),
            var(--agnvet-orange)
        );

    color: white;

    border-radius: 14px;

    font-size: .9rem;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(77,124,63,.20);

    transition: all .2s ease;
}

.profile-icon:hover {
    transform: translateY(-2px);
}

/* ==========================================
   PROFILE MENU
========================================== */

.profile-dropdown-menu {

    position: absolute;
    right: 0;
    top: calc(100% + 10px);

    width: 300px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 12px;

    box-shadow:
        0 15px 40px rgba(0,0,0,.08);

    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);

    transition: all .2s ease;
}

.profile-dropdown.active .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header {

    display: flex;
    gap: 14px;

    padding: 14px;

    margin-bottom: 10px;

    background: #f8faf8;

    border-radius: 14px;
}

.profile-initials {

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--agnvet-green),
            var(--agnvet-orange)
        );

    color: white;

    font-weight: 700;
}

.profile-name {
    font-weight: 700;
    color: var(--text-primary);
}

.profile-email {
    margin-top: 2px;

    font-size: .8rem;

    color: var(--text-secondary);

    word-break: break-word;
}

.profile-dropdown-item {

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;

    border-radius: 10px;

    color: var(--text-primary);

    text-decoration: none;

    font-weight: 500;

    transition: all .2s ease;
}

.profile-dropdown-item:hover {
    background: #eef5ec;

    color: var(--agnvet-green);
}

.logout-item:hover {
    background: #fff4eb;
    color: var(--agnvet-orange);
}

/* Log Out is a POST form (CSRF-protected); make its button look like the nav links. */
.logout-form {
    margin: 0;
}

.logout-form button {
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
}

.logout-form .logout-item {
    border-top: 1px solid #eee;
}

/* ==========================================
   DESKTOP / MOBILE NAV CHROME
========================================== */

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-toggle,
.mobile-nav-drawer,
.mobile-nav-backdrop,
.mobile-nav-close {
    display: none;
}

.mobile-nav-toggle {
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--agnvet-green);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
}

.mobile-nav-toggle:hover {
    background: var(--agnvet-green);
    color: #fff;
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(23, 34, 26, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1210;
    width: min(100%, 360px);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 18px 16px calc(32px + env(safe-area-inset-bottom, 0px));
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    background: #fff;
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(28, 49, 31, 0.14);
    transform: translateX(100%);
    transition: transform .22s ease;
}

.mobile-nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 4px 4px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-heading);
    font-size: 1.05rem;
    font-weight: 800;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
}

.mobile-nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-section-last {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mobile-nav-label {
    margin: 10px 8px 4px;
    color: var(--agnvet-leaf);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mobile-nav-link {
    display: block;
    padding: 13px 12px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: #eef5ec;
    color: var(--agnvet-green);
}

.mobile-nav-link-danger {
    color: #b42318;
}

.mobile-nav-link-danger:hover,
.mobile-nav-link-danger:focus {
    background: #fff4eb;
    color: var(--agnvet-orange);
}

body.mobile-nav-open {
    overflow: hidden;
}

body.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.mobile-nav-open .mobile-nav-drawer {
    transform: translateX(0);
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 1200px) {

    .header-link-container {
        gap: 4px;
    }

    .header-link,
    .group-button,
    .dropdown-toggle {
        font-size: .82rem;
    }
}

@media (max-width: 1100px) {

    .top-bar {
        display: none;
    }

    .main-header {
        padding: 0 16px;
        height: 70px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .mobile-nav-drawer,
    .mobile-nav-backdrop,
    .mobile-nav-close {
        display: block;
    }

    .mobile-nav-close {
        display: inline-flex;
    }

    .header-logo {
        height: 46px;
    }

    .portal-page {
        padding: 24px 16px 48px;
    }

    .portal-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .portal-page-actions {
        width: 100%;
    }

    .portal-page-actions > * {
        width: 100%;
    }

    .portal-page-actions .account-switcher-select,
    .portal-page-actions select,
    .portal-page-actions .switch-dashboard-button {
        width: 100%;
    }

    .login-container,
    .register-container {
        max-width: 100%;
        margin-top: 8px;
        padding: 28px 20px;
    }

    .request-history-table-wrap,
    .dashboard-table-wrap,
    .market-table-container {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {

    .main-header-right {
        gap: 8px;
    }

    .home-icon-button,
    .mobile-nav-toggle,
    .profile-icon {
        width: 40px;
        height: 40px;
    }

    .login-container .header,
    .register-container .header {
        font-size: 1.45rem;
        margin-bottom: 20px;
    }

    .login-button,
    .register-button,
    .forgot-button {
        width: 100%;
        max-width: 100%;
    }

    .admin-actions {
        flex-direction: column;
        gap: 16px;
    }

    .admin-role-section {
        min-width: 0;
        width: 100%;
    }

    .admin-card,
    .publish-card {
        padding: 18px;
    }

    .profile-page-initials {
        width: 65px;
        height: 65px;
        border-radius: 50%;
        font-weight: 600;
        font-size: 30px;
        flex-shrink: 0;
    }

    .filter-row th {
        min-width: 120px;
    }
}

.portal-auth-inner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 24px;
}

.login-container,
.register-container {
  width: 100%;
  max-width: 600px;
  margin-top: 25px;
  min-height: 375px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 42px;
  box-shadow: var(--shadow-card);
}

.login-container .header,
.register-container .header {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--agnvet-green);
  margin-bottom: 28px;
  text-align: center;
  letter-spacing: -0.03em;
}

.login-button {
  background: #007749;
  color: #ffffff;
  border: none;
  padding: 12px 0;
  width: 150px;
  margin: 0 auto;
  display: block; 
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
}

.login-button:hover {
  background: #0b5a3c;
}

.form-control {
  border: 1px solid #ccc;
  margin-bottom: 35px;
  width: 100%;
}

.form-control:hover {
  border-color: #666;
}

.form-control:focus {
  border-color: #007f4f;
  box-shadow: 0 4px 10px rgba(0, 127, 79, 0.2);
  outline: none;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-input {
  padding-right: 80px; 
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #007749;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.toggle-password:hover {
  color: #02442b;
}

.account-card-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.account-card-header h4 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #007749;
}

.table {
  margin: 0;
}

.table thead {
  background-color: #f5f7f5;
}

.table th {
  font-size: 0.9rem;
  color: #555;
  font-weight: 600;
}

.table td {
  vertical-align: middle;
}

.account-top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.balance-section-title {
    margin: 24px 0 12px;

    color: #7a847c;

    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.balance-total-highlight {
    margin-bottom: 18px;
}

.balance-total-label {
    display: block;
    margin-bottom: 4px;

    color: #7a847c;

    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.balance-total-value {
    color: #17221a;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
}

.balance-mini-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 0;

    border-bottom: 1px solid #edf1ed;

    font-size: 0.9rem;
}

.balance-mini-row:last-child {
    border-bottom: none;
}

.balance-mini-row span {
    color: #758078;
    font-weight: 500;
}

.balance-mini-row strong {
    color: #2b372d;
    font-weight: 750;
}

.text-red {
    color: #dc2626 !important;
    font-weight: 800 !important;
}

.payment-button {
  background-color: #007749;
  border: none;
  color: white;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.payment-button:hover {
  background-color: #005f3a;
  color: white;
}

.export-orders {
    width: 100%;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 0 12px;

    background: #ffffff;
    color: #345e2d;

    border: 1px solid #dfe7df;
    border-radius: 12px;

    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 750;

    text-decoration: none;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.export-orders:hover {
    background: #f7faf6;
    border-color: #cbdac8;
    color: #345e2d;
}


.table tbody tr:hover {
  background-color: #f9f9f9;
  transition: background 0.2s ease;
}

.register-container {
  width: 100%;
  max-width: 600px;
  min-height: 650px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  margin-top: -10px;
  padding: 42px;
  box-shadow: var(--shadow-card);
}

.register-subtext {
  text-align: center;
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.account-id-section {
  margin-bottom: 10px;
  width: 100%;
}

.account-id-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #007749;
  margin-bottom: 10px;
}

.register-subtext-1 {
  color: #6c757d;
  font-size: 0.75rem;
  margin-bottom: 15px;
}

.account-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.account-id-row .form-control {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.add-account-button {
  background: #ffffff;
  color: #007749;
  border: 1px solid #007749;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.add-account-button:hover {
  background: #007749;
  color: #ffffff;
}

.remove-account-button {
  background: #ffffff;
  color: #b02a37;
  border: 1px solid #dc3545;
  width: 42px;
  height: 42px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-account-button:hover {
  background: #dc3545;
  color: #ffffff;
}

.register-button {
  width: 40%;
  min-width: 140px;
  display: block;
  margin-top: 10px;
}

.forgot-button{
  display: block;
  margin-top: 10px;
}

.register-container .header {
  font-size: 35px;
  font-weight: bold;
  color: #007749;
  margin-bottom: 40px;
  text-align: center;
}

.account-id-subtext {
  font-size: 0.85rem;
  color: #80888f;
  margin-top: -10px;
  margin-bottom: 20px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 1750px;
}

.admin-header {
  display: grid;
  grid-template-columns:minmax(200px,1fr) minmax(200px,1fr) minmax(200px, 400px);
  gap: 30px;
  align-items: start;
}

.admin-user-text {
  width: 100%;
}

.admin-user-text h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.admin-user-text p {
  font-size: 0.95rem;
  color: #777;
  margin: 0;
}

.admin-requests {
  width: 100%;
  max-width: 400px;
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 5px;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
}

.admin-checkbox input {
  accent-color: #007749;
}

.admin-date {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 10px;
  margin-left: 22px;
}

.admin-button-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approve-button {
  background: #007749;
  color: #ffffff;
  border: none;
  padding: 12px 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  min-width: 350px;
  width: 100%;
}

.approve-button:hover {
  background: #0b5a3c;
}

.decline-button {
  background: #db3721;
  color: #ffffff;
  border: none;
  padding: 12px 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
}

.decline-button:hover {
  background: #a71d0b;
}

.submit-req-button {
    min-height: 47px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    background: linear-gradient(
        135deg,
        #4d7c3f,
        #5b8d49
    );

    color: #ffffff;

    border: none;
    border-radius: 12px;

    font-size: 0.86rem;
    font-weight: 750;
    font-family: inherit;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.submit-req-button:hover {
    filter: brightness(1.10);
}

.cancel-req-button {
    min-height: 47px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    background: #ffffff;
    color: #b42318;

    border: 1px solid #f0c6c2;
    border-radius: 12px;

    font-size: 0.86rem;
    font-weight: 750;
    font-family: inherit;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.cancel-req-button:hover {
    background: #fef2f2;
    border-color: #e5a09a;
}

.account-switcher-select {
  min-width: 320px;
  max-width: 380px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e2e2;
  background: #ffffff;
  color: #1f1f1f;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-left: 4px solid #007749;
}

.account-switcher-select:hover {
  border-color: #007749;
  border-left: 4px solid #007749;
}

.account-switcher-select:focus {
  border-color: #015334;
}

.dropdown-toggle {
  cursor: pointer;
}

.request-history-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

.request-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.request-history-table thead {
  background: #f5f7f5;
}

.request-history-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e5e5e5;
  white-space: nowrap;
}

.request-history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  vertical-align: top;
}

.request-history-table tbody tr:nth-child(even) {
  background: #fcfcfc;
}

.request-history-table tbody tr:hover {
  background: #f9f9f9;
}

/* Manage Accounts: Customer IDs was absorbing leftover width and clipping Role.
   Eight-column (Super Admin) widths sum to 100%. Customer IDs is 12%
   (about half of the share it took before). Role is 16%, about 20% wider
   than the squeezed select, and wide enough for "DCP Super Admin". */
.accounts-list-table {
  table-layout: fixed;
}

.accounts-list-table col.accounts-col-user { width: 6%; }
.accounts-list-table col.accounts-col-email { width: 22%; }
.accounts-list-table col.accounts-col-name { width: 14%; }
.accounts-list-table col.accounts-col-contact { width: 12%; }
.accounts-list-table col.accounts-col-customers { width: 12%; }
.accounts-list-table col.accounts-col-status { width: 9%; }
.accounts-list-table col.accounts-col-role { width: 16%; }
.accounts-list-table col.accounts-col-action { width: 9%; }

.accounts-list-table th.accounts-customer-ids,
.accounts-list-table td.accounts-customer-ids {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.accounts-list-table th.accounts-role,
.accounts-list-table td.accounts-role {
  min-width: 13.5rem;
}

.accounts-list-table .admin-role-select {
  width: 100%;
}

.history-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.history-status-approved {
  background: #d9f2e3;
  color: #17653a;
}

.history-status-created {
  background: #d9f2e3;
  color: #17653a;
}

.history-status-deleted {
  background: #f8d7da;
  color: #842029;
}

.history-status-edited {
  background: #dce9fa;
  color: #0d6efd;
}

.history-empty {
  text-align: center;
  color: #777;
  padding: 24px;
}

.inline-admin-form {
  display: inline;
  margin: 0;
}

.table-action-button {
  border: none;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deactivate-action {
  background: #db3721;
  color: #ffffff;
}

.deactivate-action:hover {
  background: #a71d0b;
}

.reactivate-action {
  background: #007749;
  color: #ffffff;
}

.reactivate-action:hover {
  background: #0b5a3c;
}

.history-status-active {
  background: #d9f2e3;
  color: #17653a;
}

.history-status-inactive {
  background: #f8d7da;
  color: #842029;
}

.history-status-pending {
  background: #fff3cd;
  color: #856404;
}

.history-status-declined {
  background: #f1d6db;
  color: #7a2130;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);

    justify-content: center;
    align-items: center;

    padding: 20px;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    width: 100%;
    max-width: 550px;

    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(0,0,0,0.15),
        0 8px 20px rgba(0,0,0,0.08);

    overflow: hidden;

    text-align: center;
}

/* 🔴 DEACTIVATE */
/* 🟢 ROLE CHANGE */
.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-content {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.news-button {
  display: inline-block;
  background: #df5934;
  padding: 6px 14px;
  border: 1px solid #df5934;
  color: #fff1ed;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  margin-top: auto;
}

.news-button:hover {
  background: #c94d2c;
  color: #ffffff;
}

.publish-button {
  background: #007749;
  color: #ffffff;
  border: none;
  padding: 12px 0;
  width: 150px;
  margin-top: 20px;
  display: block; 
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
}

.publish-button:hover {
  background: #0b5a3c;
}

.publish-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 1750px;
}

/* Manage Account page — dashboard shell + wide desktop grid */
.account-manage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.account-manage-card-wide {
  grid-column: 1 / -1;
}

.account-manage-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.account-manage-header-actions .table-action-button {
  border-radius: 8px;
}

.account-manage-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: start;
  column-gap: 1.5rem;
  row-gap: 1rem;
  margin: 0;
}

.account-manage-summary-email {
  min-width: 0;
}

.account-manage-summary-email dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-manage-summary-meta {
  white-space: nowrap;
}

.account-manage-summary dt {
  font-size: 0.8rem;
  font-weight: 700;
  color: #617066;
  margin-bottom: 0.25rem;
}

.account-manage-summary dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.account-manage-profile-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.account-manage-field {
  margin-bottom: 0;
  min-width: 0;
}

.account-manage-field label {
  display: block;
  margin-bottom: 6px;
  color: #617066;
  font-size: 0.82rem;
  font-weight: 700;
}

.account-manage-link-form {
  max-width: 100%;
  position: relative;
  margin-top: 8px;
}

.account-manage-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.account-manage-link-row .publish-button {
  margin-top: 1.7rem;
  white-space: nowrap;
}

.account-manage-profile-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 1000px) {
  .account-manage-grid,
  .account-manage-summary,
  .account-manage-profile-fields,
  .account-manage-link-row {
    grid-template-columns: 1fr;
  }

  .account-manage-summary-meta {
    white-space: normal;
  }

  .account-manage-link-row .publish-button {
    margin-top: 0;
    width: 100%;
  }
}

.profile-field[readonly] {
  background-color: #f3f4f6;
  color: #374151;
  cursor: default;
}

.customer-search-wrap {
  position: relative;
}

.customer-search-hint {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
}

.customer-search-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% - 0.25rem);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-soft, #d1d5db);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.customer-search-results li {
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-size: 0.92rem;
}

.customer-search-results li:hover,
.customer-search-results li:focus {
  background: #eef7f1;
  outline: none;
}

.customer-search-results .customer-search-empty {
  color: #6b7280;
  cursor: default;
}

.customer-search-results .customer-search-empty:hover {
  background: transparent;
}

.customer-search-name {
  color: #4b5563;
  font-weight: 400;
}

.news-detail-card {
  background: white;
  border: 1px solid #eee;
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.news-detail-card-body {
  padding: 24px;
}

.news-detail-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  text-decoration: underline;
  color: #df5934;
  font-weight: 600;
}

.back-link:hover {
  color: #c94d2c;
}

.back-link-wrapper {
  margin-left: clamp(16px, 5vw, 170px);
  margin-top: 20px;
}

.news-action-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.edit-news-button {
  background: #007749;
  color: white;
  text-decoration: none;
}

.edit-news-button:hover {
  background: #0b5a3c;
  color: white;
}

.news-cancel-button {
  background: #db2121;
  color: #ffffff;
  border: none;
  padding: 12px 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.news-cancel-button:hover {
  background: #a70b0b;
}

.news-approve-button {
  background: #007749;
  color: #ffffff;
  border: none;
  padding: 12px 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.news-approve-button:hover {
  background: #0b5a3c;
}

.admin-actions {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.admin-role-section {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}

.admin-button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-password {
  background: none;
  border: none;
  color: #007749;
  cursor: pointer;
  font-size: 13px;
}

.logout-item {
  border-top: 1px solid #eee;
}

.profile-field-row {
    margin-bottom: 20px;
}

.profile-label {
    display: block;

    margin-bottom: 6px;

    color: #7a847c;

    font-size: 0.69rem;
    font-weight: 800;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.profile-role-label {
    margin-bottom: 12px;
}

.profile-edit-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f7faf6;

    border: 1px solid #cbdac8;
    border-radius: 12px;

    color: #345e2d;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.profile-edit-btn:hover {
    background: #e9f1e6;
    border-color: #bacab6;
}

.profile-name-actions {
  gap: 10px;
}

.profile-password-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chngpssword-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    background: var(--agnvet-green);

    color: #ffffff;

    border: none;
    border-radius: 12px;

    font-size: 0.86rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.chngpssword-button:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 18px rgba(50,91,42,0.18);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 70px;
}

.profile-accounts-list {
    max-height: 220px;
    overflow-y: auto;

    border: 1px solid #e5ebe5;
    border-radius: 12px;


    background: #fafcfa;
}

.profile-id-list {
  display: block;
  padding: 12px 15px;
  font-size: 14px;
}

.profile-id-list:hover {
  background: #eef5ee;
}

.account-id-section .add-account-button {
  margin-bottom: 10px;
}

.additional-flag {
    background: #fff3cd;
    color: #856404;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 6px;
    display: inline-block;
}

.filter-row input,
.filter-row select {
    width: 100%;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.text-red {
    color: #d32f2f;
    font-weight: 700;
}

.account-tabs {
    border-bottom: 1px solid #e5e5e5;
}

.account-tabs .nav-link {
    color: #4a4a4a;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.75rem 0.85rem;
    background: transparent;
    white-space: nowrap;
}

.account-tabs .nav-link:hover {
    color: #df5934;
    border-bottom: 3px solid #bfe3cc;
}

.account-tabs .nav-link.active,
.account-tabs .nav-link:focus {
    color: #df5934 !important;
    border-bottom: 3px solid #df5934 !important;
    background: transparent !important;
}

/* =========================================================
   SHARED PORTAL PAGE SHELL
   ========================================================= */

.portal-page {
    flex: 1;
    padding: 32px 24px 60px;
    background: var(--surface-page);
    }

.portal-page-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    min-width: 0;
}

.portal-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.portal-alert-success {
    color: #256029;
    background: #edf8ed;
    border: 1px solid #cce8ce;
}

.portal-alert-success i {
    color: var(--agnvet-leaf);
}

.portal-alert-danger {
    color: #7f1d1d;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.portal-alert-danger i {
    color: #dc2626;
}

.portal-alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.portal-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 26px;
}

.portal-page-heading {
    max-width: 680px;
}

.portal-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--agnvet-leaf);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-page-heading h1 {
    margin: 0;
    color: var(--text-heading);
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.portal-page-heading p {
    max-width: 600px;
    margin: 10px 0 0;
    color: #667269;
    font-size: 0.96rem;
    line-height: 1.65;
}

.portal-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.portal-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

/* =========================================================
   ACCOUNT DETAILS PAGE
   ========================================================= */

/* =========================================================
   ACCOUNT SWITCHER
   ========================================================= */

.account-switcher-form {
    width: min(100%, 390px);
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dfe7df;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(28, 49, 31, 0.06);
}

.account-switcher-form > label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 9px 2px;
    color: #647067;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.account-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.account-select-wrapper > i:first-child {
    position: absolute;
    left: 15px;
    z-index: 1;
    color: #4d7c3f;
    font-size: 0.9rem;
    pointer-events: none;
}

.account-select-wrapper select {
    width: 100%;
    min-height: 48px;
    padding: 0 42px 0 42px;
    color: #26372a;
    background: #f7faf7;
    border: 1px solid #dce5dc;
    border-radius: 11px;
    outline: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.account-select-wrapper select:hover {
    background: #ffffff;
    border-color: #abc0ab;
}

.account-select-wrapper select:focus {
    background: #ffffff;
    border-color: #4d7c3f;
    box-shadow: 0 0 0 4px rgba(77, 124, 63, 0.11);
}

.account-select-arrow {
    position: absolute;
    right: 16px;
    color: #647067;
    font-size: 0.72rem;
    pointer-events: none;
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 24px;
}

/* =========================================================
   PROFILE CARD
   ========================================================= */

.account-profile-card {
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dfe6df;
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(35, 55, 38, 0.07);
}

.account-profile-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    padding: 24px;
}

.account-profile-header-small {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 15px;
}


.account-profile-title {
    min-width: 0;
    flex: 1;
}

.account-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.account-title-line h2 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #17221a;
    font-size: clamp(1.2rem, 2vw, 1.52rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.account-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    color: #38642f;
    background: #eaf4e7;
    border: 1px solid #d1e5cc;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
}

.account-status-dot {
    width: 7px;
    height: 7px;
    background: #5a9149;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(90, 145, 73, 0.14);
}

.account-number {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: #68736a;
    font-size: 0.84rem;
    font-weight: 550;
}

.account-number i {
    color: #87a17f;
    font-size: 0.75rem;
}

.account-header-tooltip {
    margin-left: auto;
}

.account-profile-body {
    padding: 4px 28px;
}

/* =========================================================
   PROFILE SECTIONS
   ========================================================= */

.account-section {
    padding: 24px 0;
    border-bottom: 1px solid #f1f5f9;
}

.account-section-last {
    border-bottom: 0;
}

.account-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--agnvet-green);
    background: #eef5ec;
    border-radius: 11px;
    font-size: 0.9rem;
}

.account-section-heading h3 {
    margin: 0;
    color: #27332a;
    font-size: 1rem;
    font-weight: 780;
}

.account-section-heading p {
    margin: 3px 0 0;
    color: #7a847c;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* =========================================================
   CONTACT DETAILS
   ========================================================= */

.account-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.account-detail-item {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
    padding: 16px;
    background: #f8faf8;
    border: 1px solid #e5ebe5;
    border-radius: 14px;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.account-detail-item:hover,
.delivery-card:hover {
    transform: translateY(-1px);
    border-color: #d1d5db;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.detail-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--agnvet-green);
    background: #eaf2e8;
    border-radius: 11px;
    font-size: 0.88rem;
}

.detail-content,
.address-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    display: block;
    color: #7a857d;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    line-height: 1.3;
    text-transform: uppercase;
}

.detail-value {
    display: block;
    overflow-wrap: anywhere;
    color: #202b23;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.45;
}

/* =========================================================
   ADDRESS
   ========================================================= */

.account-address-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: linear-gradient(135deg, #f7faf7, #fbfcfb);
    border: 1px solid #e2e9e2;
    border-radius: 14px;
}

.address-pin {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: var(--agnvet-green);
    border-radius: 12px;
    box-shadow: 0 7px 15px rgba(77, 124, 63, 0.18);
}

/* =========================================================
   DOCUMENT DELIVERY
   ========================================================= */

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.delivery-card {
    min-width: 0;
    padding: 18px;
    background: #f8faf8;
    border: 1px solid #e3eae3;
    border-radius: 15px;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.delivery-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.delivery-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--agnvet-green);
    background: #eaf3e8;
    border-radius: 12px;
    font-size: 0.92rem;
}

.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 750;
}

.delivery-badge-email {
    color: #38642f;
    background: #e7f3e4;
}

.delivery-badge-post {
    color: #725926;
    background: #f8efd8;
}

.delivery-value {
    display: block;
    margin-top: 6px;
    overflow-wrap: anywhere;
    color: #223026;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.5;
}

/* =========================================================
   SIDE COLUMN
   ========================================================= */

.account-side-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-update-card {
    position: relative;
    overflow: hidden;
    padding: 25px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--agnvet-green-dark), var(--agnvet-green));
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(50, 91, 42, 0.18);
}

.account-update-card::before {
    position: absolute;
    top: -65px;
    right: -55px;
    width: 165px;
    height: 165px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
}

.account-update-card::after {
    position: absolute;
    right: 45px;
    bottom: -80px;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.045);
    border-radius: 50%;
    content: "";
}

.update-card-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    font-size: 1rem;
}

.update-card-content {
    position: relative;
    z-index: 1;
}

.side-card-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.account-update-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.23rem;
    font-weight: 800;
    line-height: 1.3;
}

.account-update-card p {
    margin: 11px 0 21px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    line-height: 1.65;
}

.account-update-button {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 47px;
    gap: 9px;
    padding: 0 17px;
    color: #345e2d;
    background: #ffffff;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.account-update-button:hover {
    background: #f7faf6;
    box-shadow: 0 8px 18px rgba(22, 45, 18, 0.16);
}

.account-help-card {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 19px;
    background: #ffffff;
    border: 1px solid #dfe7df;
    border-radius: 17px;
}

.help-card-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--agnvet-green);
    background: #edf5eb;
    border-radius: 11px;
}

.account-help-card h3 {
    margin: 1px 0 6px;
    color: #2b372d;
    font-size: 0.84rem;
    font-weight: 750;
}

.account-help-card p {
    margin: 0;
    color: #758078;
    font-size: 0.77rem;
    line-height: 1.55;
}

/* =========================================================
   TOOLTIPS
   ========================================================= */

.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #7c897e;
    cursor: help;
}

.info-tooltip > i {
    font-size: 0.83rem;
}

.tooltip-text {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    bottom: auto;
    left: auto;
    height: auto;
    z-index: 9999;

    width: 260px;
    padding: 12px 13px;

    background: #000000;
    color: #ffffff;

    border-radius: 10px;
    box-shadow: 0 9px 24px rgba(22, 35, 24, 0.2);

    font-size: 0.73rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    text-transform: none;

    white-space: normal;
    word-wrap: break-word;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transform: translateY(-4px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.tooltip-text::before {
    content: "";

    position: absolute;
    bottom: 100%;
    right: 14px;

    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #000000;
}

.info-tooltip:hover .tooltip-text,
.info-tooltip:focus-within .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dashboard-kpi-card .tooltip-text {
    left: 0;
    right: auto;
}

.dashboard-kpi-card .tooltip-text::before {
    left: 12px;
    right: auto;
}

/* =========================================================
   MODAL
   ========================================================= */

body.account-modal-open {
    overflow: hidden;
}

.account-modal-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(14, 24, 16, 0.62);
    backdrop-filter: blur(5px);
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.account-modal-overlay.is-visible {
    visibility: visible;
    opacity: 1;
}

.account-modal {
    width: min(100%, 720px);
    max-height: calc(100vh - 44px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15, 29, 17, 0.28);
    transform: translateY(16px) scale(0.985);
    transition: transform 0.22s ease;
}

.account-modal-overlay.is-visible .account-modal {
    transform: translateY(0) scale(1);
}

.account-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 24px;
    background: #f8faf8;
    border-bottom: 1px solid #e5ebe5;
}

.modal-heading-wrapper {
    display: flex;
    align-items: center;
    gap: 13px;
}

.modal-heading-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: var(--agnvet-green);
    border-radius: 12px;
}

.modal-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #758078;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.account-modal-header h2 {
    margin: 0;
    color: #202b23;
    font-size: 1.18rem;
    font-weight: 800;
}

.modal-close-button {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #69746c;
    background: #ffffff;
    border: 1px solid #dfe6df;
    border-radius: 10px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.modal-close-button:hover {
    color: #ffffff;
    background: var(--agnvet-green);
}

.account-modal-body {
    max-height: calc(100vh - 138px);
    padding: 23px 24px 24px;
}

.modal-intro {
    margin: 0 0 20px;
    color: #6f7a72;
    font-size: 0.85rem;
    line-height: 1.6;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.modal-form-group {
    min-width: 0;
}

.modal-form-group-full {
    grid-column: 1 / -1;
}

.modal-form-group > label {
    display: block;
    margin: 0 0 7px 2px;
    color: #465249;
    font-size: 0.75rem;
    font-weight: 750;
}

.modal-input-wrapper {
    position: relative;
}

.modal-input-wrapper > i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #849087;
    font-size: 0.82rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.modal-input-wrapper input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px 0 41px;
    color: #202b23;
    background: #f8faf8;
    border: 1px solid #dbe4db;
    border-radius: 11px;
    outline: none;
    font-family: inherit;
    font-size: 0.84rem;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.modal-input-wrapper input::placeholder {
    color: #9aa39c;
}

.modal-input-wrapper input:hover {
    border-color: #bacbba;
}

.modal-input-wrapper input:focus {
    background: #ffffff;
    border-color: #4d7c3f;
    box-shadow: 0 0 0 4px rgba(77, 124, 63, 0.11);
}

.consent-section {
    margin-top: 20px;
}

.consent-section[hidden] {
    display: none;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    color: #546057;
    background: #f4f8f3;
    border: 1px solid #dde8db;
    border-radius: 11px;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1.5;
}

.consent-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.consent-checkmark {
    display: grid;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    place-items: center;
    color: transparent;
    background: #ffffff;
    border: 1px solid #b8c8b7;
    border-radius: 5px;
    font-size: 0.58rem;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.consent-checkbox input:checked + .consent-checkmark {
    color: #ffffff;
    background: #4d7c3f;
    border-color: #4d7c3f;
}

.form-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.45;
}

.form-message-error {
    color: #8b2828;
    background: #fff1f1;
    border: 1px solid #f1cccc;
}

.form-message i {
    margin-top: 2px;
}

.d-none {
    display: none !important;
}

.account-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid #e8ede8;
}

.modal-cancel-button,
.modal-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 8px;
    padding: 0 18px;
    border-radius: 11px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.modal-cancel-button {
    color: #59645c;
    background: #ffffff;
    border: 1px solid #d8e0d8;
}

.modal-cancel-button:hover {
    color: #28322a;
    background: #f5f7f5;
    border-color: #bcc9bc;
}

.modal-submit-button {
    color: #ffffff;
    background: var(--agnvet-green);
    border: 1px solid var(--agnvet-green-dark);
    box-shadow: 0 6px 14px rgba(77, 124, 63, 0.17);
}

.modal-submit-button:hover {
    background: var(--agnvet-green-dark);
    border-color: #3f6b34;
    box-shadow: 0 8px 18px rgba(77, 124, 63, 0.24);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-side-column {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .account-help-card {
        min-height: 100%;
    }
}

@media (max-width: 760px) {
    .portal-page {
        padding: 22px 15px 45px;
    }

    .portal-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
    }

    .account-switcher-form {
        width: 100%;
    }

    .account-profile-header {
        align-items: flex-start;
        padding: 21px 19px;
    }

    .account-profile-body {
        padding: 3px 19px;
    }

    .account-detail-grid,
    .delivery-grid,
    .account-side-column,
    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-form-group-full {
        grid-column: auto;
    }

    .account-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .account-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }

    .account-modal-body {
        max-height: calc(92vh - 85px);
        padding: 20px 18px;
    }

    .account-modal-header {
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .account-title-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-header-tooltip {
        display: none;
    }

    .account-detail-item {
        padding: 14px;
    }

    .account-section {
        padding: 23px 0;
    }

    .account-modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal-cancel-button,
    .modal-submit-button {
        width: 100%;
    }

    .tooltip-text {
        right: -10px;
        width: 230px;
    }
}

.download-account-btn {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    background: #df5934;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.download-account-btn:hover {
    background: #c94d2c;
    color: white;
}


.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
}

.modal-box {
    width: min(100%, 520px);
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15,29,17,0.28);
    overflow: hidden;
    text-align: left;
    transform: translateY(12px) scale(0.985);
    animation: modalEnter 0.22s ease forwards;
}

body.modal-open {
    overflow: hidden;
}

.modal-box input,
.modal-box textarea {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.3rem;
    margin-bottom: 0.9rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.modal-box h4 {
    display: flex;
    align-items: center;

    margin: 0;
    padding: 22px 24px;

    background: #f8faf8;
    border-bottom: 1px solid #e5ebe5;

    color: #202b23;

    font-size: 1.15rem;
    font-weight: 800;
}

#confirmText {
    margin: 0;
    padding: 24px;

    color: #6f7a72;

    font-size: 0.9rem;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 20px 24px;

    border-top: 1px solid #e8ede8;
}

/* Buttons */
.confirm-btn {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    background: var(--agnvet-green);

    color: #ffffff;

    border: none;
    border-radius: 11px;

    font-size: 0.82rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}

.confirm-btn:hover {
    background: var(--agnvet-green-dark);
    box-shadow: 0 8px 18px rgba(50,91,42,0.18);
}

.cancel-btn {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    background: #ffffff;
    color: #59645c;

    border: 1px solid #d8e0d8;
    border-radius: 11px;

    font-size: 0.82rem;
    font-weight: 750;

    cursor: pointer;

    transition: all .2s ease;
}

.cancel-btn:hover {
    background: #f5f7f5;
    border-color: #bcc9bc;
    color: #28322a;
}

.edit-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9rem;
    text-align: left;
}

.edit-row label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #363b3a;
}

.edit-row input {
    width: 100%;
    padding: 0.55rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.edit-row input:focus {
    border-color: #026b43;
    outline: none;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(0, 119, 73, 0.08);
    flex-wrap: wrap;
    gap: 4px;
}

.summary-item:hover {
    background: #d1dfda94;
}

.summary-item.history:hover {
    background: #f0f0f094;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #5f7a6f;
}

.summary-item strong {
    font-size: 1.1rem;
    font-weight: 650;
    color: #1b2e25;
}

.summary-item.overdue strong {
    color: #c0392b;
}

.account-status {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 12px;
}

.status-danger {
    color: #c0392b;
}

.status-good {
    color: #007749;
}

.balance-section-title {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.recaptcha-btn {
  display: flex;
  justify-content: center;
}

.recaptcha-login-btn{ 
  display: flex;
  justify-content: center;
  margin-top: -18px;
  margin-bottom: 15px;
}

.audit-preview {
    cursor: pointer;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #007749;
    font-weight: 500;
}

.audit-preview:hover {
    text-decoration: underline;
}

.audit-modal-box {
    width: 700px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.audit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.audit-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.audit-close-btn:hover {
    color:#007749;
}

.audit-modal-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.audit-modal-field {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 8px;
}

.audit-modal-label {
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.audit-modal-value {
    word-break: break-word;
    color: #333;    
}

.status-change {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-change-reactivated {
  background: #d9f2e3;
  color: #17653a;
}

.status-change-deactivated {
  background: #f8d7da;
  color: #842029;
}

.status-change-new-account {
  background: #dce9fa;
  color: #0d6efd;
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: auto;
  min-width: 120px;
  text-align: center;
}

.status-change-additional-request {
  background: #f5f8d7;
  color: #846920;
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: auto;
  min-width: 110px;
  text-align: center;
}

.export-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 47px;
    padding: 0 18px;
    background: #ffffff;
    color: #345e2d;
    border: 1px solid #dfe7df;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 0;
}

.export-button:hover {
    background: #f7faf6;
    border-color: #cbdac8;
    color: #345e2d;
    box-shadow: 0 8px 18px rgba(22, 45, 18, 0.08);
}

.admin-warning {
    color: #d9534f;
    font-size: 12px;
    font-weight: 500;
}

.admin-alert-warning {
    color: #d9534f;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.manual-id-row {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
}

.manual-id-row .form-control {
    flex: 1;
    min-width: 0;
}

.manual-search-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
}

.manual-search-wrap .customer-search-results {
    top: calc(100% + 2px);
}

.manual-row {
    width: 100%;
}
.tick-button {
  background: #ffffff;
  color: #2fc247;
  border: 1px solid #31b118;
  width: 34px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tick-button:hover {
  background: #31b118;
  color: #ffffff;
}

.cross-button {
  background: #ffffff;
  color: #b02a37;
  border: 1px solid #dc3545;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cross-button:hover {
  background: #dc3545;
  color: #ffffff;
}

.manual-id-row.confirmed input {
    background-color: #e9f7ef;
}

.admin-checkbox input:disabled + span {
    cursor: default;
}

/* =========================================================
   Modern Dashboard - AGnVET Customer Portal
   ========================================================= */

.dashboard-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 5px;
    min-width: 0;
    max-width: 100%;
}

.dashboard-title {
    margin: 0;
    color: #1f2933;
    font-size: 32px;
    font-weight: 700;
}

.dashboard-header-text {
  display: flex;
  flex-direction: column;
}

.dashboard-header-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 550px) auto;
    align-items: center;
    justify-content: start;
}

.dashboard-account-switcher {
    width: fit-content;
    justify-self: start;

    background: #f7fbf6;
    border: 1px solid #d9e5d9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.account-switcher-label {
    display: block;
    color: #46624d;
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 700;
}

.account-switcher-label-1 {
    display: block;
    color: #46624d;
    margin-top: 3px;
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 700;
}

/* KPI cards */

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.dashboard-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-panel);
    padding: 22px;
    min-height: 140px;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    box-sizing: border-box;
}

.dashboard-kpi-card.balance-card {
    background: #a7efbd;
    border-color: #8ddfa8;
}

.dashboard-kpi-card.overdue-card {
    background: #ffffff;
    border-color: #efd1d1;
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #48614d;
    font-size: 14px;
    font-weight: 700;
}

.kpi-card-header i {
    color: #146b3a;
    opacity: 0.85;
}

.overdue-card .kpi-card-header,
.overdue-card .kpi-card-header i {
    color: #c62828;
}

.kpi-card-value {
    color: #1f2933;
    font-size: 30px;
    font-weight: 800;
    margin-top: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kpi-card-value-small {
    color: #1f2933;
    font-size: 18px;
    font-weight: 800;
    margin-top: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.top-product-name.is-loading,
.top-product-footer.is-loading {
    color: #94a3b0;
    font-weight: 600;
}

.kpi-card-value-account {
    color: #0a532a;
    font-size: 30px;
    font-weight: 800;
    margin-top: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kpi-card-value.small {
    font-size: 24px;
}

.overdue-card .kpi-card-value {
    color: #d12c2c;
}

.kpi-card-footer {
    color: #617066;
    font-size: 13px;
    margin-top: 10px;
}

/* Panels */

.dashboard-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 22px;
    box-shadow: var(--shadow-card);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 18px;
}

.dashboard-panel-header h2{
    font-weight: 800;
    font-size: 22px;
}

.dashboard-panel-header.with-link {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    font-size: 24px;
}

.dashboard-panel-header p {
    margin: 0;
    color: #617066;
    font-size: 14px;
}

.dashboard-text-link {
    color: #146b3a;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.dashboard-text-link:hover {
    text-decoration: underline;
}

/* Quick actions */

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.quick-action-tile {
    border: 1px solid #d9e5d9;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    background: #fbfdfb;
    transition: all 0.2s ease;
}

.quick-action-tile:hover {
    border-color: #146b3a;
    box-shadow: 0 3px 10px rgba(20, 107, 58, 0.12);
    transform: translateY(-1px);
}

.quick-action-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--agnvet-green);
    background: #eaf3e8;
    border-radius: 12px;
    font-size: 0.92rem;
}

.quick-action-tile strong {
    display: block;
    color: #1f2933;
    font-size: 15px;
    margin-bottom: 4px;
}

.quick-action-tile span {
    display: block;
    color: #617066;
    font-size: 13px;
    line-height: 1.35;
}

/* Tables */

.dashboard-table-wrap {
    overflow-x: auto;
}

.dashboard-modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dashboard-modern-table thead {
    background: #e5ebe3;
}

.dashboard-modern-table th {
    color: #435345;
    text-align: left;
    font-weight: 800;
    padding: 13px 25px;
    border-bottom: 1px solid #d6ded4;
}

.dashboard-modern-table td {
    padding: 14px;
    border-bottom: 1px solid #edf1ec;
    color: #25302a;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dashboard-modern-table tbody tr:hover {
    background: #f8fbf7;
}

.amount-column {
    text-align: right;
    font-weight: 800;
}

.negative-amount {
    color: #c62828;
}

.positive-amount {
    color: #146b3a;
}

.empty-table-message {
    text-align: center;
    color: #617066;
    padding: 28px !important;
}

/* News cards */

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.news-badge {
  display: inline-block;
  background: #df5934;
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.news-mini-card {
    border: 1px solid #d9e5d9;
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    background: #fbfdfb;
    transition: all 0.2s ease;
}

.news-card {
  background: #ffffff;
  border: 1px solid #d9e5d9;
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.news-card:hover {
    border-color: #bdd7bd;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.news-card.placeholder {
    cursor: default;
}

.news-mini-card:hover {
    border-color: #146b3a;
    box-shadow: 0 3px 10px rgba(20, 107, 58, 0.12);
    transform: translateY(-1px);
}

.news-mini-card.placeholder {
    cursor: default;
}

.news-date {
    display: inline-block;
    color: #007749;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 8px;
}

.news-mini-card strong {
    display: block;
    color: #1f2933;
    font-size: 15px;
    margin-bottom: 7px;
}

.news-mini-card p {
    margin: 0;
    color: #617066;
    font-size: 13px;
    line-height: 1.4;
}

.news-card strong {
    display: block;
    color: #1f2933;
    font-size: 15px;
    margin-bottom: 7px;
}

.news-card p {
    margin: 0;
    color: #617066;
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-date {
    margin: 0;
    font-size: 14px;
    color: #5f6d63;
}

/* =========================================================
   Account page — dashboard-modern alignment
   ========================================================= */

.account-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.account-side-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}


/* =========================================================
   Profile page — dashboard-modern alignment
   ========================================================= */

.profile-hero-card {
    width: fit-content;
    justify-self: start;

    background: #f7fbf6;
    border: 1px solid #d9e5d9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.account-main-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Shared: the "quick action tile" used as a clickable side-panel
   button on both the account page and the profile page */
#info-side-card .quick-action-tile {
    border: none;
    background: transparent;
    padding: 0;
}

#info-side-card .quick-action-tile:hover {
    transform: none;
    box-shadow: none;
}

#info-side-card .quick-action-icon {
    background: #e7f5ea;
    color: #146b3a;
    margin-bottom: 5px;
}

/* =========================================================
   News page — search + category filter bar
   ========================================================= */

.news-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9e5d9;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2933;
    background: #ffffff;
    box-sizing: border-box;
}

.news-search-field .news-search-input {
    padding-left: 2.4rem;
}

.contact-search-box > .news-search-input {
    max-width: 320px;
}

.news-search-input:focus {
    outline: none;
    border-color: #146b3a;
}

.news-category-select {
    padding: 10px 14px;
    border: 1px solid #d9e5d9;
    border-radius: 10px;
    background: #fbfdfb;
    color: #1f2933;
    font-size: 14px;
    font-weight: 600;
    min-width: 170px;
}

.news-category-select:focus {
    outline: none;
    border-color: #146b3a;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1800px) {
    .dashboard-right {
        width: 100%;
    }

    .publish-card {
      width: 100%;
      max-width: 1180px;
    }

    .admin-card {
      width: 100%;
      max-width: 1180px;
    }
}

@media (max-width: 1100px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-left {
        max-width: 100%;
    }

    .admin-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

}

@media (max-width: 1000px) {
    .dashboard-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-kpi-grid,
    .quick-actions-grid,
    .news-card-grid,
    .account-content-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-header.with-link {
        flex-direction: column;
    }

    .dashboard-text-link {
        white-space: normal;
    }
}

@media (max-width: 768px) {

    .news-grid {
      grid-template-columns: 1fr;
    }

    .account-info-row {
      grid-template-columns: 1fr;
      gap: 4px;
      padding: 0.75rem 0;
    }

    .portal-page-heading h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
    }

    .portal-page-heading p {
        font-size: 0.92rem;
    }

    .dashboard-modern-table,
    .request-history-table,
    .market-table {
        font-size: 0.85rem;
    }

    .account-tabs {
        flex-wrap: wrap;
    }

    .account-tabs .nav-link {
        font-size: 0.85rem;
    }

    .dashboard-panel {
        padding: 16px;
    }

    .kpi-card-value,
    .kpi-card-value-account {
        font-size: 1.55rem;
    }

    .dashboard-kpi-card {
        padding: 16px;
    }

    .download-account-btn {
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .dashboard-title {
        font-size: 24px;
    }

    .kpi-card-value {
        font-size: 26px;
    }

    .dashboard-action-button {
        width: 100%;
        justify-content: center;
    }

    .balance-total-value {
        font-size: 28px;
    }

    /* Fix: hero header (title + account switcher) was overlapping
       on narrow screens because .dashboard-header-wrapper forced two
       grid columns side by side no matter how little room there was.
       Stack it into a single column instead. */
    .dashboard-header-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dashboard-account-switcher {
        width: 100%;
    }

    .account-switcher-select {
        min-width: 0;
        max-width: 100%;
    }

    .profile-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: -10px;
    font-size: 0.7rem;
    line-height: 1.4;
    color: #495057;
    cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #007749;
    flex-shrink: 0;
}

.statement-filter-row th {
    background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f9 100%);
    border-bottom: 1px solid #e8edf2;
    padding: 14px 16px;
}

.statement-filter-wrap {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.document-date-filters {
    width: 100%;
    max-width: 100%;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f9 100%);
    border: 1px solid #e8edf2;
    border-radius: 12px;
    box-sizing: border-box;
}

.statement-filter-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.statement-filter-wrap label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.statement-filter-wrap input[type="date"] {
    height: 40px;
    min-width: 0;
    max-width: 100%;
    padding: 0 14px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    background: #ffffff;

    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.statement-filter-wrap input[type="date"]:hover {
    border-color: #cbd5e1;
}

.statement-filter-wrap input[type="date"]:focus {
    outline: none;
    border-color: #007749;
    box-shadow: 0 0 0 4px rgba(0, 119, 73, 0.12);
}

.statement-filter-wrap button {
    height: 40px;
    padding: 0 18px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #ffffff;
    color: #475569;

    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;

    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);

    cursor: pointer;
}

.statement-filter-wrap button:hover {
    background: #f8fafc;
    color: #1e293b;
}

.accounts-banner {
    display: flex;
    max-width: 550px;
    gap: 20px;
}

.accounts-contact {
    padding: 18px;
    background: #fdfdfd;
    border: 1px solid #e5ebe5;
    border-radius: 16px;
    margin-bottom: 20px;
}

.accounts-contact h4 {
    margin: 0 0 6px;
    color: #27332a;
    font-size: 0.9rem;
    font-weight: 780;
}

.accounts-contact p {
    margin: 0;
    color: #758078;
    font-size: 0.82rem;
    line-height: 1.5;
}

.accounts-contact a {
    color: #4d7c3f;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.accounts-contact a:hover {
    color: #345e2d;
    text-decoration: underline;
}
.contact-search-box {
    display: flex;
    position: relative;
    max-width: 640px;
    margin-bottom: 1.5rem;
    gap: 12px;
    align-items: center;
}

.contact-search-box.news-filter-bar {
    max-width: 720px;
}

.news-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.news-search-field .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b1;
    pointer-events: none;
}

.news-search-field .news-search-input,
.news-search-field input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.contact-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b1;
}

.contact-search-box input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-search-box input:focus {
    outline: none;
    border-color: #007749;
    box-shadow: 0 0 0 3px rgba(0, 119, 73, 0.12);
}

.contact-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    background: #fff;
    border: 1px solid #d9e5d9;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.contact-card:hover {
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
    transform: translateY(-2px);
}

.branch-title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: #df5934;
    margin-bottom: 2px;
    font-weight: 700;
    border-bottom: 1px solid #f0f2f4;
    padding-bottom: 0.6rem;
}

.contact-detail,
.bm-contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 0.45rem;
}

.contact-detail i,
.bm-contact-detail i {
    color: #007749;
    width: 14px;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.contact-detail a,
.bm-contact-detail a {
    color: #4a5568;
    text-decoration: none;
}
.contact-detail a:hover,
.bm-contact-detail a:hover { color: #0074d9; }

.manager-section {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed #e5e9ec;
}

.manager-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #33475b;
    margin-bottom: 0.35rem;
}

.manager-name {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #1a2b3c;
}

.no-results {
    text-align: center;
    color: #9aa5b1;
    padding: 2rem 0;
}

@media (max-width: 768px) {

    .contact-results {
        grid-template-columns: 1fr;
    }

    .branch-title {
        font-size: 1.6rem;
    }
}

.admin-header {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 30px;
    border: 1px solid #edf0f5;
}

.admin-header h1 {
    margin: 0;
    font-size: 32px;
    color: #1f2933;
}

.role-label {
    display: inline-block;
    color: #146b3a;
    font-size: 15px;
    font-weight: 700;
    padding: 4px 0px;
}

.add-admin-info {
    color: #617066;
    font-size: 13px;
    margin-top: -10px;
}

#info-side-card h2 {
    font-size: 1.25rem;
    color: #1f2937;
    font-weight: 700;
}

#info-side-card section{
  display: grid;
}

#info-side-card .dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 2px;
}

.chart-wrapper {
    position: relative;
    height: 100px;
}

@media (max-width: 900px) {
    .dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }

    .admin-dropdown-menu a {
      padding: 7px 7px;
      font-size: 12px;
    }

    .admin-dropdown-menu {
      min-width: 150px;
    }
}
.switch-dashboard-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    background:#df5934;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 10px;
    width: fit-content;
}

.switch-dashboard-button:hover {
    background:#c94d2c;
}

.stats-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.stats-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.03em;
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stats-kpi-card {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

.stats-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.stats-kpi-header span {
    font-size: 13px;
    color: #6b7280;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stats-kpi-header i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #fff1eb;
    color: #df5934;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stats-kpi-value {
    font-size: 42px;
    line-height: 1;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.05em;
    position: relative;
    z-index: 1;
}

.stats-kpi-footer {
    margin-top: 10px;
    color: #6b7280;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.stats-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.stats-chart-card {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.stats-chart-card-wide {
    grid-column: 1 / -1;
}

.stats-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.stats-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-card-title {
    font-size: 16px;
    font-weight: 850;
    color: #111827;
    margin: 0;
}

.stats-card-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.stats-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    background: #fff1eb;
    color: #df5934;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-chart-wrapper {
    height: 260px;
    position: relative;
}

.stats-role-chart-wrapper {
    height: 230px;
    position: relative;
}

.stats-mini-label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-mini-value {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 900;
    color: #111827;
}

@media (max-width: 1100px) {
    .stats-kpi-grid,
    .stats-chart-grid {
        grid-template-columns: 1fr;
    }

    .stats-page-header {
        flex-direction: column;
    }

}

@media (max-width: 700px) {
    .stats-kpi-value {
        font-size: 34px;
    }

}

.news-admin-stats {
    display: flex;
    flex-wrap: wrap;
}

.news-admin-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.news-admin-stat i {
    color: #df5934;
}

.news-top-bar {
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s ease;
}

.back-link:hover {
    color: #df5934;
}

.news-article {
    background: #ffffff;
    border-radius: 23px;
    padding: 48px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
}

.news-header {
    margin-bottom: 36px;
}

.news-meta-badge {
  color: #ffffff;
  background-color: #ea580c;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.news-meta-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.news-meta-pill i {
    color: #df5934;
    font-size: 12px;
}

.admin-meta {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.admin-meta i {
    color: #ea580c;
}

.news-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.03em;
}

.news-content {
    max-width: 1500px;
    margin: 0 auto;
    color: #374151;
    font-size: 18px;
    line-height: 1.9;
}

.news-content p {
    margin: 0 0 20px;
}

.news-content p:last-child {
    margin-bottom: 0;
}

.news-button {
    margin-top: 40px;
    background: #df5934;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 7px 15px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.news-button:hover {
    background: #ed3200;
}

@media (max-width: 900px) {
    .news-page {
        width: calc(100% - 24px);
        margin: 24px auto 60px;
    }

    .news-article {
        padding: 28px;
        border-radius: 4px;
    }

    .news-title {
        font-size: 32px;
    }

    .news-hero-image {
        height: 260px;
    }

    .news-hero-image-wrapper {
        border-radius: 4px;
    }

    .news-content {
        font-size: 16px;
        line-height: 1.75;
    }

    .home-icon-button {
      width: 40px;
      height: 40px;
    }

    .profile-icon {
      width: 28px;
      height: 28px;
      font-size: 12px;
    }

    .accounts-banner {
      flex-direction: column;
    }
}

.no-requests-card {
    padding: 3rem;
    text-align: center;
}

.no-requests-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.no-requests-content h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.4rem;
}

.no-requests-content p {
    margin: 0;
    color: #6b7280;
}

.market-table-container {
    margin-top: 1rem;
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.market-table thead {
    background: #f8f9fb;
}

.market-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.market-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.market-table tbody tr:hover {
    background: #fafafa;
}

.market-species-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(223, 89, 52, 0.12);
    color: #df5934;
    font-size: 0.8rem;
    font-weight: 600;
}

.dashboard-summary-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.dashboard-summary-layout > * {
    min-width: 0;
    max-width: 100%;
}

.dashboard-kpis {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
}

.weather-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}

.weather-page-grid {
    grid-template-columns: 1fr 1.5fr;
}
 
.weather-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem;
}
 
.weather-side-row {
    display: flex;
    gap: 1rem;
}
 
.weather-side-row .dashboard-panel {
    flex: 1;
    min-width: 0;
}
 
@media (max-width: 900px) {
    .weather-side-row {
        flex-direction: column;
    }
}

.weather-stat {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
}
 
.weather-stat-label {
    color: #6b7280;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
 
.weather-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-top: 0.15rem;
}
 
.weather-detail-panel {
    display: none;
}
 
.weather-detail-panel.active {
    display: block;
}
 
.weather-day-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: .8rem;
    min-width: 0;
    overflow: hidden;
}
 
.weather-day-option {
    text-decoration: none;
    color: inherit;
    display: grid;
    grid-template-columns: 2.25rem 1.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.55rem;
    border-radius: 5px;
    background: #f8f9fb;
    transition: background .2s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
 
.weather-day-option:hover {
    background: #eef2f7;
}
 
.weather-day-option.active {
    background: rgba(223,89,52,.1);
}
 
.weather-day-option .weather-day-name {
    font-weight: 600;
    color: #111827;
    font-size: .85rem;
    min-width: 0;
}
 
.weather-day-option .weather-day-icon {
    font-size: .9rem;
    text-align: center;
}
 
.weather-day-option .weather-day-temp {
    font-size: .85rem;
    color: #6b7280;
    text-align: right;
    white-space: nowrap;
    justify-self: end;
    min-width: 0;
}

.dashboard-weather-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #ffffff;
    border: 1px solid #d9e5d9;
    border-radius: 12px;
    padding: 14px 16px;
    min-height: 140px;
    min-width: 0;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    overflow: hidden;
}

.weather-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0.85rem;
    min-width: 0;
    width: 100%;
}

.weather-day-option {
    text-decoration: none;
    color: inherit;
    display: grid;
    grid-template-columns: 2.25rem 1.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    border-radius: 5px;
    background: #f8f9fb;
    transition: all .2s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.weather-day-option:hover {
    background: #eef2f7;
}

.weather-day-option.active {
    background: rgba(223,89,52,.1);
}

.weather-card-header {
    margin-bottom: .25rem;
}

.weather-card-header span {
    display: block;
    font-weight: 700;
    color: #111827;
}

.weather-card-header small {
    color: #9ca3af;
    font-size: .75rem;
}

.weather-card-header h4 {
  font-weight: 800;
}

.weather-location-form {
    margin: 8px 0 16px;
    padding: 0;
    background: transparent;
    border: 0;
}

.weather-location-form label {
    display: none;
}

.weather-location-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.weather-location-controls input[type="text"] {
    width: 56px;
    height: 28px;
    padding: 0 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #dbe3ea;
    border-radius: 6px;
    text-align: center;
}

.weather-location-save,
.weather-location-reset {
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.weather-location-save:hover {
    background: #d1d1d1;
}

.weather-location-reset {
    background: #fff;
    color: #475569;
    border-color: #dbe3ea;
}

.weather-location-reset:hover {
    background: #f8fafc;
}

.weather-location-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 119, 73, 0.12);
    color: #007749;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.weather-location-error {
    margin: 0;
    color: #b42318;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Order history: dim the table while a page is being fetched. */
.dashboard-table-wrap.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.weather-loading {
    padding: 1.25rem 0.5rem;
    color: #667269;
    font-size: 0.9rem;
    font-weight: 600;
}

.weather-loading.is-loading {
    opacity: 0.75;
}

.weather-location-hint {
    margin: 0;
    color: #667269;
    font-size: 0.8rem;
}

.weather-postcode-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 2px;
    vertical-align: middle;
}

.weather-postcode-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.weather-postcode-inline-input {
    width: 4.2em;
    padding: 1px 20px 0px 6px;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    background: transparent;
    font: inherit;
    font-weight: 600;
    font-size: 1em;
    color: #007749;
    text-align: center;
    cursor: text;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.weather-postcode-inline-input:hover {
    background: rgba(0, 119, 73, 0.06);
    border-bottom-color: #007749;
}

.weather-postcode-inline-input:focus {
    outline: none;
    background: #f0f7f3;
    border-bottom: 1px solid #007749;
}

.weather-postcode-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7em;
    color: #9ca3af;
    pointer-events: none;
}

.weather-postcode-inline-input:hover ~ .weather-postcode-icon,
.weather-postcode-inline-input:focus ~ .weather-postcode-icon {
    color: #007749;
}

.weather-postcode-edit {
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

.weather-postcode-edit:hover {
    color: #007749;
}

@media (max-width: 600px) {
    .weather-location-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .weather-location-controls input[type="text"],
    .weather-location-save,
    .weather-location-reset {
        width: 100%;
    }
}

.weather-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: .55rem 0;

    border-bottom: 1px solid #f3f4f6;

    font-size: .82rem;
}

.weather-row:last-child {
    border-bottom: none;
}

.weather-row-day {
    width: 35px;
    font-weight: 600;
}

.weather-detail-text {
  font-size: 11px;
}

.weather-detail-panel {
    display: none;
}

.weather-detail-panel.active {
    display: block;
}

.weather-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.weather-detail-day {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.weather-detail-date {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 2px;
}

.weather-detail-icon {
    font-size: 3rem;
    line-height: 1;
}

.weather-detail-temp {
    font-size: 3.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.weather-detail-range {
    color: #6b7280;
    font-size: 1.2rem;
    font-weight: 500;
}

.weather-detail-summary {
    margin-top: 0.2rem;
    line-height: 1.5;
    color: #374151;
    font-size: 0.9rem;
}

.weather-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.weather-stat {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 0.85rem;
}

.weather-stat-label {
    color: #6b7280;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.weather-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin-top: 0.2rem;
}

@media (max-width: 1100px) {
    .dashboard-summary-layout {
        grid-template-columns: 1fr;
    }

    .weather-card-body {
        grid-template-columns: 1fr;
    }

    .weather-day-option {
        font-size: 14px;
        padding: 0.35rem 0.5rem;
        grid-template-columns: 2.25rem 1.5rem minmax(0, 1fr);
    }

    .dashboard-panel {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .dashboard-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .order-history-pane .dashboard-modern-table,
    #order-history-pane .dashboard-modern-table {
        min-width: 520px;
    }

    .document-date-filters,
    .statement-filter-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .statement-filter-field {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .statement-filter-wrap input[type="date"],
    .statement-filter-wrap button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .contact-search-box.news-filter-bar {
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .news-filter-bar .news-category-select,
    .news-filter-bar .news-search-field {
        width: 100%;
        min-width: 0;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.text-end {
    text-align: right;
}

.order-filters-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.order-filters-sidebar label {
    font-weight: 800;
    color: #7a847c;
    margin-bottom: -6px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.order-filter-group {
    display: flex;
    flex-direction: column;
}

.order-filters-sidebar select,
.order-filters-sidebar input {
    width: 100%;

    padding: 12px 14px;

    background: #ffffff;

    border: 1px solid #e5ebe5;
    border-radius: 12px;

    color: #202b23;

    font-size: 0.9rem;
    font-weight: 500;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.order-filters-sidebar select:focus,
.order-filters-sidebar input:focus {
    outline: none;

    border-color: #4d7c3f;

    box-shadow: 0 0 0 3px rgba(77,124,63,0.12);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-container button {
    min-width: 40px;
    height: 40px;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.pagination-container button.active {
    background: #df5934;
    border-color: #df5934;
    color: white;
    font-weight: 600;
}

.pagination-container button.hover {
    background: #df5934;
    color: white;
}

.pagination-ellipsis {
    padding: 0 8px;
    display: flex;
    align-items: center;
    color: #64748b;
}

/* ==========================================
   GUIDED TOUR + HELP CENTRE
========================================== */

.admin-nav-tour-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.portal-tour-active {
    overflow: hidden;
}

.portal-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    pointer-events: none;
}

.portal-tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 28, 20, 0.55);
    pointer-events: auto;
}

.portal-tour-spotlight {
    position: absolute;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(15, 28, 20, 0.55);
    border: 2px solid #ffffff;
    pointer-events: none;
    transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
    z-index: 5001;
}

.portal-tour-highlight {
    /* Do not raise above .portal-tour-overlay — that paints KPIs over the tip. */
    border-radius: 12px;
    outline: 2px solid transparent;
}

.portal-tour-card {
    position: fixed;
    left: 50%;
    top: 22%;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 32px));
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow: 0 18px 48px rgba(16, 36, 24, 0.28);
    pointer-events: auto;
    z-index: 5003;
    border: 1px solid var(--border, #e3e9e2);
}

.portal-tour-card-bottom {
    top: auto;
    bottom: 28px;
}

.portal-tour-card-below-target {
    /* top / left / transform set by tour.js from the target rect */
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
}

.portal-tour-progress {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--agnvet-green, #007749);
    margin-bottom: 8px;
}

.portal-tour-card h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--text-heading, #17221a);
}

.portal-tour-card p {
    margin: 0 0 18px;
    color: var(--text-secondary, #667267);
    line-height: 1.5;
    font-size: 0.95rem;
}

.portal-tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-tour-btn {
    border: none;
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.portal-tour-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.portal-tour-btn-primary {
    background: var(--agnvet-green, #007749);
    color: #ffffff;
}

.portal-tour-btn-secondary {
    background: #eef4ef;
    color: var(--text-heading, #17221a);
}

.portal-tour-btn-ghost {
    background: transparent;
    color: var(--text-secondary, #667267);
    margin-right: auto;
}

.help-tour-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--border, #e3e9e2);
    border-radius: var(--radius-panel, 16px);
    padding: 22px 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-card, 0 8px 24px rgba(28, 49, 31, 0.06));
}

.help-tour-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e8f5ee;
    color: var(--agnvet-green, #007749);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.help-tour-copy h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: var(--text-heading, #17221a);
}

.help-tour-copy p {
    margin: 0;
    color: var(--text-secondary, #667267);
    line-height: 1.55;
}

.help-faq-section {
    background: #ffffff;
    border: 1px solid var(--border, #e3e9e2);
    border-radius: var(--radius-panel, 16px);
    padding: 22px 24px 8px;
    box-shadow: var(--shadow-card, 0 8px 24px rgba(28, 49, 31, 0.06));
}

.help-faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.help-faq-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-heading, #17221a);
}

.help-faq-item {
    border-top: 1px solid var(--border-soft, #dfe7df);
    padding: 4px 0;
}

.help-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 32px 14px 4px;
    display: grid;
    gap: 4px;
    position: relative;
}

.help-faq-item summary::-webkit-details-marker {
    display: none;
}

.help-faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 4px;
    /* Sit on the question row (below category), not over the first letter */
    top: calc(14px + 0.85rem + 4px);
    color: var(--agnvet-green, #007749);
    line-height: 1.2;
    pointer-events: none;
}

.help-faq-item[open] summary::after {
    content: '\f077';
}

.help-faq-category {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--agnvet-green, #007749);
}

.help-faq-question {
    font-weight: 600;
    color: var(--text-heading, #17221a);
    padding-right: 4px;
}

.help-faq-answer {
    padding: 0 4px 16px;
    color: var(--text-secondary, #667267);
    line-height: 1.55;
}

.help-faq-answer p {
    margin: 0;
    white-space: pre-wrap;
}

.help-faq-empty {
    padding: 12px 4px 20px;
    color: var(--text-secondary, #667267);
}

.portal-alert-error {
    background: #fdeceb;
    color: #8a1f14;
    border: 1px solid #f5c2bc;
}

@media (max-width: 768px) {
    .help-tour-card {
        flex-direction: column;
    }

    .help-faq-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Match hamburger breakpoint so the tour tip docks while mobile nav is active */
@media (max-width: 1100px) {
    .portal-tour-card,
    .portal-tour-card-below-target {
        top: auto !important;
        bottom: 16px;
    }
}

/* =========================================================
   ORDER STATISTICS
   ========================================================= */

.order-statistics-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.order-statistics-header h3 {
    margin: 3px 0 5px;
    color: #253d2d;
    font-size: 1.3rem;
    font-weight: 700;
}

.order-statistics-header p {
    max-width: 600px;
    margin: 0;
    color: #6d786f;
    font-size: 0.88rem;
    line-height: 1.5;
}

.statistics-eyebrow {
    display: block;
    color: #7c8d81;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.statistics-year-control {
    flex: 0 0 190px;
}

.statistics-year-control label {
    display: block;
    margin-bottom: 6px;
    color: #526359;
    font-size: 0.75rem;
    font-weight: 650;
}

.statistics-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.statistics-select-wrap i:first-child {
    position: absolute;
    left: 13px;
    z-index: 1;
    color: #718076;
    pointer-events: none;
}

.statistics-select-wrap i:last-child {
    position: absolute;
    right: 13px;
    color: #718076;
    font-size: 0.65rem;
    pointer-events: none;
}

.statistics-select-wrap select {
    width: 100%;
    height: 42px;
    padding: 0 34px 0 38px;
    border: 1px solid #d9e1db;
    border-radius: 8px;
    outline: none;
    appearance: none;
    background: #ffffff;
    color: #35473b;
    font-size: 0.86rem;
    cursor: pointer;
}

.statistics-select-wrap select:focus {
    border-color: #5f826c;
    box-shadow: 0 0 0 3px rgba(47, 107, 69, 0.1);
}

.statistics-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 16px;
}

.statistics-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    border: 1px solid #e1e7e2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(29, 52, 36, 0.05);
}

.statistics-icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    font-size: 0.95rem;
}

.statistics-icon-quantity {
    background: #e5f0e8;
    color: #2f6b45;
}

.statistics-icon-products {
    background: #fff3d3;
    color: #a97b08;
}

.statistics-icon-groups {
    background: #e8eef4;
    color: #506f8c;
}

.statistics-icon-month {
    background: #eee9f5;
    color: #705e8c;
}

.statistics-summary-content {
    min-width: 0;
}

.statistics-summary-content > span {
    display: block;
    overflow: hidden;
    margin-bottom: 2px;
    color: #68766d;
    font-size: 0.72rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.statistics-summary-content strong {
    display: block;
    overflow: hidden;
    color: #283f30;
    font-size: 1.25rem;
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.statistics-summary-content small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #94a098;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.statistics-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.statistics-chart-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid #e1e7e2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(29, 52, 36, 0.05);
}

.statistics-chart-full {
    grid-column: 1 / -1;
}

.statistics-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 13px;
}

.statistics-chart-header span {
    display: block;
    margin-bottom: 2px;
    color: #839087;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.statistics-chart-header h4 {
    margin: 0;
    color: #2d4434;
    font-size: 0.95rem;
    font-weight: 700;
}

.statistics-chart-container {
    position: relative;
    width: 100%;
    height: 265px;
}

.statistics-bar-chart {
    height: 340px;
}

.statistics-empty-state {
    display: none;
    min-height: 250px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

@media (max-width: 1100px) {
    .statistics-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .order-statistics-header {
        align-items: stretch;
        flex-direction: column;
    }

    .statistics-year-control {
        flex: none;
        width: 100%;
    }

    .statistics-chart-grid {
        grid-template-columns: 1fr;
    }

    .statistics-chart-full {
        grid-column: auto;
    }

    .statistics-chart-container {
        height: 245px;
    }

    .statistics-bar-chart {
        height: 330px;
    }
}

@media (max-width: 500px) {
    .statistics-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Statistics tab: remove the empty filter column */
.account-content-grid.statistics-full-width {
    grid-template-columns: minmax(0, 1fr);
}

/* Make the main dashboard panel occupy all available space */
.account-content-grid.statistics-full-width > .dashboard-panel {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
}

/* Statistics content itself */
.account-content-grid.statistics-full-width #stats-pane {
    width: 100%;
    max-width: none;
}

.account-content-grid.statistics-full-width .statistics-summary-grid,
.account-content-grid.statistics-full-width .statistics-chart-grid {
    width: 100%;
    max-width: none;
}

.order-data-disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0 0 18px;
    padding: 9px 12px;

    background: #f5f8f6;
    border-left: 3px solid #668371;
    border-radius: 5px;

    color: #68766d;
    font-size: 0.82rem;
    line-height: 1.4;
}

.order-data-disclaimer i {
    color: #2f6b45;
    font-size: 0.9rem;
    flex-shrink: 0;
}
