/* ═══════════════════════════════════════════════════════════════════════════
   AgriPlace Portal CSS  –  portal.css
   Matches the agriplace.eu mockup screenshots exactly.

   All classes use the .apl- prefix (AgriPlace Layout) to avoid conflicts
   with Radzen's .rz- classes.

   Colour palette:
     Header bg:        #1a1f2e  (near-black dark blue)
     Card Admin:       #1a5c5c  (dark teal-green)
     Card Project:     #1e3060  (dark navy)
     Card Dashboard:   #0d6f6f  (mid teal)
     Card Gardener:    #b07020  (amber/orange)
     Card btn hover:   slightly lighter than card colour
     White text on all card headers and access buttons
═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; }

/* ══════════════════════════════════════════════════════════════════════════
   ROOT WRAPPER
   ══════════════════════════════════════════════════════════════════════════ */
.apl-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER  —  matches mockup exactly
   ══════════════════════════════════════════════════════════════════════════ */
.apl-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.0);
    height: 56px;
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s;
}

.apl-header-inner {
    max-width: 100%;
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ── Left side: hamburger + site name ─────── */
.apl-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.apl-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.apl-hamburger:hover {
    background: rgba(255,255,255,0.15);
}

.apl-hamburger-icon {
    font-style: normal;
    font-size: 16px;
    color: #fff;
    user-select: none;
}

.apl-site-name {
    color: #e8eaf0;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.apl-site-name:hover { color: #fff; }

/* ── Centre: search bar ───────────────────── */
.apl-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.apl-search-wrap {
    position: relative;
    width: 100%;
    max-width: 340px;
}

.apl-search-input {
    width: 100%;
    height: 34px;
    padding: 0 2.4rem 0 0.85rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.apl-search-input::placeholder { color: rgba(255,255,255,0.45); }

.apl-search-input:focus {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.14);
}

.apl-search-icon {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.5;
    pointer-events: none;
}

/* ── Right side: AgriPlace link + Shop button ─ */
.apl-header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.apl-link-agriplace {
    color: #e8eaf0;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    white-space: nowrap;
    transition: color 0.15s;
}

.apl-link-agriplace:hover { color: #fff; text-decoration: underline; }

.apl-btn-shop {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 1.1rem;
    background: #e8eaf0;
    color: #1a1f2e !important;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s;
}

.apl-btn-shop:hover { background: #fff; }

/* ── Responsive header ─────────────────────── */
@media (max-width: 600px) {
    .apl-header-center { padding: 0 0.4rem; }
    .apl-link-agriplace { display: none; }
    .apl-site-name { font-size: 0.82rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MENU DRAWER  —  slide-in panel from the left (Image 2)
   ══════════════════════════════════════════════════════════════════════════ */

/* Backdrop — dark semi-transparent overlay */
.apl-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    animation: apl-fade-in 0.18s ease;
}

/* Drawer panel */
.apl-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: #1e2535;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: apl-slide-in 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}

@keyframes apl-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes apl-slide-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }

/* Drawer header row */
.apl-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.apl-drawer-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.apl-drawer-close {
    background: none;
    border: none;
    color: #aab4cc;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.apl-drawer-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* Drawer scrollable body */
.apl-drawer-body {
    flex: 1;
    padding: 0.5rem 0 2rem;
    overflow-y: auto;
}

/* Section label (divider) */
.apl-drawer-section-label {
    padding: 1rem 1.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #5a6888;
}

/* Menu items */
.apl-drawer-item {
    display: flex;
    flex-direction: column;
    padding: 0.65rem 1.2rem;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.12s;
    cursor: pointer;
}

.apl-drawer-item:hover {
    background: rgba(255,255,255,0.07);
}

.apl-drawer-item-name {
    color: #d8dce8;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}

.apl-drawer-item-sub {
    color: #7a86a0;
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.apl-drawer-item--signout .apl-drawer-item-name {
    color: #e07070;
}

.apl-drawer-item--signout:hover {
    background: rgba(224,112,112,0.08);
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO SECTION  —  full viewport with background image
   ══════════════════════════════════════════════════════════════════════════ */
.apl-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO — full-viewport landing page
   ══════════════════════════════════════════════════════════════════════════ */
.apl-hero {
    position: relative;
    flex: 1;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Background image with slow-zoom entrance ── */
.apl-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/images/hero-bg.png');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    z-index: 0;
    transform: scale(1.04);
    animation: apl-hero-zoom 18s ease-out forwards;
}

@keyframes apl-hero-zoom {
    from { transform: scale(1.04); }
    to   { transform: scale(1.00); }
}

/* Top-to-bottom darkening overlay */
.apl-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 22, 14, 0.58) 0%,
        rgba(8, 22, 14, 0.12) 35%,
        rgba(8, 22, 14, 0.06) 60%,
        rgba(8, 22, 14, 0.68) 100%
    );
}

/* Vignette */
.apl-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 38%, rgba(4, 14, 8, 0.48) 100%);
}

/* ── Two-column content row ── */
.apl-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 3rem;
    padding: 3rem 3.5rem 8rem;   /* 8rem bottom clears the shortcut bar */
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    animation: apl-hero-fadein 1s ease 0.4s both;
}

@keyframes apl-hero-fadein {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── LEFT column: headline + CTA + stats ── */
.apl-hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    max-width: 580px;
}

/* Eyebrow tag */
.apl-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 1.1rem;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.apl-hero-eyebrow::before {
    content: '';
    display: block;
    width: 26px;
    height: 1.5px;
    background: #52b788;
    flex-shrink: 0;
}

/* Main headline */
.apl-hero-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    font-weight: 300;
    line-height: 1.06;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 1.4rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.apl-hero-title em {
    font-style: normal;
    color: #ffffff;
}

.apl-hero-title strong {
    font-weight: 700;
    color: #ffffff;
}

/* Sub-headline */
.apl-hero-subtitle {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: #ffffff;
    max-width: 500px;
    margin-bottom: 2.2rem;
}

/* CTA row */
.apl-hero-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 2.8rem;
}

.apl-hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #52b788;
    color: #ffffff !important;
    text-decoration: none;
    padding: 0.8rem 1.9rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    box-shadow: 0 4px 22px rgba(82, 183, 136, 0.38);
}

