body {
    font-family: system-ui, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: #f5f5f5;
}

.top-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    justify-content: space-between;
    flex-wrap: wrap;
}

.top-banner .avatar {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-banner h1 {
    margin: 0;
    font-size: 1.25rem;
    color: #202124;
}

.main {
    display: flex;
    flex-direction: column;
    /*align-items: start;*/
    justify-content: start;
    gap: 1.5rem;
    min-height: calc(100vh - 68px);
    padding: 2rem;
}

.main-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: calc(100vh - 68px);
    padding: 2rem;
}

.card {
    background: #fff;
    padding: 1.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: start;
    width: 90%;
    margin: 0 auto;
}

.card-welcome {
    background: #fff;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 30%;
    margin: 0 auto;
}

h2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border: 1px solid #dadce0;
    border-radius: 6px;
    background: #fff;
    color: #3c4043;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: box-shadow 0.2s;
}

.google-btn:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.cgu {
    margin-top: 1.8rem;
    font-size: 0.75rem;
}

.error {
    color: #c5221f;
    margin-bottom: 1rem;
}

.banner-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.user-name {
    font-size: 1rem;
    font-weight: 600;
    color: #202124;
}

.user-email {
    font-size: 0.9rem;
    color: #5f6368;
}

.user-info .logout {
    font-size: 0.8rem;
    color: #1a73e8;
    text-decoration: none;
}

.user-info .logout:hover {
    text-decoration: underline;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.form-row-checkboxes {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.tag-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #3c4043;
}

.tag-label select {
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    z-index: 1000;
    text-align: center;
    padding: 2rem;
}
.overlay[hidden] { display: none; }
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #dadce0;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.overlay p {
    max-width: 360px;
    color: #3c4043;
    margin: 0;
}

input[type="file"] {
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 0.5rem;
}
button {
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    cursor: pointer;
}
button:hover { background: #1662c4; }
button.danger {
    background: #fff;
    color: #c5221f;
    border: 1px solid #c5221f;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
}
button.danger:hover { background: #fdecea; }

.message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.message.error { background: #fdecea; color: #c5221f; }
.message.success { background: #e6f4ea; color: #137333; }

ul.uploads {
    list-style: none;
    padding: 0;
    margin: 0;
}
ul.uploads li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #eee;
}
ul.uploads li:last-child { border-bottom: none; }
.upload-info { flex: 1; min-width: 0; }
.upload-name { font-weight: 600; }
.upload-meta { font-size: 0.82rem; color: #5f6368; margin-top: 0.2rem; }
.upload-links { font-size: 0.85rem; margin-top: 0.3rem; }
.upload-links a { color: #1a73e8; text-decoration: none; margin-right: 1rem; }
.upload-links a:hover { text-decoration: underline; }
.tag-badge,
.persistent-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}
.tag-badge {
    background: #e8f0fe;
    color: #1a73e8;
}
.persistent-badge {
    background: #e6f4ea;
    color: #137333;
}
.empty { color: #5f6368; font-size: 0.9rem; }

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 0.4rem;
    padding: 0;
    line-height: 0;
    vertical-align: middle;
    border: 1px solid #dadce0;
    border-radius: 5px;
    background: #fff;
    color: #1a73e8;
    cursor: pointer;
    flex: none;
}
.copy-btn:hover { background: #f1f6fe; }
.copy-btn svg { display: block; }

input[type="text"] {
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}
input[type="text"]:focus {
    outline: none;
    border-color: #1a73e8;
}

ul.tags-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem 0;
}
ul.tags-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}
ul.tags-list li:last-child {
    border-bottom: none;
}
.tag-item-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.tag-item-label {
    font-weight: 600;
}
.tag-item-key {
    background: #f1f3f4;
    color: #5f6368;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: monospace;
}
.tag-used-badge {
    background: #fef7e0;
    color: #b06000;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}
.tag-add-form {
    margin-top: 1rem;
}