/* ============== RESET & BASE ============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 110%;  /* Base increase of 10% */
}

/* Theme variables */
:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fafafa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow-color: rgba(0,0,0,0.1);
    --link-color: #1a73e8;
    --navbar-bg: #1a73e8;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --table-header-bg: #333333;
    --table-row-alt: #f9f9f9;
    --highlight-bg: #fff3e0;
    --success-bg: #e8f5e9;
    --error-bg: #ffebee;
    --warning-bg: #fff8e1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============== NAVBAR ============== */
.navbar {
    background: var(--navbar-bg);
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.nav-brand a {
    color: white;
    font-weight: bold;
    font-size: 1.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: white;
    text-decoration: none;
}

.nav-admin {
    background: #7b1fa2;
    padding: 6px 14px;
    border-radius: 4px;
}

.nav-quality {
    background: #2e7d32;
    padding: 6px 14px;
    border-radius: 4px;
}

.nav-user {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ============== CONTAINER ============== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============== HOME PAGE ============== */
.home-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

.home-container {
    text-align: center;
    padding: 40px;
}

.home-header h1 {
    color: white;
    font-size: 32px;
    margin-bottom: 8px;
}

.home-header .subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    margin-bottom: 40px;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.big-button {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.big-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-decoration: none;
}

.big-button .icon {
    font-size: 36px;
}

.big-button .button-text {
    text-align: left;
}

.big-button .button-title {
    display: block;
    font-size: 20px;
    font-weight: bold;
}

.big-button .button-desc {
    display: block;
    font-size: 13px;
    opacity: 0.8;
}

.big-button.operator {
    background: white;
    color: #2e7d32;
}

.big-button.login {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

/* ============== OPERATOR PAGE ============== */
.operator-page {
    min-height: 100vh;
    background: #f5f5f5;
    padding: 20px;
}

.operator-container {
    max-width: 600px;
    margin: 0 auto;
}

.operator-header {
    text-align: center;
    margin-bottom: 30px;
}

.operator-header h1 {
    color: #2e7d32;
    margin-bottom: 8px;
}

.operator-header p {
    color: #666;
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.line-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: white;
    border: 3px solid #2e7d32;
    border-radius: 12px;
    font-size: 32px;
    font-weight: bold;
    color: #2e7d32;
    text-decoration: none;
    transition: all 0.2s;
}

.line-button:hover {
    background: #2e7d32;
    color: white;
    text-decoration: none;
}

.back-button {
    display: block;
    text-align: center;
    margin-top: 30px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    color: #666;
}

/* ============== LOGIN PAGE ============== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

/* ============== FORMS ============== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
}

.form-group .hint {
    font-size: 13px;
    color: #888;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group input {
    width: auto;
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ============== DASHBOARD ============== */
.dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    margin-bottom: 4px;
}

.dashboard-header p {
    color: #666;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}

.action-card .icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.action-card .label {
    font-size: 13px;
    font-weight: 600;
}

.action-card.admin {
    border: 2px solid #7b1fa2;
}

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.line-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.line-card:hover {
    text-decoration: none;
    background: #e3f2fd;
}

.line-card .line-number {
    font-size: 24px;
    font-weight: bold;
    color: #1a73e8;
}

.line-card .line-location {
    font-size: 11px;
    color: #999;
}

.recent-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
}

.recent-item:hover {
    background: #f9f9f9;
    text-decoration: none;
}

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

.recent-main .order-number {
    font-weight: bold;
    display: block;
}

.recent-main .details {
    font-size: 12px;
    color: #666;
}

.recent-meta {
    text-align: right;
}

.recent-meta .date {
    display: block;
    font-size: 11px;
    color: #999;
}

/* ============== STATUS BADGES ============== */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
    border: 1px dashed #ffb74d;
}

.status-badge.completed {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.draft {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.superseded {
    background: #f5f5f5;
    color: #666;
}

.status-badge.inactive {
    background: #ffebee;
    color: #c62828;
}

.status-badge.alternate {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.scheduled {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.status-badge.pending {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.status-badge.expires {
    background: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffcc80;
}

.status-badge.none {
    background: #f5f5f5;
    color: #999;
}

/* ============== BLEND SHEET VIEW ============== */
.sheet-view {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.sheet-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sheet-title h1 {
    font-size: 24px;
}

.info-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.info-box {
    border: 2px solid #000;
    padding: 12px 20px;
    text-align: center;
}

.info-box.regrind-box {
    min-width: 120px;
}

.info-box.status-box {
    min-width: 130px;
}

.info-label {
    font-size: 10px;
    font-weight: bold;
    color: #666;
}

.info-value {
    font-weight: bold;
}

.info-value.big {
    font-size: 28px;
}

.info-detail {
    font-size: 10px;
    color: #666;
}

.status-consuming {
    color: #c62828;
}

.status-producing {
    color: #2e7d32;
}

.status-maintaining {
    color: #1565c0;
}

.info-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    min-width: 280px;
    max-width: 450px;
}

.info-grid.wide {
    grid-template-columns: repeat(6, 1fr);
    max-width: none;
}

.info-item {
    padding: 8px 12px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.info-item .label {
    display: block;
    font-size: 10px;
    color: #999;
}

.info-item .value {
    font-weight: bold;
}

/* ============== BLENDER TABLES ============== */
.blender-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.blender-section h3 {
    background: #000;
    color: white;
    padding: 8px 12px;
    font-size: 13px;
}

.blend-table {
    width: 100%;
    border-collapse: collapse;
}

.blend-table th,
.blend-table td {
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 12px;
}

.blend-table th {
    background: #f5f5f5;
    font-weight: 600;
    text-align: left;
}

.blend-table .right {
    text-align: right;
}

.blend-table .center {
    text-align: center;
}

.note-row td {
    font-size: 10px;
    color: #666;
    font-style: italic;
}

/* ============== PARAMS ============== */
.params-section {
    margin-bottom: 20px;
}

.params-section h3 {
    background: #000;
    color: white;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 0;
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #ddd;
}

.param-item {
    padding: 10px 15px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.param-item:nth-child(4n) {
    border-right: none;
}

.param-label {
    font-size: 10px;
    color: #666;
}

.param-value {
    font-weight: bold;
    font-size: 14px;
}

.param-item.highlight {
    background: #e3f2fd;
}

.param-item.highlight .param-value.big {
    font-size: 20px;
    color: #1565c0;
}

/* ============== TIMING ============== */
.timing-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    border: 3px solid #000;
    margin-bottom: 20px;
}

.timing-text {
    font-weight: bold;
}

.timing-value {
    font-size: 20px;
    font-weight: bold;
    background: white;
    border: 2px solid #000;
    padding: 5px 15px;
}

/* ============== ADDITIVE HIGHLIGHT ============== */
.additive-highlight {
    border: 3px solid #000;
    padding: 15px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.additive-label {
    font-size: 12px;
    font-weight: bold;
}

.additive-value {
    font-size: 36px;
    font-weight: bold;
}

.additive-unit {
    font-size: 14px;
    font-weight: bold;
}

/* ============== TIMING BOX ============== */
.timing-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #000;
    margin: 15px 0;
    font-weight: bold;
}

.timing-box .timing-value {
    font-size: 18px;
    border: 2px solid #000;
    padding: 4px 12px;
    background: white;
}

/* ============== PRINT BUTTON ============== */
.print-button {
    display: block;
    width: 100%;
    padding: 15px;
    background: #1a73e8;
    color: white;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    margin-top: 15px;
}

.print-button:hover {
    background: #1557b0;
    text-decoration: none;
}

.print-info {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

/* ============== SHEET FOOTER ============== */
.sheet-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 15px;
    border-top: 2px solid #000;
    margin-top: 20px;
    font-size: 12px;
}

.footer-item .label {
    color: #666;
}

.footer-item .value {
    font-weight: bold;
}

.color-box {
    display: inline-block;
    padding: 2px 10px;
    border: 2px solid #000;
}

/* ============== NO BLEND ============== */
.no-blend {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.no-blend p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.no-blend .hint {
    font-size: 14px;
    color: #999;
}

/* ============== ADMIN PAGES ============== */
.admin-page {
    max-width: 1000px;
    margin: 0 auto;
}

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

.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.admin-card {
    display: block;
    padding: 25px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}

.admin-card .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.admin-card .label {
    display: block;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.admin-card .desc {
    font-size: 15px;
    color: #666;
}

.admin-card.danger {
    border-color: #dc3545;
    background: #fff5f5;
}

.admin-card.danger:hover {
    border-color: #c82333;
    background: #ffe5e5;
}

.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* ============== ADD FORMS ============== */
.add-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.add-form h2 {
    font-size: 16px;
    margin-bottom: 15px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

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

.inline-form .btn {
    height: 44px;
}

.help-text {
    background: #e3f2fd;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

/* ============== DATA TABLES ============== */
.data-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-section h2 {
    font-size: 16px;
    margin-bottom: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.data-table th,
.data-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
}

.data-table tr:hover {
    background: #fafafa;
}

.data-table tr.inactive {
    opacity: 0.5;
}

.data-table tr.inactive-row {
    opacity: 0.5;
    background: #f9f9f9;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 30px !important;
}

.actions {
    white-space: nowrap;
}

.actions form {
    display: inline;
}

.no-items {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* ============== ROLE BADGES ============== */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.role-badge.admin {
    background: #f3e5f5;
    color: #7b1fa2;
}

.role-badge.process_tech {
    background: #e3f2fd;
    color: #1565c0;
}

/* ============== TYPE BADGES ============== */
.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.type-badge.resin {
    background: #e8f5e9;
    color: #2e7d32;
}

.type-badge.additive {
    background: #e3f2fd;
    color: #1565c0;
}

.type-badge.concentrate {
    background: #fff3e0;
    color: #ef6c00;
}

.type-badge.regrind {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-badge.rotary {
    background: #e3f2fd;
    color: #1565c0;
}

.type-badge.rotary_no_additives {
    background: #e8f5e9;
    color: #2e7d32;
}

.type-badge.trim_in_place {
    background: #fff3e0;
    color: #ef6c00;
}

/* ============== HEADER ACTIONS ============== */
.header-actions {
    display: flex;
    gap: 10px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

/* ============== FILTER TABS ============== */
.filter-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.filter-tab {
    padding: 10px 18px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.filter-tab.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

/* ============== COLOR SAMPLE ============== */
.color-sample {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* ============== SETTINGS ============== */
.settings-form {
    max-width: 600px;
}

.settings-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.settings-section h2 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.info-row {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.info-row .info-label {
    color: #666;
}

.info-row .info-value {
    font-weight: bold;
}

.form-actions {
    margin-top: 20px;
}

/* ============== BLEND SUMMARY (Operator) ============== */
.blend-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.blend-summary .info-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* ============== FORM PAGE ============== */
.form-page {
    max-width: 700px;
    margin: 0 auto;
}

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

.blend-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.recipe-info {
    background: #e8f5e9;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.recipe-info.hidden {
    display: none;
}

.recipe-label {
    font-weight: bold;
}

.recipe-color {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    margin-left: 10px;
}

.calculated-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
}

.calc-label {
    color: #666;
}

.calc-value {
    font-weight: bold;
}

.alternate-fields {
    margin-top: 15px;
    padding: 15px;
    background: #fff3e0;
    border-radius: 8px;
}

.alternate-fields.hidden {
    display: none;
}

.regrind-input {
    font-size: 24px !important;
    font-weight: bold;
    text-align: center;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }
    
    .blender-tables {
        grid-template-columns: 1fr;
    }
    
    /* Fix info-row overflow on mobile */
    .info-row {
        flex-wrap: wrap;
    }
    
    .info-box {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 8px 12px;
    }
    
    .info-box .info-value.big {
        font-size: 22px;
    }
    
    .info-grid.wide {
        grid-template-columns: repeat(3, 1fr);
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .params-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .inline-form {
        flex-direction: column;
    }
    
    .inline-form .form-group {
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .info-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-box {
        width: 100%;
        min-width: auto;
    }
    
    .info-grid.wide {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============== SESSION TIMER ============== */
.session-timer {
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    margin-right: 10px;
    font-family: monospace;
    transition: color 0.3s ease;
}

/* ============== LOGOUT WARNING MODAL ============== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.warning-modal {
    border-top: 5px solid #ff9800;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.modal-box h2 {
    margin: 0 0 15px 0;
    color: #333;
}

.modal-box p {
    color: #666;
    margin: 10px 0;
}

.modal-box #warningCountdown {
    font-size: 24px;
    font-weight: bold;
    color: #f44336;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-large {
    padding: 12px 30px;
    font-size: 16px;
}

.btn-primary {
    background: #1976d2;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1565c0;
}

/* ============== HELP PAGES ============== */
.help-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.help-page h1 {
    color: #1976d2;
}

.help-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.help-section h2 {
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 0;
}

.help-section.credits {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    border: 1px solid #bbdefb;
    text-align: center;
}

.help-section.credits h2 {
    border-bottom: none;
    color: #1565c0;
}

.help-section.credits p {
    margin: 10px 0;
    color: #555;
}

.help-section.credits .version-info {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

.help-toc {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.help-toc h3 {
    margin-top: 0;
    color: #1976d2;
}

.help-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-toc li {
    margin: 8px 0;
}

.help-toc a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.help-toc a:hover {
    text-decoration: underline;
}

.help-step {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #1976d2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.step-content p, .step-content ul {
    margin: 5px 0;
    color: #666;
}

.help-info-box {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.help-info-box.warning {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.help-info-box h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.help-info-box p {
    margin: 8px 0;
}

.help-info-box ol, .help-info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.help-info-box li {
    margin: 5px 0;
}

.help-info-box .note {
    font-style: italic;
    color: #666;
    font-size: 14px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.help-table th, .help-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.help-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.help-faq {
    margin: 15px 0;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.help-faq h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
}

.help-faq p {
    margin: 0;
    color: #666;
}

.help-workflow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 120px;
}

.workflow-number {
    width: 30px;
    height: 30px;
    background: #1976d2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
}

.workflow-content h4 {
    margin: 0;
    font-size: 14px;
}

.workflow-content p {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
}

.workflow-arrow {
    font-size: 24px;
    color: #1976d2;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.producing {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-badge.consuming {
    background: #ffcdd2;
    color: #c62828;
}

.status-badge.maintaining {
    background: #fff9c4;
    color: #f57f17;
}

/* Help link in nav */
.nav-help {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 4px 8px !important;
}

@media (max-width: 768px) {
    .help-step {
        flex-direction: column;
        text-align: center;
    }
    
    .help-workflow {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
}

/* Help action card */
.action-card.help {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #64b5f6;
}

.action-card.help:hover {
    border-color: #1976d2;
}

/* Home page help link */
.home-help {
    margin-top: 30px;
    text-align: center;
}

.home-help .help-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
}

.home-help .help-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
    color: white;
}

/* Print styles */
@media print {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #ffffff;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #cccccc;
        --card-bg: #ffffff;
    }
}
