/* Fallback fonts for offline use */
@font-face {
    font-family: 'Inter-fallback';
    src: local('Inter'), local('Arial'), local('Helvetica'), local('Segoe UI'), local('Roboto'), local('sans-serif');
    font-weight: 300 700;
    font-display: swap;
}

/* FontAwesome fallback for offline use */
@font-face {
    font-family: 'FontAwesome-fallback';
    src: local('Font Awesome 6 Free'), local('FontAwesome'), local('Font Awesome 5 Free');
    font-weight: 300 900;
    font-display: swap;
}

/* Load Google Fonts with fallback */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --sidebar-width: 280px;
    --nav-height: 64px;
}

body {
    font-family: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* FontAwesome offline fallbacks - only show when FontAwesome fails to load */
@supports not (font-family: "Font Awesome 6 Free") {
    .fa-pills::before, .fas.fa-pills::before { content: "💊"; }
    .fa-search::before, .fas.fa-search::before { content: "🔍"; }
    .fa-calculator::before, .fas.fa-calculator::before { content: "🧮"; }
    .fa-mortar-pestle::before, .fas.fa-mortar-pestle::before { content: "⚗️"; }
    .fa-notes-medical::before, .fas.fa-notes-medical::before { content: "📋"; }
    .fa-prescription-bottle::before, .fas.fa-prescription-bottle::before { content: "💊"; }
    .fa-user::before, .fas.fa-user::before { content: "👤"; }
    .fa-heart::before, .fas.fa-heart::before, .far.fa-heart::before { content: "♡"; }
    .fa-star::before, .fas.fa-star::before { content: "⭐"; }
    .fa-times::before, .fas.fa-times::before { content: "✕"; }
    .fa-check::before, .fas.fa-check::before { content: "✓"; }
    .fa-info::before, .fas.fa-info::before { content: "ℹ️"; }
    .fa-warning::before, .fas.fa-warning::before { content: "⚠️"; }
    .fa-bars::before, .fas.fa-bars::before { content: "☰"; }
    .fa-tag::before, .fas.fa-tag::before { content: "🏷️"; }
    .fa-list::before, .fas.fa-list::before { content: "📝"; }
}

/* User actions styling */
.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.change-password-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 5px;
}

.change-password-btn:hover {
    background: rgba(255,255,255,0.3);
}

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

/* Change Password Modal specific styling */
#changePasswordModal .modal-content {
    background: white;
    color: #1f2937;
}

#changePasswordModal .modal-header h3 {
    color: #1f2937;
}

#changePasswordModal .form-group {
    margin-bottom: 1rem;
}

#changePasswordModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

#changePasswordModal .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-dark);
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

#changePasswordModal .form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#changePasswordModal .modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

#changePasswordModal .btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

#changePasswordModal .btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

#changePasswordModal .btn-primary {
    background: var(--primary-color);
    color: #282c33;
    border: 1px solid var(--primary-color);
}

#changePasswordModal .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Modal notification styling */
.modal-notification {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    animation: slideInDown 0.3s ease-out;
}

.modal-notification.success {
    background-color: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.modal-notification.error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.modal-notification.info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-icon {
    font-size: 1rem;
}

.notification-message {
    flex: 1;
    font-weight: 500;
}

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

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

/* Favorite button styling */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.6);
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.favorite-btn.favorited {
    color: #ef4444;
}

.favorite-btn.favorited:hover {
    color: #dc2626;
}

/* Expired membership styles */
.drug-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f1f5f9;
}

.drug-item.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

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

.expired-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: #fef2f2;
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
}

