:root {
    --primary: #0284c7;
    --primary-dark: #075985;
    --primary-light: #7dd3fc;
    --secondary: #64748b;
    --background: #ecfeff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #0f172a;
    --text-muted: #475569;
    --border: rgba(14, 165, 233, 0.2);
    --success: #10b981;
    --danger: #ef4444;
    --accent: #22d3ee;
    --glass: rgba(255, 255, 255, 0.7);
    --grad-blue: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: fixed linear-gradient(180deg, #ecfeff 0%, #e0f2fe 100%);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 90px;
    min-height: 100vh;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 15px;
    background: var(--grad-blue);
    border-radius: 18px;
    color: white;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 i {
    color: var(--primary-light);
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view {
    display: block;
}

.hidden {
    display: none !important;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    margin-left: 4px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    color: var(--text);
    transition: all 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.primary-btn {
    width: 100%;
    background: var(--grad-blue);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
}

.primary-btn:active {
    transform: scale(0.97);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    padding: 10px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--secondary);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.nav-item i {
    font-size: 1.5rem;
}

.nav-item.active {
    color: var(--primary);
}

/* Parameter Specific Colors */
.param-ph {
    --param-color: #10b981;
}

.param-cloro {
    --param-color: #eab308;
}

.param-temp {
    --param-color: #ef4444;
}

.param-hierro {
    --param-color: #64748b;
}

.param-group label {
    color: var(--param-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Accordion Styles */
.accordion {
    margin-top: 10px;
}

.accordion-item {
    margin-bottom: 8px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.accordion-header {
    background: white;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary-dark);
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f0f9ff;
}

.accordion-header i {
    transition: transform 0.3s;
    color: var(--primary);
}

.accordion-item.active>.accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    background: rgba(255, 255, 255, 0.5);
    display: none;
    padding: 5px;
}

.accordion-item.active>.accordion-content {
    display: block;
}

/* Sample Row Layout */
.sample-row {
    background: white;
    margin: 8px;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.sample-row-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.action-btns {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-icon.edit {
    color: var(--primary);
}

.btn-icon.delete {
    color: var(--danger);
}

.btn-icon:hover {
    background: #f1f5f9;
}

.sample-location {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 2px;
}

.sample-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.param-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.param-badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.param-badge.badge-ph {
    color: #065f46;
    border-left: 4px solid #10b981;
}

.param-badge.cloro {
    color: #854d0e;
    border-left: 4px solid #eab308;
}

.param-badge.temp {
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.param-badge.hierro {
    color: #1e293b;
    border-left: 4px solid #64748b;
}

/* Calendar Refinements */
.cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cal-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cal-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.cal-title {
    font-weight: 700;
    color: var(--primary-dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-header {
    text-align: center;
    font-weight: 800;
    font-size: 0.7rem;
    color: var(--primary-dark);
    padding: 5px 0;
}

.cal-day {
    aspect-ratio: 1/1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px;
    font-size: 0.8rem;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    border: 1px solid var(--border);
    min-height: 85px;
    transition: all 0.2s;
    overflow: hidden;
}

.cal-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.cal-day.today {
    background: var(--grad-blue);
    color: white;
    font-weight: 800;
    border: none;
}

.cal-count-bubble {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 8px;
    font-weight: 800;
}

.cal-day.has-samples {
    border-color: var(--primary-light);
    background: #f0f9ff;
}

.cal-day.today.has-samples .cal-count-bubble {
    background: white;
    color: var(--primary);
}

/* Custom Suggestions List */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    z-index: 2000;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 5px;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item:active {
    background: #f0f9ff;
    color: var(--primary);
}

.suggestion-item i {
    color: var(--primary-light);
}