@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #008f39;
    --primary-light: #e8f5e9;
    --primary-dark: #006024;
    --secondary-color: #718096;
    --accent-color: #00c853;
    --background-color: #f8faf9;
    --surface-color: #ffffff;
    --text-color: #1c1c1c;
    --text-muted: #666666;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --elevation-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --elevation-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --bottom-nav-height: 65px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* App Bar - Android Style */
header {
    background: var(--surface-color);
    padding: 1rem 0;
    box-shadow: var(--elevation-1);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

header h1 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

header h1 i {
    color: var(--primary-color);
}

/* Grid Dashboard */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* Android-like Cards */
.card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.card:active {
    transform: scale(0.97);
}

.card:nth-child(6n+1) .icon { color: #008f39; background: #e8f5e9; }
.card:nth-child(6n+2) .icon { color: #2196f3; background: #e3f2fd; }
.card:nth-child(6n+3) .icon { color: #ff9800; background: #fff3e0; }
.card:nth-child(6n+4) .icon { color: #9c27b0; background: #f3e5f5; }
.card:nth-child(6n+5) .icon { color: #009688; background: #e0f2f1; }
.card:nth-child(6n+6) .icon { color: #3f51b5; background: #e8eaf6; }

.card:nth-child(6n+1):active { background-color: #e8f5e9; }
.card:nth-child(6n+2):active { background-color: #e3f2fd; }
.card:nth-child(6n+3):active { background-color: #fff3e0; }
.card:nth-child(6n+4):active { background-color: #f3e5f5; }
.card:nth-child(6n+5):active { background-color: #e0f2f1; }
.card:nth-child(6n+6):active { background-color: #e8eaf6; }

.card:hover {
    box-shadow: var(--elevation-2);
}

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--primary-color);
    background: var(--primary-light);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.card:hover .icon {
    transform: rotate(-10deg) scale(1.1);
}

.card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0;
}

.card.prototype {
    opacity: 0.6;
    background-color: #fafafa;
    border-style: dashed;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    transition: var(--transition);
    gap: 4px;
}

.nav-item i {
    font-size: 1.4rem;
}

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

/* Floating Action Button */
.fab {
    position: fixed;
    right: 20px;
    bottom: calc(var(--bottom-nav-height) + 20px);
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-2);
    text-decoration: none;
    font-size: 1.5rem;
    z-index: 999;
    transition: var(--transition);
}

.fab:active {
    transform: scale(0.9) rotate(45deg);
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface-color);
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding-left: 4px;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 14px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background: #fdfdfd;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    width: auto;
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    width: auto;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
    
    header h1 {
        font-size: 1.1rem;
    }
    
    .card {
        padding: 16px 12px;
        min-height: 140px;
    }
    
    .card .icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    body { background: white; padding: 0; }
    .no-print, .bottom-nav, .fab { display: none !important; }
    header { position: static; box-shadow: none; border-bottom: 1px solid #eee; }
}