:root {
    /* Lila Kagit Corporate Colors */
    --accent: #4C8D2B; /* Brand Green */
    --accent-hover: #2C7500; /* Darker Green Gradient */
    --success: #94D600; /* Light Green Accent */
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Layout Colors (Light Theme based on Lila Kagit) */
    --bg-color: #f7f9f7; /* Very subtle green tint to white */
    --card-bg: rgba(255, 255, 255, 0.95); /* Glassy white */
    --card-border: rgba(76, 141, 43, 0.15); /* Brand green slight border */
    
    /* Typography */
    --text-primary: #000000;
    --text-secondary: #65666A; /* Lila Corporate Gray */
    
    /* Blobs */
    --blob-1: #94D600;
    --blob-2: #4C8D2B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25; /* Lightened for white theme */
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    background: var(--blob-1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    background: var(--blob-2);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, 50px) scale(1.1); }
    66% { transform: translate(50px, 150px) scale(0.9); }
    100% { transform: translate(-50px, 100px) scale(1.2); }
}

/* Container */
.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-brand-logo {
    height: 34px;
    max-width: 120px;
    object-fit: contain;
}

/* State Management */
.state-container {
    display: none;
    width: 100%;
}
.state-container.view-active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading State */
#loading {
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
    color: var(--text-secondary);
}
.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--card-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Error State */
#error {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    align-items: center;
    gap: 16px;
    box-shadow: 0 25px 50px -12px rgba(76, 141, 43, 0.1);
}
.error-icon {
    font-size: 3rem;
    color: var(--danger);
    margin-bottom: 8px;
}

/* Asset Card (Glassmorphism Light) */
.asset-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(76, 141, 43, 0.1);
    transition: transform 0.3s ease;
}
.asset-card:hover {
    transform: translateY(-5px);
}

/* Header */
.card-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--card-border);
}

.asset-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(76, 141, 43, 0.05); /* Tint instead of white */
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0px;
    border: 1px solid rgba(76, 141, 43, 0.15);
    color: var(--text-primary);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.asset-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}
.asset-tag {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: monospace;
    background: rgba(76, 141, 43, 0.08); /* Green Tint */
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Custom Image placeholder vs Image */
.card-image-container {
    width: 100%;
    height: 140px;
    background: rgba(240, 245, 240, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--card-border);
    padding: 10px;
}
.card-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.card-image-container:hover img {
    transform: scale(1.05);
}
.image-placeholder {
    font-size: 4rem;
    color: rgba(76, 141, 43, 0.2);
}

/* Details Section */
.card-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(76, 141, 43, 0.1);
}
.detail-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(148, 214, 0, 0.15), rgba(76, 141, 43, 0.15));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid rgba(76, 141, 43, 0.2);
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    word-break: break-word;
    color: var(--text-primary);
}

/* Custom Fields */
.custom-fields-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}
.custom-fields-wrapper:not(:empty) {
    padding-top: 20px;
    border-top: 1px dashed rgba(76, 141, 43, 0.2);
}

.custom-field-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(148, 214, 0, 0.05));
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(76, 141, 43, 0.15);
}

.cf-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

/* Animations */
.skeleton {
    background: linear-gradient(90deg, rgba(76, 141, 43, 0.05) 25%, rgba(76, 141, 43, 0.1) 50%, rgba(76, 141, 43, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    .asset-card {
        border-radius: 20px;
    }
}
