/* Container adjustments - MUST override base.css */
.container {
    max-width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
}

.calc-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
}

@media (min-width: 768px) {
    .calc-wrap {
        padding: 30px;
    }
}

.calc-title {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.calc-title h1 {
    font-size: 26px;
    margin: 0 0 10px 0;
}

@media (min-width: 768px) {
    .calc-title h1 {
        font-size: 32px;
    }
}

.calc-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.control-pill .active {
    color: #667eea;
}

.calc-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 900px) {
    .calc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.calc-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    color: #333;
}

@media (min-width: 768px) {
    .calc-card {
        padding: 25px;
    }
}

.calc-card h2 {
    font-size: 20px;
    margin: 0 0 15px 0;
    color: #333;
}

.machine-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 15px;
    color: white;
}

.machine-box label {
    font-weight: 600;
    font-size: 14px;
    color: white;
    white-space: nowrap;
}

.machine-box select {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    color: #333;
}

.ing-list {
    min-height: 80px;
    margin-bottom: 15px;
}

.ing-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f3f4f6;
    border-radius: 10px;
    margin-bottom: 8px;
}

.ing-info {
    flex: 1;
    min-width: 0;
}

.ing-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.ing-meta {
    font-size: 11px;
    color: #666;
}

.ing-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ing-input-wrap input {
    width: 55px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    text-align: right;
    background: white;
}

.ing-unit {
    font-size: 11px;
    color: #666;
}

.ing-cost {
    font-weight: 700;
    color: #10b981;
    font-size: 13px;
    min-width: 45px;
    text-align: right;
}

.ing-del {
    width: 28px;
    height: 28px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ing-del:hover {
    background: #ef4444;
    color: white;
}

.btn-main {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-save {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 10px;
}

.toggle-row label {
    position: relative;
    width: 46px;
    height: 24px;
    display: inline-block;
}

.toggle-row input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-row span {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-row span::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-row input:checked + span {
    background: #764ba2;
}

.toggle-row input:checked + span::before {
    transform: translateX(22px);
}

.toggle-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.gauge-box {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.gauge-title {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.gauge-val {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.gauge-canvas {
    width: 100%;
    height: 90px;
}

.gauge-zones {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 10px;
}

.zone-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.zone-tag.red { background: #fee2e2; color: #dc2626; }
.zone-tag.green { background: #d1fae5; color: #059669; }
.zone-tag.yellow { background: #fef3c7; color: #d97706; }

.zone-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.stat-cell {
    background: #f3f4f6;
    padding: 12px 6px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 9px;
    color: #666;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.stat-val {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.stat-val.green {
    color: #10b981;
}

.form-inp {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    color: #333;
    box-sizing: border-box;
}

.empty {
    text-align: center;
    padding: 30px 20px;
    color: #9ca3af;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.modal-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-bg.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-head h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    max-height: 50vh;
}

.ing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 400px) {
    .ing-grid {
        grid-template-columns: 1fr;
    }
}

.ing-opt {
    padding: 15px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}

.ing-opt:hover {
    border-color: #667eea;
    background: white;
}

.ing-opt-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.ing-opt-meta {
    font-size: 12px;
    color: #666;
}

/* Navbar fix for calculator */
.navbar {
    padding: 8px 15px;
}

.navbar .logo {
    font-size: 24px;
}

.navbar .brand-name {
    font-size: 18px;
}

.navbar .nav-links {
    gap: 8px;
}

.navbar .nav-links a {
    padding: 5px 10px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 6px 10px;
    }
    
    .navbar .logo {
        font-size: 20px;
    }
    
    .navbar .brand-name {
        font-size: 16px;
    }
    
    .navbar .nav-links a {
        padding: 4px 8px;
        font-size: 11px;
    }
}