.apl-hero-btn-primary:hover {
    background: #3da571;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(82, 183, 136, 0.5);
    color: #ffffff !important;
}

.apl-btn-arrow { font-style: normal; }

.apl-hero-btn-ghost {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    border-bottom: 1px solid rgba(255,255,255,0.35);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.apl-hero-btn-ghost:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* ── Stats strip — absolute bottom-left ── */
.apl-stats-strip {
    position: absolute;
    bottom: 2rem;
    left: 3.5rem;
    z-index: 2;
    display: flex;
    gap: 0;
    align-items: flex-end;
    animation: apl-hero-fadein 1s ease 1s both;
}

.apl-stat {
    padding: 0 1.8rem 0 0;
    border-right: 1px solid rgba(255,255,255,0.18);
    margin-right: 1.8rem;
}

.apl-stat:last-child {
    border-right: none;
    margin-right: 0;
}

.apl-stat-num {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.2rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.apl-stat-num span {
    color: #52b788;
    font-style: italic;
}

.apl-stat-label {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.52);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ── Scroll indicator — absolute bottom-center ── */
.apl-scroll-hint {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
    animation: apl-hero-fadein 1s ease 1.3s both;
}

.apl-scroll-label {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
}

.apl-scroll-line {
    width: 1px;
    height: 38px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.38), transparent);
    animation: apl-scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes apl-scroll-pulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(1.12); }
}

/* ── Shortcut cards bar — absolute bottom-right ── */
.apl-shortcuts-bar {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
    display: flex;
    gap: 1px;
    animation: apl-hero-fadein 1s ease 1.1s both;
}

.apl-shortcut-card {
    display: flex;
    flex-direction: column;
    width: 168px;
    padding: 1.3rem 1.4rem 1.4rem;
    background: rgba(8, 24, 16, 0.68);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(82, 183, 136, 0.16);
    border-bottom: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.22s, border-color 0.22s;
}

