/* styles.css */
/* Kitchen Dashboard - FreeWWW */
/* Created: 2026-01-06 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --navy-dark: #1a2744;
    --navy: #2c3e5c;
    --navy-light: #3d5a80;
    --blue-accent: #4a90d9;
    --blue-light: #6bb3f0;
    --teal: #48c9b0;
    --teal-light: #76d7c4;
    --orange: #e67e22;
    --orange-light: #f39c12;
    --red: #e74c3c;
    --red-light: #ff6b6b;
    --green: #27ae60;
    --green-light: #2ecc71;
    --yellow: #f1c40f;
    --purple: #9b59b6;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ========================================
   Header
   ======================================== */
.app-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    justify-content: center;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--navy-light);
    color: var(--white);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--blue-accent);
}

.nav-icon {
    font-size: 1.1rem;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    min-height: 500px;
}

.tool-view {
    display: none;
}

.tool-view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ========================================
   Dashboard View
   ======================================== */
.dashboard-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
}

.dashboard-intro h2 {
    color: var(--navy);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.dashboard-intro p {
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.25rem;
    color: var(--navy);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.section-title:first-of-type {
    margin-top: 0;
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.tool-card:hover {
    border-color: var(--blue-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.tool-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tool-card h4 {
    color: var(--navy);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* External Links Grid */
.external-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.external-link-card {
    display: block;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    color: var(--white);
    transition: var(--transition);
}

.external-link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.external-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.external-link-card h4 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.external-link-card p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ========================================
   Tool Views Common Styles
   ======================================== */
.tool-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.tool-header h2 {
    color: var(--navy);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: var(--gray-600);
}

.tool-body {
    min-height: 300px;
}

.tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--gray-500);
    font-style: italic;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form-input::placeholder {
    color: var(--gray-500);
}

.form-input-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

/* Input with unit */
.input-with-unit {
    display: flex;
    align-items: stretch;
}

.input-with-unit .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.input-with-unit .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
    width: auto;
    min-width: 80px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--navy-light) 0%, var(--blue-accent) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-success {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-light) 100%);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
    color: var(--white);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========================================
   Cards & Panels
   ======================================== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card-header {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.panel {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.panel-highlight {
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.1) 0%, rgba(72, 201, 176, 0.1) 100%);
    border: 1px solid var(--blue-accent);
}

/* ========================================
   Tables
   ======================================== */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
}

.data-table th:first-child {
    border-top-left-radius: var(--radius-md);
}

.data-table th:last-child {
    border-top-right-radius: var(--radius-md);
}

.data-table tbody tr:hover {
    background: var(--gray-100);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table.table-striped tbody tr:nth-child(even) {
    background: var(--gray-100);
}

.data-table.table-compact th,
.data-table.table-compact td {
    padding: 0.5rem;
}

/* ========================================
   Alerts & Messages
   ======================================== */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-info {
    background: rgba(74, 144, 217, 0.1);
    border: 1px solid var(--blue-accent);
    color: var(--navy);
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

.alert-warning {
    background: rgba(230, 126, 34, 0.1);
    border: 1px solid var(--orange);
    color: var(--orange);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
}

/* ========================================
   Badges & Tags
   ======================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-primary { background: var(--navy); color: var(--white); }
.badge-success { background: var(--green); color: var(--white); }
.badge-warning { background: var(--orange); color: var(--white); }
.badge-danger { background: var(--red); color: var(--white); }
.badge-info { background: var(--blue-accent); color: var(--white); }

.tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    background: var(--gray-200);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    margin: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    background: var(--gray-300);
}

.tag.active {
    background: var(--navy);
    color: var(--white);
}

/* ========================================
   Tabs
   ======================================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1rem;
    gap: 0.25rem;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    color: var(--gray-600);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--navy);
}

.tab-btn.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   Charts
   ======================================== */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
}

.chart-container-wide {
    max-width: 100%;
}

.chart-container-small {
    max-width: 300px;
}

/* ========================================
   Progress & Meters
   ======================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-accent) 0%, var(--teal) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.danger { background: linear-gradient(90deg, var(--red) 0%, var(--red-light) 100%); }
.progress-fill.warning { background: linear-gradient(90deg, var(--orange) 0%, var(--yellow) 100%); }
.progress-fill.success { background: linear-gradient(90deg, var(--green) 0%, var(--green-light) 100%); }

/* ========================================
   Lists
   ======================================== */
.item-list {
    list-style: none;
}

.item-list li {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.item-list li:hover {
    background: var(--gray-100);
}

.item-list .item-content {
    flex: 1;
}

.item-list .item-actions {
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   Search & Filters
   ======================================== */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box .form-input {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    white-space: nowrap;
}

/* ========================================
   Tool-Specific: Recipe Scaler
   ======================================== */
.ingredient-row {
    display: grid;
    grid-template-columns: 100px 120px 1fr 80px auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.ingredient-row .form-input,
.ingredient-row .form-select {
    margin-bottom: 0;
}

.scale-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.scale-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    min-width: 100px;
    text-align: center;
}

.results-summary {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}

.results-summary h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.result-item {
    text-align: center;
}

.result-item .value {
    font-size: 1.75rem;
    font-weight: 700;
}

.result-item .label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ========================================
   Tool-Specific: Oven Temperature
   ======================================== */
.temp-converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.temp-box {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.temp-box.active {
    border-color: var(--blue-accent);
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.1) 0%, rgba(72, 201, 176, 0.1) 100%);
}

.temp-box .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
}

.temp-box .unit {
    font-size: 1rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.temp-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.temp-preset-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.temp-preset-btn:hover {
    border-color: var(--blue-accent);
    background: var(--gray-100);
}

/* ========================================
   Tool-Specific: Expiration Tracker
   ======================================== */
.expiration-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.expiration-item.expiring-soon {
    border-color: var(--orange);
    background: rgba(230, 126, 34, 0.05);
}

.expiration-item.expired {
    border-color: var(--red);
    background: rgba(231, 76, 60, 0.05);
}

.expiration-item.fresh {
    border-color: var(--green);
    background: rgba(39, 174, 96, 0.05);
}

.expiration-item .item-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.expiration-item .item-details {
    flex: 1;
}

.expiration-item .item-name {
    font-weight: 600;
    color: var(--gray-800);
}

.expiration-item .item-location {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.expiration-item .days-left {
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 80px;
}

.days-left.danger { background: var(--red); color: var(--white); }
.days-left.warning { background: var(--orange); color: var(--white); }
.days-left.success { background: var(--green); color: var(--white); }

/* ========================================
   Tool-Specific: Nutrition Label
   ======================================== */
.nutrition-label {
    width: 280px;
    border: 2px solid var(--gray-900);
    padding: 0.5rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--white);
    margin: 0 auto;
}

.nutrition-label .title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
}

.nutrition-label .serving-info {
    border-bottom: 8px solid var(--gray-900);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.nutrition-label .calories-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 4px solid var(--gray-900);
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
}

.nutrition-label .calories-row .amount {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.nutrition-label hr {
    border: none;
    border-top: 1px solid var(--gray-400);
    margin: 0.25rem 0;
}

.nutrition-label .thick-hr {
    border-top: 4px solid var(--gray-900);
}

.nutrition-label .nutrient-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.1rem 0;
}

.nutrition-label .nutrient-row.indent {
    padding-left: 1rem;
}

.nutrition-label .nutrient-row.bold {
    font-weight: 700;
}

.nutrition-label .dv {
    font-weight: 700;
}

/* ========================================
   Tool-Specific: Baking Ratios
   ======================================== */
.ratio-card {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.ratio-card:hover {
    border-color: var(--blue-accent);
}

.ratio-card h4 {
    color: var(--navy);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.ratio-card .ratio-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.ratio-visual {
    display: flex;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 1rem 0;
}

.ratio-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ========================================
   Tool-Specific: Temperature Guide
   ======================================== */
.temp-category {
    margin-bottom: 2rem;
}

.temp-category h4 {
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
    font-size: 1.1rem;
}

.temp-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    background: var(--gray-100);
}

.temp-item .food-name {
    flex: 1;
    font-weight: 500;
}

.temp-item .temp-value {
    font-weight: 700;
    color: var(--navy);
    min-width: 120px;
    text-align: right;
}

.doneness-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.doneness-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.doneness-rare { background: #ffcdd2; color: #c62828; }
.doneness-medium-rare { background: #ffccbc; color: #d84315; }
.doneness-medium { background: #ffe0b2; color: #ef6c00; }
.doneness-medium-well { background: #fff9c4; color: #f9a825; }
.doneness-well { background: #dcedc8; color: #558b2f; }

/* ========================================
   Tool-Specific: Wine Pairing
   ======================================== */
.pairing-result {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--gray-400);
}

.pairing-result.excellent { border-left-color: var(--green); }
.pairing-result.good { border-left-color: var(--blue-accent); }
.pairing-result.fair { border-left-color: var(--orange); }

.wine-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.wine-type-red { color: #722F37; }
.wine-type-white { color: #F7E7CE; text-shadow: 0 0 3px #666; }
.wine-type-rose { color: #FFB7C5; text-shadow: 0 0 2px #666; }
.wine-type-sparkling { color: #F5E6D3; text-shadow: 0 0 3px #666; }

.pairing-info h4 {
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.pairing-info p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pairing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* ========================================
   Tool-Specific: Oil Guide
   ======================================== */
.oil-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.oil-icon {
    font-size: 2.5rem;
}

.oil-info h4 {
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.smoke-point-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.smoke-point-bar {
    flex: 1;
    height: 12px;
    background: linear-gradient(90deg, #3498db 0%, #f1c40f 50%, #e74c3c 100%);
    border-radius: 6px;
    position: relative;
    max-width: 200px;
}

.smoke-point-marker {
    position: absolute;
    top: -4px;
    width: 6px;
    height: 20px;
    background: var(--gray-900);
    border-radius: 3px;
    transform: translateX(-50%);
}

.smoke-point-value {
    font-weight: 700;
    color: var(--navy);
    min-width: 80px;
}

.oil-uses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

/* ========================================
   Tool-Specific: Herb & Spice
   ======================================== */
.herb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.herb-card {
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.herb-card:hover {
    background: var(--white);
    border-color: var(--gray-300);
}

.herb-card.selected {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.herb-card .herb-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.herb-card .herb-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.pairing-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.pairing-section h4 {
    color: var(--navy);
    margin-bottom: 1rem;
}

.pairing-category {
    margin-bottom: 1rem;
}

.pairing-category h5 {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.pairing-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pairing-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* ========================================
   Tool-Specific: Kitchen Units
   ======================================== */
.converter-section {
    margin-bottom: 2rem;
}

.quick-ref-table {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.quick-ref-table h5 {
    color: var(--navy);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.quick-ref-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.quick-ref-item .from {
    color: var(--gray-600);
}

.quick-ref-item .to {
    font-weight: 600;
    color: var(--navy);
}

/* ========================================
   Tool-Specific: Portion Calculator
   ======================================== */
.portion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.portion-card {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.portion-card h4 {
    color: var(--navy);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portion-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.portion-item .food {
    color: var(--gray-700);
}

.portion-item .amount {
    font-weight: 600;
    color: var(--navy);
}

/* ========================================
   Tool-Specific: Cooking Time
   ======================================== */
.time-result {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: var(--radius-lg);
    color: var(--white);
    margin: 1.5rem 0;
}

.time-result .time-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.time-result .time-label {
    font-size: 1rem;
    opacity: 0.9;
}

.time-breakdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.time-breakdown-item {
    text-align: center;
}

.time-breakdown-item .value {
    font-size: 1.25rem;
    font-weight: 600;
}

.time-breakdown-item .label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ========================================
   Footer
   ======================================== */
.app-footer {
    margin-top: 2rem;
    padding: 1.5rem;
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-logo {
    width: 32px;
    height: 32px;
}

.footer-content a {
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
}

.footer-content a:hover {
    color: var(--navy);
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.text-warning { color: var(--orange); }
.text-info { color: var(--blue-accent); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .header-subtitle {
        font-size: 0.9rem;
    }
    
    .main-nav {
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-icon {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .tool-grid,
    .external-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .tool-card,
    .external-link-card {
        padding: 1rem;
    }
    
    .tool-header h2 {
        font-size: 1.25rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
    
    .ingredient-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .ingredient-row .form-input:nth-child(3) {
        grid-column: 1 / -1;
    }
    
    .temp-converter-grid {
        grid-template-columns: 1fr;
    }
    
    .nutrition-label {
        width: 100%;
        max-width: 280px;
    }
    
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .scale-controls {
        flex-direction: column;
        text-align: center;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-breakdown {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0 0.5rem 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .herb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .portion-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
    }
    
    .app-header,
    .main-nav,
    .app-footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        box-shadow: none;
        padding: 0;
    }
    
    .tool-view {
        display: block !important;
    }
    
    .nutrition-label {
        margin: 0;
        border: 2px solid black;
    }
}
