/* ----------------------------------------------------
   DESIGN SYSTEM & VARIABLES
---------------------------------------------------- */
:root {
    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Theme-specific variables (Dark Mode default) */
    --bg-app: #090D16;
    --bg-card: rgba(17, 24, 39, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Elegant Accents */
    --rose-gold: #D4A38E;
    --rose-gold-glow: rgba(212, 163, 142, 0.15);
    --gold: #E2B86E;
    --gold-glow: rgba(226, 184, 110, 0.15);
    --accent-gradient: linear-gradient(135deg, #D4A38E 0%, #E2B86E 100%);
    --card-gradient: linear-gradient(135deg, rgba(212, 163, 142, 0.05) 0%, rgba(226, 184, 110, 0.02) 100%);

    /* Utility Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --alert: #F43F5E;
    --alert-bg: rgba(244, 63, 94, 0.1);
    --info-bg: rgba(59, 130, 246, 0.1);
    
    /* Shadows */
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px 2px rgba(212, 163, 142, 0.12);
}

/* Light Theme overrides */
body.light-mode {
    --bg-app: #FAF9F6; /* Soft Clinic Champagne/Off-white */
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(183, 135, 115, 0.15);
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    --rose-gold: #B87E66;
    --rose-gold-glow: rgba(184, 126, 102, 0.1);
    --gold: #C2984A;
    --gold-glow: rgba(194, 152, 74, 0.1);
    --accent-gradient: linear-gradient(135deg, #B87E66 0%, #C2984A 100%);
    --card-gradient: linear-gradient(135deg, rgba(184, 126, 102, 0.03) 0%, rgba(194, 152, 74, 0.01) 100%);
    
    --shadow-soft: 0 10px 30px -10px rgba(183, 135, 115, 0.15);
    --shadow-glow: 0 0 20px 2px rgba(184, 126, 102, 0.08);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem 1.5rem;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient Glow Blobs in Background */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.06;
    pointer-events: none;
    z-index: -1;
    transition: var(--transition-smooth);
}
.glow-bg-1 {
    top: -100px;
    right: -100px;
    background: var(--rose-gold);
}
.glow-bg-2 {
    bottom: -100px;
    left: -100px;
    background: var(--gold);
}
body.light-mode .glow-bg {
    opacity: 0.12;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Helper styles */
.hidden {
    display: none !important;
}
.margin-top-1 {
    margin-top: 1rem;
}
.margin-top-2 {
    margin-top: 2rem;
}
.text-gold {
    color: var(--gold) !important;
}
.text-accent {
    color: var(--rose-gold) !important;
}
.text-success {
    color: var(--success) !important;
}

/* ----------------------------------------------------
   AUTHENTICATION UI
---------------------------------------------------- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    padding: 1rem;
    z-index: 10;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 460px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.auth-header {
    text-align: center;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}
.auth-tab:hover {
    color: var(--text-primary);
}
.auth-tab.active {
    color: var(--rose-gold);
    border-bottom-color: var(--rose-gold);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}
body.light-mode .auth-form input[type="password"] {
    background: rgba(0, 0, 0, 0.02);
}
.auth-form input[type="password"]:focus {
    border-color: var(--rose-gold);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(212, 163, 142, 0.15);
}
body.light-mode .auth-form input[type="password"]:focus {
    background: #FFF;
}

/* Header User Profile Widget */
.profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--rose-gold-glow);
    border: 1px solid rgba(212, 163, 142, 0.25);
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
    font-size: 0.85rem;
}

.user-greeting {
    color: var(--text-primary);
}

.btn-logout-style {
    background: none;
    border: none;
    color: var(--alert);
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: var(--transition-fast);
}
.btn-logout-style:hover {
    text-decoration: underline;
}

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

.brand-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--rose-gold-glow);
    border: 1px solid rgba(212, 163, 142, 0.3);
    color: var(--rose-gold);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.app-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.accent-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.app-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Theme Toggle Button */
.btn-icon {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}
.btn-icon:hover {
    transform: translateY(-2px);
    border-color: var(--rose-gold);
    box-shadow: 0 0 15px rgba(212, 163, 142, 0.2);
}
.sun-icon { display: none; width: 20px; height: 20px; }
.moon-icon { display: block; width: 20px; height: 20px; }

body.light-mode .sun-icon { display: block; }
body.light-mode .moon-icon { display: none; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* ----------------------------------------------------
   LAYOUT GRID
---------------------------------------------------- */
.main-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

.column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ----------------------------------------------------
   CARDS & CONTAINERS
---------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    z-index: 2; /* Ensure cards have clear stack hierarchy */
}
.card:hover {
    box-shadow: var(--shadow-glow);
    border-color: rgba(212, 163, 142, 0.25);
}

/* Card Header */
.card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.card-icon {
    width: 42px;
    height: 42px;
    background: var(--rose-gold-glow);
    border: 1px solid rgba(212, 163, 142, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rose-gold);
    flex-shrink: 0;
}
.card-icon svg {
    width: 20px;
    height: 20px;
}
.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* Card Body */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ----------------------------------------------------
   INPUTS & FORM CONTROLS
---------------------------------------------------- */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

.input-grid-sub {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0.75rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}
body.light-mode input[type="text"],
body.light-mode input[type="number"],
body.light-mode select {
    background: rgba(0, 0, 0, 0.02);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: var(--rose-gold);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(212, 163, 142, 0.15);
}
body.light-mode input[type="text"]:focus,
body.light-mode input[type="number"]:focus,
body.light-mode select:focus {
    background: #FFF;
}

/* Input with symbols/prefixes */
.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-symbol .currency-symbol {
    position: absolute;
    left: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none; /* Make click go through to input */
}
.input-with-symbol .unit-symbol {
    position: absolute;
    right: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}
.input-with-symbol input {
    padding-left: 3.2rem !important; /* Generate generous padding to NEVER overlap R$ */
    padding-right: 1rem;
}
.input-with-symbol input[type="number"]:has(+ .unit-symbol),
.input-with-symbol input#input-working-hours,
.input-with-symbol input#input-proc-duration,
.input-with-symbol input#input-margin,
.input-with-symbol input#input-tax,
.input-with-symbol input#input-card-fee {
    padding-left: 1rem !important; /* Reset left padding for unit-based inputs */
    padding-right: 3rem;
}

