﻿:root {
    --primary-color: #2e7d32;
    --primary-hover: #1b5e20;
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 10px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.brand-logo {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    transform: scale(1.4);
    margin: 10px 0;
}

.translation-widget {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}
.goog-te-gadget {
    color: transparent !important;
    font-size: 0px;
}
.goog-logo-link {
    display: none !important;
}
.goog-te-combo {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}
.goog-te-combo:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.sidebar-discord {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-discord a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #5865F2;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
}
.sidebar-discord a:hover {
    background-color: #4752C4;
}
.sidebar-discord a:active {
    transform: scale(0.98);
}
.sidebar-discord a.disabled {
    background-color: #99aab5;
    cursor: not-allowed;
    color: #ffffff;
}
.sidebar-discord a.disabled:hover {
    background-color: #99aab5;
    transform: none;
}
.sidebar-discord a.disabled:active {
    transform: none;
}

.skiptranslate iframe,
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0px !important;
    position: static !important;
}

#goog-gt-tt, 
.goog-te-balloon-frame, 
div[id^="goog-gt-"] {
    display: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

.sidebar-nav {
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .sidebar-nav a {
        padding: 12px 16px;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.2s;
    }

        .sidebar-nav a:hover {
            background-color: var(--bg-body);
            color: var(--text-main);
        }

        .sidebar-nav a.active {
            background-color: rgba(46, 125, 50, 0.1);
            color: var(--primary-color);
            font-weight: 600;
        }

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.container {
    padding: 40px 30px;
    max-width: 1000px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.4s ease-out forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

p.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    margin-top: 0;
}

.home-grid {
    display: flex;
    gap: 20px;
    align-items: stretch;
    flex-wrap: wrap;
}
.home-grid > a {
    flex: 1;
    min-width: 280px;
    display: flex;
}

.tool-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

    .tool-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background-color: var(--primary-color);
        transform: scaleY(0);
        transition: transform 0.3s ease;
        transform-origin: bottom;
    }

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

        .tool-card:hover::before {
            transform: scaleY(1);
        }

    .tool-card h2 {
        margin-top: 0;
        color: var(--primary-color);
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .tool-card p {
        margin: 0;
        color: var(--text-muted);
        font-size: 0.95rem;
    }

.stats-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 200px;
    flex: 0 0 auto;
    margin-bottom: 20px;
}
.stats-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}
.stats-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.history-panel {
    flex: 0 0 260px;
    background-color: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

    .history-panel h2 {
        font-size: 1.1rem;
        margin-top: 0;
        color: var(--primary-color);
        margin-bottom: 15px;
    }

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 12px;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .history-item:hover {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 1px var(--primary-color);
    }

.history-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 4px;
    word-break: break-all;
}

.history-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-empty {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    margin-top: 15px;
    box-shadow: none;
}

    .secondary-btn:hover {
        background-color: var(--bg-body);
        color: #d32f2f;
        border-color: #d32f2f;
    }

.controls-panel {
    flex: 1;
    background-color: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.emergency-toggle {
    background-color: #ffebee;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
    margin-bottom: 25px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-checkbox {
    margin-left: 25px;
    margin-top: -10px;
}

.checkbox-group input {
    width: auto;
}

label {
    display: block;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.checkbox-group label {
    margin-bottom: 0;
}

input[type="text"], input[type="number"], input[type="file"], select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s;
}

    input[type="text"]:focus, input[type="number"]:focus, select:focus {
        outline: none;
        border-color: var(--primary-color);
        background-color: #fff;
        box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
    }

button {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 10px;
    box-shadow: var(--shadow-sm);
}

    button:hover {
        background-color: var(--primary-hover);
        box-shadow: var(--shadow-md);
    }

    button:active {
        transform: scale(0.98);
    }

.site-footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: auto;
}

    .site-footer p {
        margin: 0;
    }

    .site-footer a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s ease;
    }

        .site-footer a:hover {
            color: var(--primary-hover);
            text-decoration: underline;
        }

    .site-footer .disclaimer {
        font-size: 0.75rem;
        color: var(--text-muted);
        margin-top: 15px;
        line-height: 1.4;
        opacity: 0.8;
    }

        .site-footer .disclaimer a {
            color: var(--text-muted);
            font-weight: normal;
            text-decoration: underline;
        }

.legal-content h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 10px;
}

.legal-content p, .legal-content ul {
    margin-bottom: 15px;
    color: var(--text-main);
}

.legal-content ul {
    padding-left: 20px;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
    max-width: 350px;
    font-size: 0.95rem;
    line-height: 1.4;
}

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

