:root {
    --bg-deep: #121212;
    --surface-card: #1E1E1E;
    --gold-trend: #E3B04B;
    --text-main: #FFFFFF;
    --text-desc: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(30, 30, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-color: #E3B04B;
    --text-secondary: rgba(255, 255, 255, 0.6);
}

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(at 0% 0%, hsla(39, 74%, 59%, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(210, 91%, 68%, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body.auth-active {
    height: 100vh;
    overflow-y: hidden;
}

/* Keep privileged UI fully hidden until authenticated */
body.auth-active #side-menu,
body.auth-active #side-menu-overlay,
body.auth-active #bottom-nav,
body.auth-active #action-sheet,
body.auth-active #action-sheet-overlay,
body.auth-active .dashboard-fab-survey {
    display: none !important;
}

body.dashboard-active {
    padding-bottom: 100px; /* Room for Bottom Nav */
    overflow-y: auto;
}

.hidden { display: none !important; }

body::before {
    content: "";
    position: fixed;
    top: -5%; /* Overbleed to prevent edge gaps during animation */
    left: -5%;
    width: 110%;
    height: 110%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(227, 176, 75, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(100, 181, 246, 0.05) 0%, transparent 40%);
    z-index: -1;
    animation: mesh-float 20s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes mesh-float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(2%, 2%); }
}

.dashboard-container {
    max-width: 1200px;
    margin: 100px auto 0; /* Removed bottom margin as body has padding-bottom */
    padding: 0 1.5rem;
    flex: 1; /* Stretch to fill available space */
}

.dashboard-header-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.last-sync-text {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--text-desc);
    letter-spacing: 0.02em;
}

.last-sync-text.sync-loading,
.last-sync-text.sync-success,
.last-sync-text.sync-error {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.last-sync-text.sync-loading {
    color: rgba(255, 255, 255, 0.82);
}

.last-sync-text.sync-loading::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.26);
    border-top-color: var(--gold-trend);
    animation: spin 0.8s linear infinite;
}

.last-sync-text.sync-success {
    color: rgba(120, 226, 169, 0.95);
}

.last-sync-text.sync-error {
    color: #ffb4b4;
}

@media (max-width: 768px) {
    .dashboard-header-primary {
        align-items: flex-start;
    }
}

/* Glass Elevation */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(227, 176, 75, 0.1);
    color: var(--gold-trend);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-desc);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-meta {
    min-width: 0;
}