.apl-shortcut-card:first-child {
    border-radius: 10px 0 0 0;
    border-left: 1px solid rgba(82, 183, 136, 0.16);
}
.apl-shortcut-card:last-child {
    border-right: 1px solid rgba(82, 183, 136, 0.16);
    border-radius: 0 0 0 0;
}

.apl-shortcut-card:hover {
    background: rgba(16, 44, 28, 0.84);
    border-color: rgba(82, 183, 136, 0.38);
}

.apl-shortcut-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(82, 183, 136, 0.14);
    border-radius: 7px;
    margin-bottom: 0.8rem;
    color: #52b788;
    flex-shrink: 0;
}

.apl-shortcut-icon svg {
    width: 15px;
    height: 15px;
}

.apl-shortcut-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.28rem;
    line-height: 1.2;
}

.apl-shortcut-desc {
    font-size: 0.67rem;
    color: rgba(255,255,255,0.42);
    line-height: 1.45;
}

/* ── RIGHT column: app navigation cards panel ── */
.apl-hero-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    animation: apl-cards-fadein 1s ease 0.75s both;
}

@keyframes apl-cards-fadein {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* 2×2 card grid */
.apl-cards-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 520px;
}

/* ── Single app card ── */
.apl-app-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.38), 0 1px 0 rgba(255,255,255,0.12) inset;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: apl-card-fadein 0.25s ease both;
}

.apl-app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 50px rgba(0,0,0,0.48);
}

/* ── Card colour headers ── */
.apl-card-header {
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.apl-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}

