/* ═══════════════════════════════════════════════════════════════════════════
   AgriPlace – Dashboard Module CSS
   File: wwwroot/css/dashboard.css
   Link in App.razor: <link rel="stylesheet" href="css/dashboard.css" />
   All classes prefixed .dsh- to avoid collisions with .adm- and portal CSS.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   SHELL — same two-column layout as administrator.css
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* Identical technique to .prj-shell in project.css — confirmed working.
       Image sits on the shell element itself; the semi-transparent color
       overlay blends over it to produce ~30 % visible image intensity.     */
    background-color: rgba(240, 242, 245, 0.70);
    background-image: url('/images/dashboard-bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-blend-mode: normal;
}

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-sidebar {
    width: 230px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: 1px solid var(--rz-border-disabled-color);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

/* Brand */
.dsh-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--rz-border-disabled-color);
    flex-shrink: 0;
    text-decoration: none;
}
.dsh-sidebar-logo { flex-shrink: 0; text-decoration: none; }
.dsh-sidebar-titles {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.dsh-sidebar-app {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--rz-text-secondary-color);
    line-height: 1;
}
.dsh-sidebar-module {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.dsh-sidebar-nav {
    flex: 1;
    padding: .75rem 0;
    overflow-y: auto;
}
.dsh-nav-section-label {
    padding: .75rem 1.1rem .25rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--rz-text-disabled-color);
}
.dsh-nav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1.1rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--rz-text-secondary-color);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background .12s, color .12s;
    position: relative;
}
.dsh-nav-item:hover {
    background: var(--rz-base-300);
    color: var(--rz-text-color);
}
.dsh-nav-item--active {
    background: color-mix(in srgb, var(--rz-primary) 12%, transparent);
    color: var(--rz-primary);
    font-weight: 700;
    border-left: 3px solid var(--rz-primary);
    padding-left: calc(1.1rem - 3px);
}
.dsh-nav-item--active:hover {
    background: color-mix(in srgb, var(--rz-primary) 16%, transparent);
}
.dsh-nav-item--back {
    color: var(--rz-text-disabled-color);
    font-size: .82rem;
}
.dsh-nav-item--back:hover { color: var(--rz-text-secondary-color); }
.dsh-nav-icon {
    font-size: 1.1rem !important;
    width: 20px;
    flex-shrink: 0;
    opacity: .75;
}
.dsh-nav-item--active .dsh-nav-icon,
.dsh-nav-item:hover .dsh-nav-icon { opacity: 1; }

/* Unread badge in nav */
.dsh-nav-badge {
    margin-left: auto;
    background: var(--rz-danger);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 100px;
    min-width: 1.4rem;
    text-align: center;
    line-height: 1.4;
}

