/* static/style.css - Modern Plant Monitoring System */

:root {
    /* Modern Color Palette - Green/Blue nature theme */
    --primary: #10b981;        /* Emerald green */
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    
    --secondary: #3b82f6;      /* Blue */
    --secondary-dark: #1e40af;
    --secondary-light: #dbeafe;
    
    --accent: #8b5cf6;         /* Purple accent */
    --accent-light: #ede9fe;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Backgrounds */
    --bg-primary: #0f172a;     /* Dark slate */
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-hover: #475569;
    
    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Borders */
    --border: #475569;
    --border-light: #64748b;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a2332 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header / Navigation */
.header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--primary);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: "🌱";
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.nav-links a.active {
    background: var(--primary);
    color: white;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Page Titles */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Forms */
form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Buttons */
button,
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badges & Status */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

.badge-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* Status Indicators */
.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-online {
    background: var(--success);
}

.status-offline {
    background: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

thead {
    background: var(--bg-secondary);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

tbody tr {
    transition: background 0.3s ease;
}

tbody tr:hover {
    background: var(--bg-hover);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

.close {
    color: var(--text-muted);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: var(--danger);
}

/* Device Cards */
.device-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.device-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.device-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Loading Spinner */
.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}
/* ========================================
   MODERNIZED DASHBOARD DEVICE STYLING
   ======================================== */

/* Dashboard Device Section - Modernized Styling */
.device-section {
    margin-bottom: 1.5rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.4) 0%, rgba(30, 41, 59, 0.6) 100%) !important;
    backdrop-filter: blur(10px);
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

.device-section:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3) !important;
    border-color: var(--primary) !important;
}

/* Dashboard Device Header - Modernized */
.device-section .device-header {
    padding: 1.25rem 1.5rem !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.3s ease !important;
    border-bottom: 1px solid var(--border) !important;
}

.device-section .device-header:hover {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
}

.device-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 1.25rem !important;
    flex: 1 !important;
}

.device-section .device-name {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    letter-spacing: -0.02em !important;
}

.device-section .status-badge {
    padding: 0.4rem 1rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.device-section .status-online {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
    color: white !important;
}

.device-section .status-offline {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
    color: white !important;
}

.device-section .header-info {
    display: flex !important;
    gap: 1.5rem !important;
    align-items: center !important;
}

.device-section .info-item {
    display: flex !important;
    align-items: baseline !important;
    gap: 0.5rem !important;
    font-size: 0.95rem !important;
    padding: 0.4rem 0.8rem !important;
    background: rgba(51, 65, 85, 0.5) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.device-section .info-item:hover {
    background: rgba(51, 65, 85, 0.8) !important;
    transform: scale(1.05) !important;
}

.device-section .info-item label {
    color: var(--text-muted) !important;
    font-size: 0.85rem !important;
}

.device-section .info-item span {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.device-section .expand-icon {
    font-size: 1.3rem !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: var(--primary) !important;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3)) !important;
}

.device-section .expand-icon.expanded {
    transform: rotate(180deg) !important;
}

/* Device Content Area */
.device-content {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.device-content.expanded {
    max-height: 3000px !important;
}

.device-content-inner {
    padding: 1.5rem !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, rgba(30, 41, 59, 0.3) 100%) !important;
}

/* Cards Grid */
.cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

/* Individual Card Styling - Modernized */
.device-section .card {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.6) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 0.75rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(8px);
}

.device-section .card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
}

.device-section .card-title {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
    color: var(--primary) !important;
    border-bottom: 2px solid rgba(16, 185, 129, 0.3) !important;
    padding-bottom: 0.5rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

/* Water Bucket Visualization - Modernized */
.bucket-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0.5rem !important;
    width: 100% !important;
}

.water-bucket-wrapper {
    position: relative !important;
    display: inline-block !important;
    min-width: 240px !important;
}

