/* Špekonaut - Custom RPG Styles with Updated Color Palette */

/* Color Palette:
   #8B1538 - Saddle Brown (nadpisy, tlačítka, důležité texty)
   #D4A574 - Tan/Sand (sekundární pozadí, boxy)
   #5C4033 - Dark Coffee (hlavní text, ikony)
   #E8D5B7 - Champagne/Béžová (světlé sekce, overlay)
   #2C5F2D - Sienna (odkazy hover, akcenty)
   #1B4965 - Deep Blue (odkazy)
*/

/* Links */
a {
    color: #1B4965;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2C5F2D;
    text-decoration: underline;
}

a:visited {
    color: #1B4965;
}

/* Breadcrumb navigation links */
#breadcrumbStep {
    color: #1B4965 !important;
}

#breadcrumbStep:hover {
    color: #2C5F2D !important;
}

/* Body with tiled background */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: url('../pics/900.jpg');
    background-repeat: repeat;
    background-size: 900px auto;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    color: #5C4033;
}

/* Page container */
.page-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Main container with glass-morphism effect */
.main-container {
    position: relative;
    background: rgba(232, 213, 183, 0.75) !important;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
    padding: 30px !important;
    box-shadow: 0 8px 32px 0 rgba(92, 64, 51, 0.4),
                0 0 60px rgba(92, 64, 51, 0.2),
                inset 0 0 40px rgba(255, 255, 255, 0.1);
    border: 3px solid #8B1538;
    border-radius: 20px;
}

/* Golden frame effect */
.main-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg,
        rgba(139, 69, 19, 0.4),
        rgba(212, 165, 116, 0.3),
        rgba(160, 82, 45, 0.4));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.6;
}

/* Logo */
.app-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(92, 64, 51, 0.3));
    position: relative;
    z-index: 10;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.app-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(3px 3px 6px rgba(92, 64, 51, 0.4));
}

.app-logo-small {
    max-width: 350px;
    margin: 0 auto;
}

.app-logo-container {
    position: relative;
    z-index: 5;
}

/* Main title (kept for backwards compatibility but hidden when logo is used) */
.main-title {
    text-align: left;
    color: #8B1538;
    font-size: 3.5em;
    text-shadow: 2px 2px 4px rgba(92, 64, 51, 0.3),
                 0 0 20px rgba(212, 165, 116, 0.4);
    margin: 0 0 10px 0;
    font-family: 'Cinzel Decorative', cursive;
    letter-spacing: 3px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #2C5F2D;
    font-size: 1.3em;
    margin: 0 0 30px 0;
    text-shadow: 1px 1px 2px rgba(92, 64, 51, 0.2);
    font-family: 'Inter', sans-serif;
}

/* RPGUI overrides for better visibility */
.rpgui-content {
    color: #5C4033;
}

.rpgui-container.framed,
.rpgui-container.framed-golden,
.rpgui-container.framed-grey {
    background-color: rgba(232, 213, 183, 0.6) !important;
    margin: 15px 0;
    border: 3px solid #8B1538 !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 15px rgba(92, 64, 51, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.3) !important;
    padding: 20px !important;
}

.rpgui-container h3,
.rpgui-container h4 {
    color: #8B1538;
    text-shadow: 1px 1px 2px rgba(232, 213, 183, 0.5);
    font-family: 'Cinzel Decorative', cursive;
}

.rpgui-container p {
    color: #5C4033;
    font-family: 'Inter', sans-serif;
}

/* Menu section */
.menu-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(212, 165, 116, 0.3);
    border: 3px solid #8B1538;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(92, 64, 51, 0.3);
}

.rpgui-button {
    min-width: 150px;
    transition: all 0.3s;
    background: #D4A574 !important;
    border: 3px solid #8B1538 !important;
    box-shadow: 0 2px 8px rgba(92, 64, 51, 0.2) !important;
    border-radius: 8px !important;
}

.rpgui-button:hover {
    transform: scale(1.05);
    background: #2C5F2D !important;
    border-color: #8B1538 !important;
    box-shadow: 0 4px 12px rgba(92, 64, 51, 0.4) !important;
}