/* Clinical Info Balloon */
.clinical-info-balloon {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.dose-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.info-text {
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
    margin-top: 2px;
}

/* User info badge styles */
.user-info-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    margin: 10px;
    border-radius: 12px;
    font-size: 0.85em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-info-badge .user-email {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.user-info-badge .membership-status {
    margin-bottom: 3px;
    font-size: 0.8em;
}

.user-info-badge .membership-status.active {
    color: #90EE90;
}

.user-info-badge .membership-status.expired {
    color: #FFB6C1;
}

.user-info-badge .membership-expiry {
    font-size: 0.75em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.user-info-badge .logout-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    cursor: pointer;
    transition: background 0.3s;
}

.user-info-badge .logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Membership expired UI */
.membership-expired {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.membership-expired .expired-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.membership-expired h2 {
    color: #dc3545;
    margin-bottom: 15px;
}

.membership-expired p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.membership-expired .btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.membership-expired .btn:hover {
    background: #0056b3;
}

/* Mobile responsive layout */
@media (max-width: 640px) {
    .clinical-info-balloon {
        margin-top: 6px;
        padding: 6px 8px;
    }
    
    .dose-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
        word-break: break-word;
        white-space: normal;
        line-height: 1.2;
    }
    
    .info-text {
        font-size: 0.65rem;
        line-height: 1.2;
    }
    
    .practical-recommendation {
        padding: 12px;
    }
    
    .calc-note {
        font-size: 0.7rem;
        line-height: 1.3;
        margin-top: 4px;
    }
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Announcement Card - positioned to avoid sidebar overlap */
.announcement-card {
    padding: 1rem 1.25rem;
    transition: margin-left 0.3s ease;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
    max-width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.5rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background-color: var(--background-color);
    color: var(--text-primary);
}

.menu-toggle.active {
    color: var(--primary-color);
    background-color: var(--background-color);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--nav-height));
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    z-index: 900;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-content {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-btn:hover {
    background-color: var(--background-color);
    color: var(--text-primary);
}

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

.nav-btn i {
    width: 1.25rem;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 0;
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

/* Pages */
.page {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    margin-bottom: 1rem;
}

.back-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.back-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.back-btn i {
    font-size: 1.1rem;
}

/* Search Section */
.search-section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--background-color);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: all 0.2s ease;
}

.clear-search.visible {
    opacity: 1;
}

.clear-search:hover {
    background-color: var(--background-color);
    color: var(--text-primary);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Clear Filter Button */
.clear-filter-container {
    margin: 1rem 0;
    text-align: center;
}

.clear-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filter-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.clear-filter-btn i {
    font-size: 1rem;
}

/* Filter Lists */
.filter-lists {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-list {
    display: none;
}

.filter-list.active {
    display: block;
}

.filter-list h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Filter Search */
.filter-search {
    position: relative;
    margin-bottom: 1rem;
}

.filter-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-background);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.filter-search-input::placeholder {
    color: var(--text-secondary);
}

.filter-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}


.filter-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.filter-item {
    padding: 0.75rem 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.filter-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Drug Results */
.drug-results {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.results-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
}

.results-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.drug-list {
    max-height: 600px;
    overflow-y: auto;
}

.drug-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--surface-color);
}

.drug-item:hover {
    background-color: var(--background-color);
}

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

.drug-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.drug-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drug-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.drug-category, .drug-composition, .drug-sediaan {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.drug-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorite-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background-color: var(--background-color);
}

.favorite-btn.active {
    color: var(--danger-color);
}

/* Drug Detail */
.drug-detail-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.detail-header {
    padding: 1.5rem;
    background: var(--primary-color);
    color: white;
}

.detail-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.detail-body {
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section h3 i {
    color: var(--primary-color);
}

/* Weight Input */
.weight-input-section {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.weight-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.weight-input {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.weight-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.calculate-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calculate-btn:hover {
    background: var(--primary-dark);
}

.calculate-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

/* Recommendation */
.recommendation {
    background: var(--success-color);
    color: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.recommendation h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dose-info {
    font-size: 1rem;
    line-height: 1.5;
}

.dose-warning {
    background: var(--warning-color);
    color: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Detail Info Grid */
.detail-info {
    display: grid;
    gap: 1.5rem;
}

.info-item {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

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

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 9999;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}


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

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Skeleton Loading */
.skeleton-container {
    width: 100%;
    max-width: 600px;
}

.skeleton-item {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.skeleton-header {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
    width: 60%;
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Puyer Section */
.puyer-section {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.puyer-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.puyer-input-section {
    margin-bottom: 1.5rem;
}

.puyer-input-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.puyer-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.puyer-quantity-input {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.puyer-quantity-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.puyer-quantity-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.calculate-puyer-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculate-puyer-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Puyer Preparation Select */
.puyer-prep-select {
    margin: 1rem 0;
}

.puyer-prep-select label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.puyer-preparation-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.puyer-preparation-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.puyer-preparation-select option {
    background: var(--text-primary);
    color: white;
    padding: 0.5rem;
}

/* Puyer Dose Range Select (consistent with preparation select) */
.puyer-dose-select {
    margin: 1rem 0;
}

.puyer-dose-select label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.puyer-dose-select-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.puyer-dose-select-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.puyer-dose-select-control option {
    background: var(--text-primary);
    color: white;
    padding: 0.5rem;
}

/* Tooltip styles for dose range info */
.tooltip-button {
    margin-left: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.tooltip-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.tooltip-box {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left-width: 4px;
    border-left-color: var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* Tooltip animation states */
.tooltip-box.show {
    animation: slideInDown 0.25s ease-out;
}

.tooltip-box.hide {
    animation: fadeOut 0.2s ease-in;
}

/* Puyer Type Selection */
.puyer-type-selection {
    margin: 1.5rem 0;
}

.puyer-type-selection p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-content {
    flex: 1;
}

.radio-content strong {
    display: block;
    color: white;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.radio-content small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
}

.puyer-button-group {
    margin-top: 1.5rem;
}

/* Puyer Prescription Results */
.puyer-prescription {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.puyer-result-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.puyer-summary, .puyer-calculations, .puyer-instructions, .calculation-section, .instruction-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.puyer-summary h6, .puyer-calculations h6, .puyer-instructions h6, .calculation-section h6, .instruction-section h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.puyer-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.puyer-summary-item:last-child {
    margin-bottom: 0;
}

.calculation-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.calc-item.total {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.puyer-instructions .instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.puyer-instructions .instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.puyer-instructions .step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.puyer-instructions .step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.puyer-instructions .step-content strong {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.puyer-instructions .step-content span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Calculator Page Styles */
.calculator-content {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-card h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.calc-btn {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.calc-result {
    margin-top: 2rem;
}

.calc-result-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calc-result-content h4 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.calc-item.highlight {
    background: rgba(255, 255, 255, 0.05);
    margin: 0 -1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.calc-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.calc-value {
    color: white;
    font-weight: 600;
}

/* Puyer Page Styles */
.puyer-content {
    max-width: 800px;
    margin: 0 auto;
}

.puyer-info-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.puyer-info-card h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.puyer-info-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.puyer-types {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.puyer-type {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.puyer-type h4 {
    color: white;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.puyer-type p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.example {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.example strong {
    color: white;
}

.example em {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.puyer-guide {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.puyer-guide h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.puyer-guide ol {
    color: rgba(255, 255, 255, 0.9);
    padding-left: 1.5rem;
}

.puyer-guide li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* About Page */
.about-content {
    max-width: 800px;
}

.about-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.about-card ul, .about-card ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-card li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.disclaimer {
    background: var(--warning-color);
    color: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
}

.disclaimer h4 {
    color: white;
    margin-top: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--background-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--background-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 800;
}

.overlay.active {
    display: block;
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .announcement-card {
        margin-left: 0;
        margin-right: 0;
        padding: 0.75rem 1rem;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .search-section {
        padding: 1rem;
    }

    .filter-tabs {
        justify-content: center;
    }

    .filter-tab {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    .filter-items {
        grid-template-columns: 1fr;
    }

    .drug-item {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .drug-actions {
        align-self: flex-end;
    }

    .drug-meta {
        gap: 0.75rem;
    }

    .detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .weight-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .weight-input {
        min-width: auto;
    }

    .about-card {
        padding: 1.5rem;
    }

    .modal-content {
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }

    .search-section {
        padding: 0.75rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .filter-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .drug-item {
        padding: 0.75rem;
    }

    .detail-header,
    .detail-body {
        padding: 1rem;
    }

    .weight-input-section {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .top-nav,
    .sidebar,
    .menu-toggle,
    .overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .page {
        display: block !important;
    }

    .page:not(.active) {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
        --background-color: #ffffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* TPM page uses puyer-style inputs for consistency */
#tpmPage .detail-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Shared badge styling */
.beta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.beta-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.nav-btn .beta-badge {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff512f 0%, #dd2476 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(221, 36, 118, 0.45), 0 0 0 2px rgba(255,255,255,0.08) inset;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
    letter-spacing: 0.06em;
    animation: betaPulse 2.4s ease-in-out infinite;
}

/* Stronger emphasis when the nav button is hovered/active */
.nav-btn:hover .beta-badge,
.nav-btn.active .beta-badge {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 18px rgba(221, 36, 118, 0.55), 0 0 0 2px rgba(255,255,255,0.12) inset;
}

@keyframes betaPulse {
  0% { box-shadow: 0 4px 14px rgba(221, 36, 118, 0.35), 0 0 0 0 rgba(221,36,118,0.0); }
  50% { box-shadow: 0 8px 22px rgba(221, 36, 118, 0.6), 0 0 0 6px rgba(221,36,118,0.15); }
  100% { box-shadow: 0 4px 14px rgba(221, 36, 118, 0.35), 0 0 0 0 rgba(221,36,118,0.0); }
}

#tpmPage .detail-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Burn page reuses the same visual language as TPM */
#burnPage .detail-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#burnPage .detail-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#burnPage .detail-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

#tpmPage .detail-section:last-child {
    margin-bottom: 0;
}

#tpmPage .puyer-input-section label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

#tpmPage h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#burnPage h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.recommendation h3 {
    color: #ffffff !important;
}

#burnPage .detail-section,
#burnPage .detail-section * {
    color: #ffffff !important;
}

#burnPage .detail-section label,
#burnPage .detail-section p,
#burnPage .detail-section strong,
#burnPage .detail-section span {
    color: #ffffff !important;
}

#tpmPage h3 i {
    color: rgba(255, 255, 255, 0.8);
}

#burnPage h3 i {
    color: rgba(255, 255, 255, 0.8);
}

#tpmPage .info-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

#burnPage .info-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

#tpmPage .info-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

#burnPage .info-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

#tpmPage .info-item strong {
    color: white;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

#burnPage .info-item strong {
    color: white;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

#tpmPage .info-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
}

#burnPage .info-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
}

/* Burn Calculator - Keep existing gradient style but fix overrides */
#burnPage .detail-header {
    background-color: var(--primary-color) !important;
    text-align: left;
    padding: 1.5rem;
    border-bottom: none;
    margin-bottom: 0;
}

#burnPage .detail-header h2 {
    color: #ffffff !important;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#burnPage .detail-meta {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.875rem;
}

#burnPage .detail-meta span {
    color: rgba(255, 255, 255, 0.9) !important;
}

.canvas-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .canvas-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

.canvas-wrapper {
    text-align: center;
}


.canvas-label {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

#frontCanvas,
#backCanvas {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: crosshair;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#frontCanvas:hover,
#backCanvas:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Info Box Style - matches gradient theme */
.info-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid rgba(144, 238, 144, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.info-box p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-box strong {
    color: #ffffff;
    font-weight: 700;
}

/* Controls styling - matches gradient theme */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.brush-size {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brush-size label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

input[type="range"] {
    width: 120px;
    cursor: pointer;
}

.brush-value {
    font-weight: bold;
    color: #90EE90;
    min-width: 35px;
    font-size: 0.9rem;
}

/* Button styling - enhanced gradients */
#burnPage button {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#burnPage button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.btn-reset {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-clear-region {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    font-size: 0.85rem;
    padding: 8px 16px;
}

.calculate-puyer-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    color: white !important;
}



#burnPage .info-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

@media (min-width: 1024px) {
    #burnPage .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

#burnPage .puyer-input-section {
    margin-bottom: 1rem;
}

#burnPage .puyer-input-section label {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

#burnPage .puyer-quantity-input,
#burnPage input[type="number"],
#burnPage input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

#burnPage .puyer-quantity-input:focus,
#burnPage input[type="number"]:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#burnPage .puyer-quantity-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#burnPage .calculate-puyer-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#burnPage .calculate-puyer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

#burnPage .calculate-puyer-btn:active {
    transform: translateY(0);
}

.brush-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#burnPage .instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

#burnPage .instruction-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    border-left: 4px solid rgba(102, 126, 234, 0.6);
    transition: all 0.2s ease;
}

#burnPage .instruction-step:hover {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(102, 126, 234, 0.9);
    transform: translateX(4px);
}

#burnPage .instruction-step .step-number {
    font-weight: 800;
    color: white;
    font-variant-numeric: tabular-nums;
    min-width: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
}

#burnPage .instruction-step .step-icon {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    width: 1.5rem;
    text-align: center;
}

#burnPage .instruction-step .step-text {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    font-size: 0.9rem;
}

#burnPage .instruction-step .step-text strong {
    color: white;
    font-weight: 700;
}

/* Burn Calculator Accordion Styles - Modern Premium Design */
.burn-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.burn-accordion {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(118, 75, 162, 0.12) 50%,
        rgba(144, 238, 144, 0.08) 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
}

.burn-accordion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.5) 0%,
        rgba(144, 238, 144, 0.5) 50%,
        rgba(118, 75, 162, 0.5) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.burn-accordion:hover {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.2) 0%, 
        rgba(118, 75, 162, 0.18) 50%,
        rgba(144, 238, 144, 0.15) 100%);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.burn-accordion:hover::before {
    opacity: 1;
}

.burn-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.08) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.burn-accordion-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        #667eea 0%, 
        #90EE90 50%,
        #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.7), 0 0 40px rgba(144, 238, 144, 0.4);
}

.burn-accordion-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    transition: left 0.7s ease;
}

.burn-accordion-header:hover::after {
    left: 100%;
}

.burn-accordion-header:hover::before,
.burn-accordion-header.active::before {
    transform: scaleY(1);
}

.burn-accordion-header:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.12) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.burn-accordion-header.active {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.25) 0%,
        rgba(144, 238, 144, 0.2) 100%);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.accordion-title i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #90EE90 50%,
        #764ba2 100%);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.4),
        0 0 20px rgba(144, 238, 144, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(102, 126, 234, 0.4),
            0 0 20px rgba(144, 238, 144, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 4px 12px rgba(102, 126, 234, 0.6),
            0 0 30px rgba(144, 238, 144, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

.burn-accordion-header:hover .accordion-title i {
    transform: scale(1.1) rotate(5deg);
    animation: none;
}

.accordion-icon {
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 1.1rem;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.burn-accordion-header:hover .accordion-icon {
    opacity: 1;
    transform: scale(1.15);
}

.burn-accordion-header.active .accordion-icon {
    transform: rotate(180deg) scale(1.1);
    color: #90EE90;
    filter: drop-shadow(0 0 8px rgba(144, 238, 144, 0.6));
}

.burn-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.burn-accordion-content[style*="display: block"] {
    max-height: 500px;
}

.accordion-inner {
    padding: 1.5rem 1.75rem 1.75rem;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.08) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compact-step {
    padding: 0.75rem 0;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.compact-step:hover {
    padding-left: 0.5rem;
    color: #90EE90;
}

.compact-step:last-child {
    border-bottom: none;
}

.compact-step strong {
    display: inline-block;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    color: #ffffff;
    margin-right: 0.75rem;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.compact-item {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.compact-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(144, 238, 144, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.compact-item strong {
    color: #90EE90;
    font-weight: 700;
}

.compact-note {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(144, 238, 144, 0.15) 0%, rgba(102, 126, 234, 0.15) 100%);
    border-left: 4px solid #90EE90;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.compact-note i {
    color: #90EE90;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Responsive for burn calculator */
@media (max-width: 768px) {
    .canvas-container {
        gap: 16px;
    }
    
    .canvas-wrapper {
        padding: 0.75rem;
    }
    
    #frontCanvas,
    #backCanvas {
        max-width: 100%;
        height: auto;
    }
    
    #burnPage .instruction-step {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .compact-grid {
        grid-template-columns: 1fr;
    }
    
    .burn-accordion-header {
        padding: 0.75rem 1rem;
    }
    
    .accordion-title {
        font-size: 0.875rem;
    }
}

#tpmPage .holiday-segar-info {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#tpmPage .holiday-segar-info h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: white;
    font-weight: 600;
}

#tpmPage .holiday-segar-info ul {
    padding-left: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
}

#tpmPage .holiday-segar-info li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

#tpmPage .holiday-segar-info li strong {
    color: white;
}

/* TPM calculate button uses puyer style */
#tpmPage .calculate-puyer-btn {
    margin-top: 1rem;
}

/* TPM inline instruction step styling */
#tpmPage .instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

#tpmPage .instruction-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border-left: 4px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, border-left-color 0.2s ease;
}

#tpmPage .instruction-step:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.45);
    transform: translateX(2px);
}

#tpmPage .instruction-step .step-number {
    font-weight: 700;
    color: white;
    font-variant-numeric: tabular-nums;
    min-width: 1.5rem;
    text-align: right;
    margin-right: 0.25rem;
}

#tpmPage .instruction-step .step-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    width: 1.25rem;
    text-align: center;
}

#tpmPage .instruction-step .step-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

#tpmPage .instruction-step .step-text strong {
    color: white;
    font-weight: 600;
}

/* Mobile tweaks for inline steps */
@media (max-width: 768px) {
    #tpmPage .instruction-step {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    #tpmPage .instruction-step .step-number {
        min-width: 1.25rem;
    }
    #tpmPage .instruction-step .step-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #tpmPage .instruction-steps { gap: 0.5rem; }
    #tpmPage .instruction-step { padding: 0.6rem 0.75rem; }
    #tpmPage .instruction-step .step-text { font-size: 0.85rem; }
}

/* Info grid reused in TPM page */
.info-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Mobile responsive styling for TPM instructions */
@media (max-width: 768px) {
    #tpmPage .instruction-step {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    #tpmPage .step-number {
        align-self: flex-start;
        margin-top: 0;
    }
    
    #tpmPage .step-content span {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    #tpmPage .instruction-steps {
        gap: 0.75rem;
    }
    
    #tpmPage .instruction-step {
        padding: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    #tpmPage .step-content strong {
        font-size: 0.9rem;
    }
    
    #tpmPage .step-content span {
        font-size: 0.8rem;
    }
}

/* TBSA component styles are now provided inline by burn-calculator.js to match the provided HTML sample. */