.stat-delta {
    margin-top: 4px;
    font-size: 0.72rem;
    color: rgba(46, 204, 113, 0.85);
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* --- Search Bar --- */
.search-container {
    position: relative;
    margin-bottom: 2rem;
}

.discovery-dock {
    position: sticky;
    top: 82px;
    z-index: 18;
    margin: 0 0 1.25rem;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(16, 16, 19, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.discovery-dock .search-container {
    margin-bottom: 10px;
}

.discovery-dock .filter-chip-row {
    margin: 0;
    padding-bottom: 2px;
}

@media (max-width: 768px) {
    .discovery-dock {
        top: 74px;
        padding: 9px;
        border-radius: 14px;
    }
}

.search-container i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-desc);
    pointer-events: none;
}

.search-bar {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 14px 3.2rem 14px 3.5rem;
    border-radius: 16px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-desc);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-clear:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.filter-chip-row {
    display: flex;
    gap: 10px;
    margin: -0.9rem 0 1.5rem;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-chip {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-desc);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-chip.active {
    background: rgba(227, 176, 75, 0.16);
    color: var(--gold-trend);
    border-color: rgba(227, 176, 75, 0.35);
}

.search-bar:focus {
    outline: none;
    border-color: var(--gold-trend);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(227, 176, 75, 0.15);
}

/* --- Native Portal Header --- */
/* --- Shared Navigation Moved to navigation.css --- */

/* --- Buttons --- */
.btn-primary {
    background: var(--gold-trend);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(227, 176, 75, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(227, 176, 75, 0.5);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* --- Bento-Style Survey Cards --- */
.survey-item {
    background: linear-gradient(165deg, rgba(32, 32, 36, 0.96), rgba(22, 23, 27, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.2rem;
    position: relative;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.survey-item:hover {
    transform: translateY(-3px);
    border-color: var(--gold-trend);
    box-shadow: 0 14px 34px rgba(227, 176, 75, 0.16);
}

.survey-item:active {
    transform: translateY(-1px) scale(0.997);
}

.survey-item.survey-enter {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
    animation: survey-card-enter 280ms cubic-bezier(0.22, 0.86, 0.26, 1) forwards;
    animation-delay: var(--survey-enter-delay, 0ms);
}

@keyframes survey-card-enter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .survey-item.survey-enter {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.survey-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.survey-item-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.survey-avatar {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
    margin: 0;
    flex-shrink: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.94);
}

.survey-text-wrap {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.survey-date {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.survey-item-menu {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.62);
    font-size: 1.08rem;
    padding: 0;
    margin-right: 0;
    justify-content: center;
    transition: all 0.2s ease;
}

.survey-item-menu:hover {
    transform: none;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.survey-item-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-chip-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(255, 235, 196, 0.95);
    border: 1px solid rgba(227, 176, 75, 0.3);
    background: rgba(227, 176, 75, 0.12);
    border-radius: 11px;
    padding: 8px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
}

.action-chip-mini:hover {
    color: #fff;
    border-color: rgba(227, 176, 75, 0.5);
    background: rgba(227, 176, 75, 0.2);
}

.action-chip-mini i {
    font-size: 0.72rem;
}

.survey-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.2rem;
}

.survey-action-row {
    margin-top: 0.2rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.survey-quick-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 100px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-filter-pill {
    cursor: pointer;
}

.status-filter-pill:hover {
    transform: translateY(-1px);
}

.status-filter-pill:active {
    transform: translateY(0);
}

.status-pill.success {
    background: rgba(46, 204, 113, 0.08);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-pill.warning {
    background: rgba(241, 196, 15, 0.08);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.status-pill i {
    font-size: 0.76rem;
    width: 12px;
    text-align: center;
}

/* Bottom Action Sheet */
.action-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #1a1a1d, #141416);
    border-radius: 24px 24px 0 0;
    padding: 1.1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom, 10px));
    z-index: 2001;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.action-sheet.show {
    bottom: 0;
}

.action-sheet-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 2px 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-sheet-drag-handle {
    width: 52px;
    height: 4px;
    border-radius: 999px;
    margin: 0 auto 10px;
    background: rgba(255, 255, 255, 0.22);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 9px;
}

.action-sheet-title-wrap {
    min-width: 0;
    flex: 1;
    margin-top: 12px;
}

.action-sheet.dragging {
    transition: none;
}

.action-sheet-header h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--text-main);
}

.action-sheet-meta {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--text-desc);
}

.action-sheet-close {
    margin-top: 12px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-sheet-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.action-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-item:active {
    transform: scale(0.988);
}

.action-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.action-item-title {
    font-size: 1.03rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
}

.action-item-meta {
    margin-top: 4px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.58);
}

.action-chevron {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

.action-item.delete {
    color: #FF5252;
    margin-top: 4px;
    border-color: rgba(255, 82, 82, 0.24);
    background: linear-gradient(180deg, rgba(255, 82, 82, 0.1), rgba(255, 82, 82, 0.06));
}

.action-item.delete .action-item-title {
    color: #ff6262;
}

.action-item.delete .action-item-meta {
    color: rgba(255, 133, 133, 0.72);
}

.action-item i {
    width: 22px;
    font-size: 1.05rem;
    text-align: center;
}

.action-item.delete .action-chevron {
    color: rgba(255, 133, 133, 0.75);
}

.action-item.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .action-sheet {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .action-item {
        padding: 13px 12px;
        border-radius: 14px;
    }

    .action-item-title {
        font-size: 1.02rem;
    }

    .action-item-meta {
        font-size: 0.75rem;
    }
}

/* ROW 2: Actions (Bottom, Right Aligned) */
.survey-actions-row {
    display: flex;
    justify-content: flex-end;
    /* Force Right Align */
    align-items: center;
    gap: 1.5rem;
    /* Increased spacing */
    width: 100%;
}

.action-chip.primary {
    background: var(--gold-trend);
    color: #000;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(227, 176, 75, 0.3);
}

@media (max-width: 768px) {
    .survey-item {
        padding: 1rem;
        border-radius: 18px;
        gap: 0.88rem;
    }

    .survey-avatar {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .customer-name {
        font-size: 1.02rem;
    }

    .survey-date {
        font-size: 0.72rem;
    }

    .survey-item-menu {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .survey-item-tools {
        gap: 6px;
    }

    .action-chip-mini {
        padding: 7px 9px;
        border-radius: 10px;
        font-size: 0.7rem;
    }

    .status-pill {
        font-size: 0.71rem;
        padding: 7px 10px;
    }

    .survey-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .survey-quick-hint {
        justify-content: flex-start;
        font-size: 0.72rem;
    }

    .action-chip.primary {
        width: 100%;
        justify-content: center;
    }
}

.action-chip.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(227, 176, 75, 0.5);
}

.survey-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.survey-skeleton-item {
    height: 134px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.03) 8%,
        rgba(255, 255, 255, 0.07) 18%,
        rgba(255, 255, 255, 0.03) 33%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

.survey-skeleton-item:nth-child(2) {
    animation-delay: 0.18s;
}

.survey-skeleton-item:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes shimmer {
    to {
        background-position-x: -200%;
    }
}

.survey-error {
    text-align: center;
    border: 1px solid rgba(255, 82, 82, 0.22);
    background: rgba(255, 82, 82, 0.08);
    padding: 1rem;
    border-radius: 14px;
    color: #ffb4b4;
}

.retry-load-btn {
    margin-top: 12px;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    background: var(--gold-trend);
    color: #111;
    cursor: pointer;
}

.empty-state-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    text-align: center;
    padding: 2rem 1.25rem;
}

.empty-state-icon {
    font-size: 2.4rem;
    color: var(--gold-trend);
    opacity: 0.28;
    margin-bottom: 0.8rem;
}

.empty-state-title {
    margin-bottom: 0.4rem;
    opacity: 0.9;
}

.empty-state-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.empty-state-cta {
    margin-top: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.portal-toast {
    position: fixed;
    left: 50%;
    bottom: 94px;
    transform: translateX(-50%) translateY(14px);
    min-width: 220px;
    max-width: 86vw;
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid var(--glass-border);
    background: rgba(17, 17, 17, 0.95);
    color: #f3f3f3;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    z-index: 2200;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.portal-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.portal-toast.success {
    border-color: rgba(46, 204, 113, 0.35);
    color: #dff8ea;
}

.portal-toast.error {
    border-color: rgba(255, 82, 82, 0.35);
    color: #ffd9d9;
}

/* Iconic Buttons */
.icon-btn {
    background: transparent;
    border: none;
    width: auto;
    height: auto;
    padding: 5px;
    cursor: pointer;
    font-size: 1.4rem;
    /* Even larger */
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.icon-btn:hover {
    transform: scale(1.15);
}

.icon-btn.edit {
    color: #64B5F6; /* Sky Blue */
}

.icon-btn.edit:hover {
    filter: drop-shadow(0 0 8px rgba(100, 181, 246, 0.6));
}

.icon-btn.pdf-btn {
    color: #E0E0E0; /* Light Grey */
}

.icon-btn.pdf-btn:hover {
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.icon-btn.delete {
    color: #FF5252; /* Coral Red */
}

.icon-btn.delete:hover {
    filter: drop-shadow(0 0 8px rgba(255, 82, 82, 0.6));
}

/* --- Floating Action Button (FAB) --- */
.fab-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gold-primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.dashboard-fab-survey {
    right: 1rem;
    bottom: calc(86px + env(safe-area-inset-bottom, 10px));
    width: auto;
    height: 52px;
    padding: 0 16px;
    border-radius: 999px;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, rgba(227, 176, 75, 0.95), rgba(203, 149, 41, 0.95));
    color: #111;
    box-shadow: 0 10px 24px rgba(227, 176, 75, 0.35);
}

.dashboard-fab-survey i {
    font-size: 0.8rem;
}

.dashboard-fab-survey:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .dashboard-fab-survey {
        right: 12px;
        height: 48px;
        padding: 0 14px;
        font-size: 0.8rem;
    }
}

.fab-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    color: #000;
}

.fab-btn.dashboard-fab-survey:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(227, 176, 75, 0.36);
}

/* --- Login Enhancements --- */
.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}


.toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(227, 176, 75, 0.6);
    cursor: pointer;
    padding: 8px;
    font-size: 1.1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.toggle-password:hover {
    color: #fff;
}

/* --- Gold Protocol Login Enhancements --- */
.secure-card {
    position: relative;
    background: #0D0D0D;
    border-radius: 40px;
    padding: 3rem 2rem;
    max-width: 420px;
    margin: 4vh auto;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
}

.secure-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(227, 176, 75, 0.04) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}

/* Technical Corner Brackets */
.bracket {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(227, 176, 75, 0.15);
    border-style: solid;
    pointer-events: none;
}
.bracket-tl { top: 30px; left: 30px; border-width: 1px 0 0 1px; }
.bracket-tr { top: 30px; right: 30px; border-width: 1px 1px 0 0; }
.bracket-bl { bottom: 30px; left: 30px; border-width: 0 0 1px 1px; }
.bracket-br { bottom: 30px; right: 30px; border-width: 0 1px 1px 0; }

.brand-logo-container {
    width: 100%;
    margin: 0 auto 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-container img {
    max-width: 240px; /* Doubled from 120px */
    height: auto;
    filter: drop-shadow(0 0 20px rgba(227, 176, 75, 0.15));
}

.brand-title {
    font-size: 2.25rem; /* Industry Standard for high-impact H1 */
    font-weight: 800;
    letter-spacing: 4px; /* Slightly tighter for better block feel */
    color: #E3B04B; 
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    width: 100%;
}

.brand-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.brand-tagline {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 4px;
    color: rgba(227, 176, 75, 0.4);
    text-transform: uppercase;
    margin-bottom: 4rem;
}

.secure-input-wrapper {
    position: relative;
    margin: 2rem 0 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;
    justify-content: center;
}

.secure-input-wrapper.focused {
    background: rgba(227, 176, 75, 0.05);
    border-color: rgba(227, 176, 75, 0.3);
    box-shadow: 0 0 30px rgba(227, 176, 75, 0.1);
}

.secure-input-wrapper.error {
    border-color: #ff4757;
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.2);
}

.floating-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 2px;
    font-weight: 500;
    width: 100%;
}

.secure-input-wrapper.has-content .floating-label,
.secure-input-wrapper.focused .floating-label {
    top: 15px;
    font-size: 0.65rem;
    color: #E3B04B;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.secure-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 22px 0 0;
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 8px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
}

.secure-input-wrapper.has-content .secure-input,
.secure-input-wrapper.focused .secure-input {
    opacity: 1;
}

.secure-input:focus { outline: none; }

.helper-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 2.5rem;
    transition: all 0.3s;
}

.error-msg {
    color: #ff4757;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 5px;
    display: none;
    letter-spacing: 0.5px;
}

.btn-enter-portal {
    width: 100%;
    background: #E3B04B;
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 22px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(227, 176, 75, 0.2);
    text-transform: uppercase;
    animation: pulse-glow 4s infinite;
    position: relative;
    overflow: hidden;
    margin-top: 1rem; /* Move lower for thumb reach */
}

@keyframes pulse-glow {
    0% { box-shadow: 0 10px 30px rgba(227, 176, 75, 0.2); }
    50% { box-shadow: 0 15px 45px rgba(227, 176, 75, 0.4); }
    100% { box-shadow: 0 10px 30px rgba(227, 176, 75, 0.2); }
}

.btn-enter-portal:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    animation: none;
}

.btn-enter-portal .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-enter-portal.loading .spinner { display: block; }
.btn-enter-portal.loading .btn-text, .btn-enter-portal.loading i { display: none; }

.btn-enter-portal.success {
    background: #2ecc71 !important;
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4) !important;
    animation: none;
}


.footer-terminal {
    margin-top: 6rem;
    padding: 0 1.5rem;
}


.system-status-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 4rem;
    opacity: 0.3;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-pill.online i { color: #2ecc71; }

.secure-disclaimer {
    margin-top: 2rem;
    font-size: 0.7rem;
    line-height: 1.6;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
    font-weight: 500;
    text-align: center;
}
/* --- Pull to Refresh --- */
.pull-indicator {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px) scale(0.5);
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    color: var(--gold-trend);
    opacity: 0;
    transition: transform 0.1s, opacity 0.2s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.pull-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.pull-indicator.refreshing i {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* --- Haptic Visual Feedback --- */
.tap-active {
    transform: scale(0.96) !important;
    transition: transform 0.1s !important;
}