#render-area {
    display: none;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-brand {
        border-bottom: none;
        padding-bottom: 10px;
        justify-content: center;
    }

    .sidebar-nav {
        flex-direction: row;
        padding: 0 20px 15px;
        overflow-x: auto;
        gap: 10px;
    }

    .main-layout {
        flex-direction: column-reverse;
    }

    .history-panel {
        flex: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    body {
        background: white;
        padding: 0;
        margin: 0;
        color: black;
        font-family: sans-serif;
        display: block;
    }

    body > * {
        display: none !important;
    }

    body > #render-area {
        display: block !important;
        width: 100%;
    }

    .a4-page {
        width: 210mm;
        height: 297mm;
        padding: 10mm 15mm;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        break-after: page; 
    }

    .a4-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .log-strip {
        height: 100%;
        border: 1px solid #000;
        border-left: none;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

        .log-strip:first-child {
            border-left: 1px solid #000;
        }

    .staple-area {
        min-height: 10mm;
        border-bottom: 1px dashed #999;
    }

    .official-logo-box {
        text-align: center;
        padding: 5mm 0;
        border-bottom: 1px solid #000;
    }

        .official-logo-box img {
            width: 20mm;
            height: auto;
        }

        .official-logo-box div {
            font-size: 7px;
            font-weight: bold;
            margin-top: 2px;
        }

    .strip-logo {
        width: 100%;
        max-height: 25mm;
        object-fit: contain;
        margin: 4mm 0;
        padding: 0 2mm;
        box-sizing: border-box;
        display: block;
    }

    .logo-container {
        border-bottom: 1px solid #000;
    }

    .created-on {
            text-align: center;
            font-size: 7px;
            font-weight: bold;
            background-color: #000 !important;
            color: #FFF !important;
            padding: 4px 1mm;
            border-bottom: 1px solid #000;
            text-transform: uppercase;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }

    .cache-info {
        text-align: center;
        padding: 4px 3mm 4px 5mm;
        border-bottom: 1px solid #000;
        font-size: 10px;
    }

        .cache-info strong {
            font-size: 11px;
            display: block;
        }

    .emergency-box {
        padding: 6px 3mm 6px 5mm;
        border-bottom: 1px solid #000;
        font-size: 8px;
        line-height: 1.6;
    }

        .emergency-box strong {
            display: block;
            text-align: center;
            font-size: 10px;
            margin-bottom: 4px;
        }

    .warning-text {
        font-size: 6.5px;
        padding: 4px 3mm 4px 5mm;
        text-align: justify;
        line-height: 1.2;
        border-bottom: 1px solid #000;
    }

        .warning-text strong {
            display: block;
            text-align: center;
            margin-bottom: 3px;
            font-size: 7.5px;
        }

        .warning-text ul {
            padding-left: 8px;
            margin: 3px 0;
        }

    .qr-box {
        padding: 4px 3mm 4px 5mm;
        text-align: center;
        border-bottom: 1px solid #000;
    }

    .qr-title {
        font-size: 7px;
        font-weight: bold;
        margin-bottom: 2px;
    }

    .qr-warn {
        font-size: 6px;
        margin-top: 2px;
        color: #333;
    }

    .podium-box {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #000;
    }

    .podium-stamp {
        border-bottom: 1px dotted #888;
        display: flex;
        flex-direction: column;
        padding: 2px 2px 2px 5mm;
        box-sizing: border-box;
    }

        .podium-stamp.with-tampon {
            min-height: 35mm;
        }

        .podium-stamp:last-child {
            border-bottom: none;
        }

    .podium-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 3px;
        font-size: 7px;
        color: #333;
        margin-bottom: 2mm;
    }

    .podium-title {
        font-weight: bold;
        font-size: 10px;
        color: #000;
        margin-right: 2px;
    }

    .podium-input-date {
        font-style: italic;
    }

    .podium-input-pseudo {
        font-style: italic;
        flex-grow: 1;
    }

    .podium-tampon {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: 1px;
        border: 1px dotted #ccc;
    }

    .logs-container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .log-row {
        flex: 1;
        border-bottom: 1px solid #ccc;
        box-sizing: border-box;
        display: flex;
    }

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

    .staple-spacer {
        border-bottom: 1px solid #ccc;
    }

    .log-date {
        width: 10mm;
        border-right: 1px dotted #ccc;
        font-size: 7px;
        padding: 2px 2px 2px 3mm;
        color: #666;
        box-sizing: border-box;
    }

    .log-name {
        flex-grow: 1;
        font-size: 7px;
        padding: 2px 2px 2px 2mm;
        color: #666;
        box-sizing: border-box;
    }
}