/* Colour per card */
.apl-card--admin .apl-card-header     { background: #1a5c5c; }
.apl-card--project .apl-card-header   { background: #1e3060; }
.apl-card--dashboard .apl-card-header { background: #0d6f6f; }
.apl-card--gardener .apl-card-header  { background: #b07020; }

/* ── Card image ── */
.apl-card-image-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #e8eee8;
    position: relative;
}

.apl-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Card body ── */
.apl-card-body {
    padding: 0.65rem 1rem;
    flex: 1;
    background: #fff;
}

.apl-card-desc {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* ── Card footer button ── */
.apl-card-footer {
    padding: 0;
}

.apl-card-btn {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    transition: filter 0.15s;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.apl-card-btn:hover { filter: brightness(1.12); }

.apl-card-btn--admin     { background: #1a5c5c; }
.apl-card-btn--project   { background: #1e3060; }
.apl-card-btn--dashboard { background: #0d6f6f; }
.apl-card-btn--gardener  { background: #b07020; }

/* ── Responsive breakpoints ── */
@media (max-width: 1200px) {
    .apl-hero-content  { padding: 2.5rem 2rem 6rem; gap: 2rem; }
    .apl-cards-panel   { width: 460px; }
    .apl-stats-strip   { left: 2rem; }
    .apl-shortcut-card { width: 148px; padding: 1.1rem 1.1rem 1.2rem; }
}

@media (max-width: 960px) {
    .apl-hero-content {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 2rem 1.5rem 9rem;
    }
    .apl-hero-left   { max-width: 100%; }
    .apl-hero-right  { width: 100%; }
    .apl-cards-panel {
        width: 100%;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    .apl-hero-title   { font-size: clamp(2.2rem, 6vw, 3.2rem); }
    .apl-shortcut-card { width: 130px; }
    .apl-scroll-hint  { display: none; }
}

@media (max-width: 640px) {
    .apl-cards-panel   { grid-template-columns: repeat(2, 1fr); }
    .apl-hero-content  { padding: 1.5rem 1rem 11rem; }
    .apl-stats-strip   { left: 1rem; bottom: 1.5rem; gap: 0; }
    .apl-stat          { padding-right: 1rem; margin-right: 1rem; }
    .apl-stat-num      { font-size: 1.35rem; }
    .apl-shortcuts-bar { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   WATERMARK ROW
   ══════════════════════════════════════════════════════════════════════════ */
.apl-watermark-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 6rem;
    padding: 0 2rem 0.5rem;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.apl-watermark-row span {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 900;
    color: rgba(255,255,255,0.04);
    text-transform: uppercase;
    letter-spacing: 3px;
    white-space: nowrap;
    user-select: none;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN / PROTECTED LAYOUT  (MainLayout pages — separate from public hero)
   ══════════════════════════════════════════════════════════════════════════ */
.apl-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    gap: 0.25rem;
    height: 100%;
}

.apl-dash-btn {
    width: 100%;
    justify-content: flex-start;
}

/* ══════════════════════════════════════════════════════════════════════════
   ERROR / UTILITY
   ══════════════════════════════════════════════════════════════════════════ */
.apl-error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem;
    text-align: center;
    min-height: 60vh;
}

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN BUTTON  —  header, shown to anonymous visitors
   ══════════════════════════════════════════════════════════════════════════ */
.apl-btn-login {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 1.1rem;
    background: transparent;
    color: #e8eaf0 !important;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 0.25rem;
    transition: background 0.15s, border-color 0.15s;
}
.apl-btn-login:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.6);
    color: #fff !important;
}

.apl-header-user { display: flex; align-items: center; margin-left: 0.25rem; }
.apl-header-username {
    font-size: 0.85rem; font-weight: 600; color: #d0dce8;
    max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   REMEMBER ME — Login page checkbox
   ══════════════════════════════════════════════════════════════════════════ */
.apl-login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.apl-login-remember-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--rz-primary);
}
.apl-login-remember-label {
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
    cursor: pointer;
    user-select: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   CARD STATE: LOCKED  —  anonymous visitor, needs to sign in
   ══════════════════════════════════════════════════════════════════════════ */
.apl-card--locked { opacity: 0.85; }

.apl-card--locked:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ══════════════════════════════════════════════════════════════════════════
   CARD STATE: DISABLED  —  authenticated, no module access
   Visually distinct from locked: grayscale + different overlay icon (🚫)
   ══════════════════════════════════════════════════════════════════════════ */
.apl-card--disabled {
    opacity: 0.55;
    filter: grayscale(60%);
}

.apl-card--disabled:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    opacity: 0.60;
}

/* ── Shared image overlay (🔒 for locked, 🚫 for disabled) ──────────────── */
.apl-card-image-wrap { position: relative; }

.apl-card-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    background: rgba(0,0,0,0.22);
    backdrop-filter: blur(1px);
    pointer-events: none;
}

/* ── Lock / no-access badge in card header ───────────────────────────────── */
.apl-card-lock {
    margin-left: auto;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1;
}

/* ── "No Access" button — same colour as card header but cursor: not-allowed */
.apl-card-btn--noaccess {
    cursor: not-allowed !important;
    opacity: 0.75;
}
.apl-card-btn--noaccess:hover { filter: none; }

/* ══════════════════════════════════════════════════════════════════════════
   CARD INITIAL LOAD — prevent transition flash on first render
   Cards start hidden (opacity 0) and fade in once JS initialises them.
   The .apl-cards-ready class is never added in Blazor — instead we rely
   on the CSS animation-fill-mode to show cards after a short delay,
   which is long enough for the interactive circuit to load card states.
   ══════════════════════════════════════════════════════════════════════════ */
.apl-app-card {
    animation: apl-card-fadein 0.25s ease both;
}

/* Stagger each card slightly so they don't all flash at once */
.apl-cards-row > .apl-app-card:nth-child(1) { animation-delay: 0.05s; }
.apl-cards-row > .apl-app-card:nth-child(2) { animation-delay: 0.10s; }
.apl-cards-row > .apl-app-card:nth-child(3) { animation-delay: 0.15s; }
.apl-cards-row > .apl-app-card:nth-child(4) { animation-delay: 0.20s; }

@keyframes apl-card-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Suppress the card transition properties on first paint —
   they only apply on hover after the card is fully visible */
.apl-app-card { transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease; }