/* Footer */
.dsh-sidebar-footer {
    border-top: 1px solid var(--rz-border-disabled-color);
    padding: .5rem 0;
    flex-shrink: 0;
}
.dsh-sidebar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1.1rem;
}
.dsh-sidebar-username {
    font-size: .8rem;
    color: var(--rz-text-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════════════════
   WORKSPACE
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: transparent;
}

/* Override any Radzen wrapper div that injects a solid background */
.dsh-workspace .rz-body,
.dsh-workspace .rz-main,
.dsh-workspace > div:not(.dsh-header):not(.dsh-content) {
    background: transparent !important;
}

.dsh-header {
    height: 52px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rz-border-disabled-color);
    display: flex;
    align-items: center;
}
.dsh-header-inner {
    width: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.dsh-header-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.dsh-header-username {
    font-size: .85rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dsh-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    scrollbar-width: thin;
    background: transparent;
}

/* ══════════════════════════════════════════════════════════════════════════
   LOADING CENTER
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-loading-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* ══════════════════════════════════════════════════════════════════════════
   STAT CARDS ROW
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .875rem;
}
.dsh-stat-card {
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-disabled-color);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: .875rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .15s, border-color .15s;
}
.dsh-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-color: var(--rz-border-color);
}
.dsh-stat-card--alert  { border-color: color-mix(in srgb, #e65100 30%, transparent); }
.dsh-stat-card--warning{ border-color: color-mix(in srgb, #c62828 30%, transparent); }
.dsh-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dsh-stat-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.dsh-stat-label {
    font-size: .72rem;
    color: var(--rz-text-secondary-color);
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.dsh-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--rz-text-title-color);
    line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   MAIN GRID (garden tiles left, activity feed right)
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) { .dsh-main-grid { grid-template-columns: 1fr; } }

.dsh-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--rz-text-secondary-color);
    margin: 0 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--rz-border-disabled-color);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.dsh-section-link {
    margin-left: auto;
    font-size: .75rem;
    font-weight: 600;
    color: var(--rz-primary);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}
.dsh-section-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════
   GARDEN TILES
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-garden-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
}
.dsh-garden-tile {
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-disabled-color);
    border-radius: 10px;
    padding: .875rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    cursor: pointer;
}
.dsh-garden-tile:hover {
    border-color: var(--rz-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.dsh-garden-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dsh-garden-tile-acronym {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rz-primary);
    background: color-mix(in srgb, var(--rz-primary) 10%, transparent);
    padding: .15rem .45rem;
    border-radius: 4px;
}
.dsh-garden-tile-badge {
    background: var(--rz-danger);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 100px;
    min-width: 1.2rem;
    text-align: center;
}
.dsh-garden-tile-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-garden-tile-meta {
    display: flex;
    gap: .75rem;
    font-size: .75rem;
    color: var(--rz-text-secondary-color);
    margin-top: .2rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   ACTIVITY FEED
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dsh-activity-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: .75rem;
    align-items: start;
    padding: .7rem .5rem;
    border-bottom: 1px solid var(--rz-border-disabled-color);
    transition: background .12s;
}
.dsh-activity-item:last-child { border-bottom: none; }
.dsh-activity-item:hover { background: var(--rz-base-200); }
.dsh-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.dsh-activity-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.dsh-activity-title {
    font-size: .875rem;
    font-weight: 600;
    color: var(--rz-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-activity-detail {
    font-size: .75rem;
    color: var(--rz-text-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-activity-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    font-size: .72rem;
    color: var(--rz-text-disabled-color);
    white-space: nowrap;
}
.dsh-activity-cat { font-size: .65rem !important; }

/* ══════════════════════════════════════════════════════════════════════════
   UNREAD MESSAGES PREVIEW
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-message-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--rz-border-disabled-color);
    border-radius: 8px;
    overflow: hidden;
}
.dsh-message-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--rz-border-disabled-color);
    background: var(--rz-base-background-color);
}
.dsh-message-item:last-child { border-bottom: none; }
.dsh-message-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rz-primary);
    flex-shrink: 0;
    margin-top: 5px;
}
.dsh-message-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.dsh-message-text {
    font-size: .875rem;
    font-weight: 500;
    color: var(--rz-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-message-meta {
    font-size: .72rem;
    color: var(--rz-text-disabled-color);
}

/* ══════════════════════════════════════════════════════════════════════════
   NEWS CARDS ROW
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-news-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}
.dsh-news-card {
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-disabled-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dsh-news-card:hover {
    border-color: var(--rz-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.dsh-news-cat {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--rz-primary);
}
.dsh-news-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dsh-news-date {
    font-size: .72rem;
    color: var(--rz-text-disabled-color);
    margin-top: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════ */
.dsh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--rz-text-secondary-color);
    font-size: .875rem;
    gap: .5rem;
    border: 1px dashed var(--rz-border-disabled-color);
    border-radius: 10px;
}
.dsh-empty p { margin: 0; opacity: .6; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .dsh-sidebar { width: 200px; }
}
@media (max-width: 680px) {
    .dsh-shell { flex-direction: column; height: auto; overflow: auto; }
    .dsh-sidebar {
        width: 100%;
        height: auto;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid var(--rz-border-disabled-color);
    }
    .dsh-sidebar-nav {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        padding: .5rem;
        gap: .25rem;
    }
    .dsh-nav-section-label { display: none; }
    .dsh-workspace { overflow: visible; }
    .dsh-content { padding: 1rem; }
    .dsh-stat-row { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GARDEN CARDS PAGE  (.gdsh- prefix = Garden DaSHboard)
   Appended to wwwroot/css/dashboard.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Cards grid ─────────────────────────────────────────────────────────── */
.gdsh-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ── Base card ──────────────────────────────────────────────────────────── */
.gdsh-card {
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-disabled-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.gdsh-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.gdsh-card:hover .gdsh-card-arrow { opacity: 1; }

/* ── Role-coloured left border ──────────────────────────────────────────── */
.gdsh-card--owner     { border-left: 4px solid #1b5e20; }
.gdsh-card--admin     { border-left: 4px solid #1a237e; }
.gdsh-card--manager   { border-left: 4px solid #4a148c; }
.gdsh-card--gardener  { border-left: 4px solid #1b5e7a; }
.gdsh-card--user      { border-left: 4px solid #37474f; }
.gdsh-card--vendor    { border-left: 4px solid #e65100; }
.gdsh-card--partner   { border-left: 4px solid #4e342e; }
.gdsh-card--support   { border-left: 4px solid #b71c1c; }

/* ── Role badge (top-right pill) ────────────────────────────────────────── */
.gdsh-card-role-badge {
    position: absolute;
    top: .6rem;
    right: .6rem;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    z-index: 1;
}

/* ── Image / placeholder area ───────────────────────────────────────────── */
.gdsh-card-image {
    width: 100%;
    height: 130px;
    overflow: hidden;
    flex-shrink: 0;
}
.gdsh-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gdsh-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gdsh-card-initials {
    font-size: 2.4rem;
    font-weight: 900;
    color: rgba(255,255,255,.55);
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── Card body ──────────────────────────────────────────────────────────── */
.gdsh-card-body {
    padding: .875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1;
}
.gdsh-card-name-row {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}
.gdsh-card-acronym {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rz-primary);
    background: color-mix(in srgb, var(--rz-primary) 10%, transparent);
    padding: .1rem .4rem;
    border-radius: 4px;
    flex-shrink: 0;
}
.gdsh-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gdsh-card-desc {
    font-size: .8rem;
    color: var(--rz-text-secondary-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ── Stats row ──────────────────────────────────────────────────────────── */
.gdsh-card-stats {
    display: flex;
    gap: 1.25rem;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid var(--rz-border-disabled-color);
}
.gdsh-card-stat {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    color: var(--rz-text-secondary-color);
}
.gdsh-card-stat-value {
    font-weight: 700;
    color: var(--rz-text-color);
}
.gdsh-card-stat-label { opacity: .7; }

/* ── Hover arrow ────────────────────────────────────────────────────────── */
.gdsh-card-arrow {
    position: absolute;
    bottom: .875rem;
    right: .875rem;
    color: var(--rz-primary);
    opacity: 0;
    transition: opacity .15s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GARDEN DETAIL MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.gdsh-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(2px);
}
.gdsh-modal {
    background: var(--rz-base-background-color);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    animation: gdsh-modal-in .18s ease;
}
@keyframes gdsh-modal-in {
    from { opacity: 0; transform: scale(.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Modal header (coloured bg with image/initials) */
.gdsh-modal-header {
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 1rem;
    position: relative;
}
.gdsh-modal-header-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.3);
    flex-shrink: 0;
}
.gdsh-modal-header-initials {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: rgba(255,255,255,.6);
    flex-shrink: 0;
    background: rgba(0,0,0,.1);
}
.gdsh-modal-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.gdsh-modal-acronym {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.7);
}
.gdsh-modal-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gdsh-modal-close {
    position: absolute;
    top: .6rem;
    right: .6rem;
    background: rgba(0,0,0,.2);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,.8);
    transition: background .12s;
}
.gdsh-modal-close:hover { background: rgba(0,0,0,.35); color: #fff; }

/* Modal body */
.gdsh-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    scrollbar-width: thin;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.gdsh-modal-desc {
    font-size: .9rem;
    color: var(--rz-text-secondary-color);
    margin: 0;
    line-height: 1.5;
}

/* Stat pills */
.gdsh-modal-stats {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.gdsh-modal-stat {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: var(--rz-base-300);
    border-radius: 8px;
    padding: .45rem .75rem;
    font-size: .82rem;
    color: var(--rz-text-secondary-color);
}
.gdsh-modal-stat strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--rz-text-title-color);
}
.gdsh-modal-stat--alert {
    background: color-mix(in srgb, var(--rz-danger) 12%, transparent);
    color: var(--rz-danger);
}
.gdsh-modal-stat--alert strong { color: var(--rz-danger); }

/* Section heading */
.gdsh-modal-section { display: flex; flex-direction: column; gap: .6rem; }
.gdsh-modal-section-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--rz-text-secondary-color);
    margin: 0;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--rz-border-disabled-color);
}

/* Systems list in modal */
.gdsh-modal-system-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.gdsh-modal-system-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .75rem;
    background: var(--rz-base-200);
    border-radius: 8px;
    font-size: .875rem;
}
.gdsh-modal-system-name { font-weight: 700; color: var(--rz-text-color); }
.gdsh-modal-system-acr {
    margin-left: .4rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--rz-primary);
    background: color-mix(in srgb, var(--rz-primary) 10%, transparent);
    padding: .1rem .35rem;
    border-radius: 4px;
}

/* Role pills in modal */
.gdsh-modal-roles { display: flex; flex-wrap: wrap; gap: .5rem; }
.gdsh-modal-role-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .3rem .75rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Modal footer */
.gdsh-modal-footer {
    padding: .875rem 1.25rem;
    border-top: 1px solid var(--rz-border-disabled-color);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .gdsh-cards-grid { grid-template-columns: 1fr; }
    .gdsh-modal      { max-height: 90vh; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD INDEX — 2+3 content grid aligned with 5 stat cards above
   Append these rules to wwwroot/css/dashboard.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* Main content grid: 2/5 left (gardens) + 3/5 right (activity) */
.dsh-content-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) { .dsh-content-grid { grid-template-columns: 1fr; } }

.dsh-left-panel  { display: flex; flex-direction: column; gap: 0; }
.dsh-right-panel { display: flex; flex-direction: column; gap: 0; }

/* ── Inline garden cards (one per line, horizontal layout) ─────────────── */
.dsh-inline-cards {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.dsh-inline-card {
    /* Overrides .gdsh-card for the horizontal inline variant */
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: .75rem;
    padding: .625rem .875rem .625rem .625rem;
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-disabled-color);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: box-shadow .15s, transform .15s, border-color .15s;
    height: auto;
}
.dsh-inline-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

/* Thumbnail (left side) */
.dsh-inline-card-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.dsh-inline-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dsh-inline-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Body (middle) */
.dsh-inline-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.dsh-inline-card-name-row {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

/* Role badge repositioned for inline layout */
.dsh-inline-card .gdsh-card-role-badge {
    position: static !important;   /* override absolute from gdsh-card */
    order: -1;                     /* show before thumbnail */
    align-self: flex-start;
    flex-shrink: 0;
    margin-right: 0;
}

/* Stats row compact in inline card */
.dsh-inline-card .gdsh-card-stats {
    margin-top: .15rem;
    padding-top: 0;
    border-top: none;
    gap: .75rem;
}
