:root {
    --primary-color: #10b981; /* Green accent */
    --primary-hover: #059669;
    --text-main: #1d1d1f; /* Apple dark */
    --text-muted: #86868b;
    --danger: #ff3b30;
    
    /* Liquid Glass Material */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-heavy: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-border-light: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --glass-blur: blur(24px);
    --glass-specular: inset 0 1px 1px rgba(255,255,255,0.8), inset 0 -1px 1px rgba(255,255,255,0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(-45deg, #e0f2fe, #dcfce7, #f3e8ff, #ffedd5);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    background-attachment: fixed;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    position: relative;
    padding-bottom: 120px; /* Space for floating dock */
    display: flex;
    flex-direction: column;
}

/* Header */
.header-dashboard {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 24px 20px;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
    /* Specular highlight at the bottom lip */
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.7), 0 10px 20px rgba(0,0,0,0.03);
}

.header-dashboard h1 {
    font-size: 15px;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 4px;
}

.header-dashboard .total {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--primary-color), #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards (Liquid Glass Content Layers) */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 20px;
    margin: 0 20px 20px 20px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 16px;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), inset 0 2px 4px rgba(0,0,0,0.02);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), #059669);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), inset 0 1px 1px rgba(255,255,255,0.3);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-secondary {
    background: var(--glass-bg-heavy);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--glass-shadow);
}

.btn-secondary:active {
    background: rgba(200,200,200,0.3);
}

/* List Items (Liquid Layers) */
.product-list {
    list-style: none;
    margin: 0 20px;
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease, background 0.2s;
}

.product-item:active {
    transform: scale(0.98);
    background: var(--glass-bg-hover);
}

.product-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.product-price {
    font-size: 16px;
    font-weight: 700;
}

.btn-delete {
    background: rgba(255, 59, 48, 0.1);
    border: none;
    color: var(--danger);
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:active {
    transform: scale(0.9);
    background: rgba(255, 59, 48, 0.2);
}

/* Floating Dock (Bottom Nav) */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
    width: calc(100% - 40px);
    max-width: 440px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 14px 10px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), inset 0 1px 1px rgba(255,255,255,0.9);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    width: 26px;
    height: 26px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 6px rgba(16, 185, 129, 0.3));
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 4px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-color);
}

/* Hide datalist indicator cleanly */
input::-webkit-calendar-picker-indicator {
    opacity: 0;
}