.input-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sections inside procedure card */
.product-cost-block,
.disposables-block {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.block-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rose-gold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.mini-calc-info {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}
body.light-mode .mini-calc-info {
    background: rgba(0, 0, 0, 0.01);
}

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

/* Detailed Disposables (Spreadsheet style) */
.materials-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.15);
}
body.light-mode .materials-list {
    background: rgba(0, 0, 0, 0.02);
}

.material-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
body.light-mode .material-row {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}
.material-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.material-row input.mat-name {
    flex: 2.2;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

.material-row .mat-price-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.material-row .mat-price-wrapper::before {
    content: 'R$';
    position: absolute;
    left: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}
.material-row input.mat-price {
    padding: 0.4rem 0.5rem 0.4rem 1.8rem;
    font-size: 0.85rem;
    text-align: right;
}

.material-row input.mat-qty {
    width: 45px;
    padding: 0.4rem 0.3rem;
    font-size: 0.85rem;
    text-align: center;
}

.material-row .mat-cost {
    min-width: 65px;
    text-align: right;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.detailed-total {
    text-align: right;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    color: var(--text-primary);
}

/* ----------------------------------------------------
   RESULTS & SUGESTED PRICE (DASHBOARD)
---------------------------------------------------- */
.result-card {
    background: var(--card-gradient), var(--bg-card);
    /* Desativado z-index e position sticky para evitar sobreposição ao rolar a página */
    position: static; 
}

.glow-card {
    box-shadow: var(--shadow-glow);
    border-color: rgba(212, 163, 142, 0.35);
}

.result-badge {
    background: var(--rose-gold-glow);
    color: var(--rose-gold);
    border: 1px solid rgba(212, 163, 142, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.price-main-display {
    text-align: center;
    padding: 1rem 0 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.price-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.price-value-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin: 0.5rem 0;
}

.price-symbol {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--rose-gold);
    margin-right: 0.25rem;
}

.price-number {
    font-family: var(--font-heading);
    font-size: 3.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 10px rgba(212, 163, 142, 0.1);
    }
    100% {
        text-shadow: 0 0 25px rgba(212, 163, 142, 0.3);
    }
}

.price-explanation {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Secondary Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
body.light-mode .result-box {
    background: rgba(0, 0, 0, 0.01);
}

.result-box.profit {
    border-color: rgba(16, 185, 129, 0.3);
    background: var(--success-bg);
}
.result-box.cost {
    grid-column: span 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.box-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

.box-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0.2rem;
}
.result-box.profit .box-value {
    color: var(--success);
}

.box-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Chart Canvas styling */
.chart-container {
    height: 150px;
    position: relative;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* Breakdown List */
.breakdown-details {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}
.details-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.details-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.details-list li {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.details-list li span:nth-child(2) {
    flex-grow: 1;
}
.bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    display: inline-block;
}
.total-row {
    border-top: 1px dashed var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    font-weight: 600;
    color: var(--text-primary) !important;
}

/* ----------------------------------------------------
   CLINIC HOUR SUMMARIES
---------------------------------------------------- */
.clinic-hour-result {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.25rem;
    background: rgba(212, 163, 142, 0.05);
    border: 1px solid rgba(212, 163, 142, 0.15);
    padding: 1rem;
    border-radius: 12px;
}
.result-item-mini {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mini-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}
.mini-value {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rose-gold);
    margin-top: 0.15rem;
}
.mini-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.result-box-mini {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}
body.light-mode .result-box-mini {
    background: rgba(0, 0, 0, 0.01);
}

.break-even-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--info-bg);
    border: 1px solid rgba(59, 130, 246, 0.15);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* ----------------------------------------------------
   SYRINGE VISUALIZER & RECONSTITUTION HELPER
---------------------------------------------------- */
.reconstitution-visualizer {
    display: flex;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 15px;
    align-items: center;
    margin-top: 0.5rem;
}
body.light-mode .reconstitution-visualizer {
    background: rgba(0, 0, 0, 0.02);
}
@media (max-width: 500px) {
    .reconstitution-visualizer {
        flex-direction: column;
        align-items: stretch;
    }
}

.syringe-graphic-container {
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
@media (max-width: 500px) {
    .syringe-graphic-container {
        width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: center;
    }
}

.syringe-nozzle {
    width: 8px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 3px 3px 0 0;
}
.syringe-body {
    width: 22px;
    height: 140px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #94A3B8;
    border-radius: 0 0 5px 5px;
    position: relative;
    display: flex;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}
.syringe-fluid {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    top: 15px;
    background: rgba(212, 163, 142, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition-smooth);
}
.syringe-plunger {
    position: absolute;
    bottom: 0;
    width: 12px;
    height: 40px;
    background: #475569;
    border: 1px solid #64748B;
    border-radius: 2px;
    z-index: 2;
}
.syringe-plunger::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -4px;
    width: 18px;
    height: 15px;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 3px;
}

.syringe-ticks {
    position: absolute;
    left: 2px;
    right: 2px;
    top: 5px;
    bottom: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 3;
}
.tick {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    width: 6px;
    position: relative;
}
.big-tick {
    width: 12px;
    background: rgba(255, 255, 255, 0.7);
}
.big-tick span {
    position: absolute;
    right: -10px;
    top: -5px;
    font-size: 7px;
    color: #94A3B8;
    font-weight: bold;
}

/* Reconstitution text results */
.reconstitution-result-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.reconstitution-result-item {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}
.dilution-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.dilution-value {
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.15rem;
}
.highlight-box {
    background: rgba(212, 163, 142, 0.08);
    border-left: 3px solid var(--rose-gold);
    padding: 0.5rem 0.75rem;
    border-radius: 0 8px 8px 0;
}

/* ----------------------------------------------------
   BUTTONS
---------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    outline: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 163, 142, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 163, 142, 0.35);
    filter: brightness(1.05);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
body.light-mode .btn-secondary {
    background: #FFF;
    border-color: var(--border-color);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--rose-gold);
    background: rgba(255, 255, 255, 0.06);
}

.btn-text {
    background: none;
    border: none;
    color: var(--rose-gold);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    transition: var(--transition-fast);
}
.btn-text:hover {
    background: var(--rose-gold-glow);
}

.btn-danger-text {
    background: none;
    border: none;
    color: var(--alert);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}
.btn-danger-text:hover {
    background: var(--alert-bg);
}

.btn-delete {
    background: none;
    border: none;
    color: var(--alert);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 5px;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-delete:hover {
    background: var(--alert-bg);
}
.btn-delete svg {
    width: 16px;
    height: 16px;
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (max-width: 500px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------
   SAVED PROCEDURES TABLE
---------------------------------------------------- */
.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex-title {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.saved-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.saved-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1.5px solid var(--border-color);
}
body.light-mode .saved-table th {
    background: rgba(0, 0, 0, 0.03);
}

.saved-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.saved-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}
body.light-mode .saved-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.005);
}

.empty-row {
    text-align: center;
    color: var(--text-muted) !important;
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.app-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

/* ----------------------------------------------------
   TOAST NOTIFICATIONS
---------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1E293B;
    border: 1px solid var(--rose-gold);
    color: #FFF;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), var(--shadow-glow);
    z-index: 9999;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    transform: translateY(0);
    opacity: 1;
}
body.light-mode .toast {
    background: #FFF;
    color: #1E293B;
}

.toast.hidden {
    transform: translateY(50px);
    opacity: 0;
    pointer-events: none;
}