.rpgui-button p {
    color: #5C4033;
    font-size: 1.1em;
    margin: 5px;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 700;
}

.rpgui-button:hover p {
    color: #E8D5B7;
}

/* Active menu button */
.rpgui-button.active-menu {
    background: #8B1538 !important;
    border-color: #2C5F2D !important;
    box-shadow: 0 4px 16px rgba(139, 21, 56, 0.6) !important;
    transform: scale(1.05);
}

.rpgui-button.active-menu p {
    color: #E8D5B7;
    font-weight: 900;
}

/* Content sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background-color: #E8D5B7 !important;
    border: 2px solid #8B1538;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(92, 64, 51, 0.2);
}

.stat-box h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #8B1538;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #8B1538 !important;
    text-shadow: 1px 1px 2px rgba(232, 213, 183, 0.5);
    margin: 10px 0;
    font-family: 'Cinzel Decorative', cursive;
}

.stat-label {
    font-size: 0.9em;
    color: #2C5F2D !important;
    margin: 5px 0 0 0;
}

/* Chart container */
.chart-container {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #D4A574;
    box-shadow: inset 0 0 10px rgba(92, 64, 51, 0.1);
}

/* Form styles */
.form-group {
    margin: 15px 0;
}

.form-group label {
    display: block;
    color: #8B1538;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="file"] {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    border: 2px solid #D4A574;
}

.rpgui-dropdown {
    width: 100%;
    max-width: 300px;
    background: #E8D5B7 !important;
    border: 2px solid #8B1538 !important;
    color: #5C4033 !important;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #8B1538;
    color: #2C5F2D;
    font-size: 0.9em;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .menu-section {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2em;
    }

    /* Fix header overlap on mobile */
    .lang-switcher {
        position: relative;
        top: 0;
        right: 0;
        justify-content: flex-end;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }

    .user-menu-container {
        margin-right: 10px;
    }

    .user-menu-toggle,
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    /* Make logo smaller on mobile and add margin */
    .app-logo {
        max-width: 280px !important;
        margin-top: 0 !important;
    }

    /* Adjust logo container margin */
    .app-logo-container {
        margin: 0 0 15px 0 !important;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #E8D5B7;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B1538, #2C5F2D);
    border-radius: 10px;
    border: 2px solid #D4A574;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2C5F2D, #8B1538);
}

/* Login Page Styles */
.login-container {
    max-width: 450px !important;
    padding: 40px !important;
    background: rgba(232, 213, 183, 0.95) !important;
}

.login-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 2.5em;
    color: #8B1538;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(92, 64, 51, 0.2);
}

.login-form {
    margin: 20px 0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    color: #8B1538;
    margin-bottom: 8px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #D4A574;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #5C4033;
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    transition: all 0.3s;
    box-sizing: border-box;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #8B1538;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

.login-submit {
    width: 100%;
    margin-top: 10px;
}

.error-message {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.5);
    color: #FF6B6B;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
}

.user-menu-container {
    position: relative;
    margin-right: 15px;
}

