:root {
    /* Default (Light) Theme from React Native App */
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text: #1E293B;
    --text-dim: #64748B;
    --primary: #81ade7;
    --primary-glow: rgba(129, 173, 231, 0.4);
    --accent: #62b8ea;
    --border: rgba(0, 0, 0, 0.05);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --surface-hover: #F1F5F9;

    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    margin: 0;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 90px;
}

main {
    max-width: 1200px;
    /* Expandable for desktop */
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

p {
    font-size: 1rem;
    color: var(--text-dim);
}

/* Header & Logos */
.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 25px;
    text-align: center;
    animation: fadeInDown 0.6s ease;
    width: 100%;
}

.top-header {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.profile-trigger {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 24px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-trigger:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    transform: scale(1.05);
}

.logo {
    height: 120px;
    width: 140px;
    margin-bottom: 10px;
    object-fit: contain;
}

/* Glassmorphism Cards as in native */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card:hover,
.card:active {
    transform: translateY(-4px);
    background: var(--surface-hover);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Grids */
.row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.row .card {
    flex: 1;
    align-items: center;
    text-align: center;
    min-width: 200px;
}

.row .card-full {
    flex: 1;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 25px;
}

/* Icons */
.icon-container {
    background: var(--primary-glow);
    color: var(--primary);
    padding: 12px;
    border-radius: 16px;
    display: inline-flex;
    margin-bottom: 12px;
    transition: var(--transition);
}

.card:hover .icon-container {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.icon-container-row {
    margin-bottom: 0;
    margin-right: 20px;
}

/* Responsive Grid for Items */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 18px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.btn:hover,
.btn:active {
    background: var(--primary);
    color: var(--surface);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-solid {
    background: var(--primary);
    color: var(--surface);
}

/* Image Items */
.item-card {
    display: flex;
    flex-direction: row;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.item-card:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.item-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    background-color: var(--background);
}

.item-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* allows text truncation */
}

.item-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-brand {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.item-price {
    font-weight: 700;
    font-size: 1.2rem;
}

.stock-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* List Headers */
.section-title {
    padding: 20px 0;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.search-bar:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 15px);
}

.nav-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 10px;
    min-width: 60px;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    transition: var(--transition);
}

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

.nav-item.active i {
    transform: translateY(-4px);
}

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

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Auth Section */
.auth-section {
    background: rgba(129, 173, 231, 0.05);
    margin-top: 20px;
    padding: 25px;
    border-radius: 30px;
    text-align: center;
}

/* Deliveries */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-delivered {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Settings */
.settings-group {
    margin-bottom: 24px;
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.settings-item {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: var(--surface-hover);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}