.water-bucket {
    width: 105px !important;
    height: 150px !important;
    border: 3px solid var(--border-light) !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    position: relative !important;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.water-level {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(to top, 
        rgba(59, 130, 246, 0.9) 0%, 
        rgba(16, 185, 129, 0.7) 50%,
        rgba(16, 185, 129, 0.5) 100%) !important;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 0 0 9px 9px !important;
    box-shadow: 0 -2px 10px rgba(16, 185, 129, 0.5) !important;
    animation: shimmer 3s ease-in-out infinite !important;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.sensor-marker {
    position: absolute !important;
    left: -30px !important;
    right: -30px !important;
    height: 2px !important;
    background: var(--warning) !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6) !important;
    z-index: 10 !important;
}

.sensor-label {
    position: absolute !important;
    left: 138px !important;
    font-size: 1.5rem !important;
    white-space: nowrap !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transform: translateY(-50%) !important;
    flex-direction: row !important;
    line-height: 1 !important;
}

.sensor-label span {
    line-height: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -0.15em !important;
}

/* Valve Controls - Modernized */
.valve-group {
    margin-bottom: 0.75rem !important;
    text-align: center !important;
}

.valve-group:last-child {
    margin-bottom: 0 !important;
}

.valve-label {
    font-size: 1rem !important;
    margin-bottom: 0.6rem !important;
    display: block !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-align: center !important;
}

.valve-buttons {
    display: inline-flex !important;
    gap: 0.6rem !important;
    justify-content: center !important;
}

.valve-buttons button {
    flex: none !important;
    width: 110px !important;
    padding: 1.05rem 0.6rem !important;
    border: 2px solid var(--border) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.6) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.valve-buttons button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3) !important;
}

.valve-buttons button.btn-on-active {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
    border-color: var(--success) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

.valve-buttons button.btn-off-active {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
    border-color: var(--danger) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

.valve-buttons button.btn-inactive {
    opacity: 0.6 !important;
}

.valve-buttons button.btn-inactive:hover {
    opacity: 0.8 !important;
}

/* pH Dosing Controls - Modernized */
.ph-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
    padding: 0.5rem !important;
    background: rgba(51, 65, 85, 0.4) !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
}

.ph-header span {
    color: var(--text-secondary) !important;
    font-size: 0.85rem !important;
}

.ph-header strong {
    color: var(--primary) !important;
    font-size: 0.95rem !important;
    margin-left: 0.25rem !important;
}

.dose-sections {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.dose-section {
    background: rgba(30, 41, 59, 0.5) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 0.6rem !important;
}

.dose-section h4 {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--primary) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.dose-info {
    color: var(--text-secondary) !important;
    font-size: 0.75rem !important;
    display: inline-block !important;
    margin: 0 0.5rem !important;
    padding: 0 !important;
    vertical-align: middle !important;
    background: transparent !important;
    border: none !important;
    border-left: none !important;
}

.dose-button {
    padding: 0.5rem 0.75rem !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 0.65rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
    display: inline-block !important;
    vertical-align: middle !important;
    width: auto !important;
    min-width: 44px !important;
    white-space: nowrap !important;
}

.dose-button:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4) !important;
}

.dose-button:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.3) 0%, rgba(100, 116, 139, 0.3) 100%) !important;
    box-shadow: none !important;
}

.manual-section {
    margin-top: 0 !important;
    padding-top: 0.3rem !important;
    border-top: 1px solid var(--border) !important;
}

.manual-section label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    margin-right: 0.5rem !important;
    color: var(--text-muted) !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    line-height: 2rem !important;
}

.manual-input {
    display: inline-flex !important;
    gap: 0.4rem !important;
}

.manual-input input {
    width: 90px !important;
    padding: 0.4rem 0.5rem !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    font-size: 0.75rem !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

.manual-input input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1) !important;
}

.manual-input button {
    padding: 0.4rem 0.75rem !important;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.05em !important;
}

.manual-input button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}