.user-menu-toggle {
    background: #D4A574;
    border: 2px solid #8B1538;
    color: #5C4033;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

.user-menu-toggle:hover {
    background: #2C5F2D;
    border-color: #8B1538;
    color: #E8D5B7;
    box-shadow: 0 0 10px rgba(160, 82, 45, 0.3);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: rgba(232, 213, 183, 0.98);
    border: 3px solid #8B1538;
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(92, 64, 51, 0.4);
    z-index: 1000;
    padding: 10px 0;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-section {
    padding: 10px 0;
    border-bottom: 2px solid rgba(139, 69, 19, 0.2);
}

.user-dropdown-section:last-child {
    border-bottom: none;
}

.user-dropdown-title {
    color: #8B1538;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 0.95em;
    padding: 5px 15px;
    margin-bottom: 5px;
}

.user-dropdown-item {
    color: #5C4033;
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    padding: 8px 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-dropdown-item:hover {
    background: rgba(160, 82, 45, 0.2);
    color: #2C5F2D;
}

.lang-btn {
    background: #D4A574;
    border: 2px solid #8B1538;
    color: #5C4033;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: #2C5F2D;
    border-color: #8B1538;
    color: #E8D5B7;
    box-shadow: 0 0 10px rgba(160, 82, 45, 0.3);
}

.lang-btn.active {
    background: #8B1538;
    border-color: #2C5F2D;
    color: #E8D5B7;
    box-shadow: 0 0 15px rgba(139, 21, 56, 0.6);
    font-weight: 900;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 64, 51, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(232, 213, 183, 0.98);
    border: 3px solid #8B1538;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(92, 64, 51, 0.6);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #8B1538;
}

.modal-title {
    color: #8B1538;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.8em;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #2C5F2D;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #FF6B6B;
    transform: rotate(90deg);
}

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

.modal-form .form-group {
    margin: 0;
}

.modal-form label {
    color: #8B1538;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.modal-form input,
.modal-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #D4A574;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    color: #5C4033;
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s;
}

.modal-form input:focus,
.modal-form select:focus {
    outline: none;
    border-color: #8B1538;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

.modal-form .rpgui-button {
    width: 100%;
    margin-top: 10px;
}

.form-section {
    border-top: 2px solid rgba(139, 69, 19, 0.2);
    padding-top: 20px;
    margin-top: 10px;
}

.form-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.form-section-title {
    color: #8B1538;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* Data input method selection */
.input-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.input-method-card {
    background: rgba(232, 213, 183, 0.6);
    border: 3px solid #8B1538;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.input-method-card:hover {
    background: #D4A574;
    border-color: #2C5F2D;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(92, 64, 51, 0.3);
}

.method-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.input-method-card h5 {
    color: #8B1538;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.3em;
    margin: 15px 0 10px 0;
}

.input-method-card p {
    color: #5C4033;
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    margin: 0;
}

.data-step {
    margin: 20px 0;
}

.data-step h4 {
    color: #8B1538;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.5em;
    margin: 20px 0;
}

/* Manual entry form styles */
.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs input {
    flex: 1;
}

.range-inputs span {
    color: #8B1538;
    font-weight: bold;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.data-table th {
    background: #D4A574;
    color: #5C4033;
    font-family: 'Cinzel Decorative', cursive;
    padding: 12px;
    text-align: left;
    border: 2px solid #8B1538;
    font-weight: bold;
}

.data-table td {
    color: #5C4033;
    font-family: 'Inter', sans-serif;
    padding: 10px 12px;
    border: 1px solid #D4A574;
    background: rgba(255, 255, 255, 0.8);
}

.data-table tr:hover {
    background: rgba(212, 165, 116, 0.2);
}

.data-table tr:last-child td {
    border-bottom: 2px solid #8B1538;
}

input[type="text"]:disabled,
input[type="number"]:disabled {
    background: rgba(200, 200, 200, 0.4) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Required field indicator */
.required-field {
    color: #FF6B6B;
    font-weight: bold;
    margin-left: 3px;
}

label .required-field {
    display: inline;
}

/* HealthPlanet Import Progress */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: #E8D5B7;
    border: 2px solid #8B1538;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-label {
    display: block;
    color: #8B1538;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: #5C4033;
    font-family: 'Inter', sans-serif;
    font-size: 2em;
    font-weight: bold;
}

.progress-log {
    background: rgba(232, 213, 183, 0.4);
    border: 2px solid #8B1538;
    border-radius: 10px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.progress-log-entry {
    padding: 5px 0;
    color: #5C4033;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.progress-log-entry:last-child {
    border-bottom: none;
}

.progress-log-entry.status {
    color: #4682B4;
    font-weight: bold;
}

.progress-log-entry.imported {
    color: #228B22;
}

.progress-log-entry.skipped {
    color: #9370DB;
}

.progress-log-entry.error {
    color: #DC143C;
}

.progress-log-entry .timestamp {
    color: rgba(92, 64, 51, 0.6);
    margin-right: 10px;
}

/* Scrollbar styling for progress log */
.progress-log::-webkit-scrollbar {
    width: 8px;
}

.progress-log::-webkit-scrollbar-track {
    background: #E8D5B7;
    border-radius: 4px;
}

.progress-log::-webkit-scrollbar-thumb {
    background: #8B1538;
    border-radius: 4px;
}

.progress-log::-webkit-scrollbar-thumb:hover {
    background: #2C5F2D;
}

/* Weight data table */
.rpgui-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.rpgui-table th {
    background: #D4A574;
    color: #5C4033;
    font-weight: bold;
    padding: 12px 10px;
    text-align: left;
    border: 2px solid #8B1538;
    white-space: nowrap;
}

.rpgui-table td {
    padding: 10px;
    border: 1px solid #D4A574;
    background: #fff;
}

.rpgui-table tbody tr:nth-child(even) {
    background: #E8D5B7;
}

.rpgui-table tbody tr:hover {
    background: rgba(212, 165, 116, 0.3);
    cursor: pointer;
}

/* Sticky first column in table */
.rpgui-table th:first-child,
.rpgui-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 2px 0 4px rgba(92, 64, 51, 0.1);
}

/* ========================================
   Modal Dialogs for Metric Views
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

/* View card in manager */
.view-card {
    background: #E8D5B7;
    border: 2px solid #8B1538;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.view-card h4 {
    margin: 0 0 10px 0;
    color: #8B1538;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-card .view-badge {
    background: #2C5F2D;
    color: #FFF;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.view-card .view-metrics {
    color: #5C4033;
    font-size: 14px;
    margin: 10px 0;
    padding: 10px;
    background: #FFF;
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
}

.view-card .view-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Metric checkbox list */
.metric-checkbox-item {
    padding: 8px;
    border-bottom: 1px solid #D4A574;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-checkbox-item:hover {
    background: #F5EFE7;
}

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

.metric-checkbox-item label {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-category-header {
    background: #8B1538;
    color: #FFF;
    padding: 8px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Table edit mode styles */
.editable-cell {
    position: relative;
}

.editable-cell::before {
    content: '✎';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: #8B7355;
    opacity: 0.5;
}

/* Force text to be dark and visible in edit mode */

/* ========================================
   Lab Import Styles
   ======================================== */

/* Spinner animation */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF9800;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Data table in lab results preview */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table thead {
    background: #8B1538;
    color: #fff;
}

.data-table th {
    padding: 10px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #8B1538;
}

.data-table td {
    padding: 8px 10px;
    border: 1px solid #D4A574;
}

.data-table tbody tr:nth-child(even) {
    background: #F5EFE7;
}

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

/* Log entries */
.progress-log {
    background: #F5F5F5;
    border: 1px solid #DDD;
    border-radius: 4px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.log-entry {
    padding: 5px 10px;
    margin-bottom: 5px;
    border-left: 3px solid #666;
    background: white;
}

.log-entry.log-info {
    border-left-color: #2196F3;
    background: #E3F2FD;
}

.log-entry.log-success {
    border-left-color: #4CAF50;
    background: #E8F5E9;
}

.log-entry.log-error {
    border-left-color: #F44336;
    background: #FFEBEE;
}

.log-time {
    color: #666;
    font-size: 11px;
    margin-right: 10px;
}

/* Progress stats */
.progress-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-box {
    background: #FFF;
    border: 2px solid #D4A574;
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #8B1538;
}

/* Clickable stat box */
.stat-box-clickable {
    transition: all 0.3s ease;
}

.stat-box-clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: #8B1538 !important;
}

/* Lab Section Styles */
.lab-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.lab-metric-card {
    background: #f9f9f9;
    border: 2px solid #D4A574;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.lab-metric-card:hover {
    background: #E8D5B7;
    border-color: #8B1538;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.lab-metric-card.active {
    background: #D4A574;
    border-color: #8B1538;
    border-width: 3px;
}

.lab-metric-name {
    font-weight: bold;
    color: #5C4033;
    margin-bottom: 3px;
    font-size: 13px;
    line-height: 1.2;
}

.lab-metric-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.lab-metric-count {
    display: inline-block;
    background: #8B1538;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 5px;
}

.lab-category-header {
    grid-column: 1 / -1;
    font-weight: bold;
    color: #8B1538;
    font-size: 16px;
    margin-top: 10px;
    padding: 10px;
    background: #E8D5B7;
    border-radius: 4px;
}

.date-input {
    padding: 8px;
    border: 2px solid #D4A574;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
