* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

body.editing-active {
    background: #fff7ed;
}

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #111827;
    color: #f9fafb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.top-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
}

.top h1 {
    margin: 0 0 10px;
    font-size: 26px;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-actions form {
    margin: 0;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    border-radius: 8px;
    padding: 7px 12px;
    background: #374151;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

.auth-link:hover {
    background: #4b5563;
}

.stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 15px;
}

.mode-label {
    color: #fed7aa;
    font-weight: bold;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.empty {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.set-block {
    margin-bottom: 42px;
    border-radius: 12px;
    padding: 0;
}

.set-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    border-bottom: 2px solid #d1d5db;
    padding-bottom: 10px;
}

.set-title {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.set-header h2 {
    margin: 0;
    font-size: 24px;
}

.set-header span {
    color: #6b7280;
}

.set-block.pending-adobe {
    background: #fff7ed;
    border: 2px solid #f97316;
    box-shadow: 0 10px 26px rgba(249, 115, 22, 0.14);
    margin-left: -14px;
    margin-right: -14px;
    padding: 14px;
}

.set-block.pending-adobe .set-header {
    border-bottom-color: #fb923c;
}

.set-status-badge {
    background: #ea580c;
    color: #ffffff !important;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.04em;
    padding: 5px 9px;
}

.set-status-form {
    margin-top: 0;
    min-width: 220px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.card {
    position: relative;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.card.accepted {
    background: #ecfdf5;
    border-color: #22c55e;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #16a34a;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.thumb-link {
    display: block;
    height: 230px;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.filename {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.25;
    color: #374151;
    word-break: break-word;
    min-height: 42px;
}

form {
    margin-top: auto;
}

button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 7px 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
}

.btn-accept {
    background: #2563eb;
    color: #ffffff;
}

.btn-accept:hover {
    background: #1d4ed8;
}

.btn-remove {
    background: #dc2626;
    color: #ffffff;
}

.btn-remove:hover {
    background: #b91c1c;
}

.btn-adobe-done {
    background: #ea580c;
    color: #ffffff;
}

.btn-adobe-done:hover {
    background: #c2410c;
}

.btn-adobe-pending {
    background: #6b7280;
    color: #ffffff;
}

.btn-adobe-pending:hover {
    background: #4b5563;
}

.btn-editing-on {
    background: #ea580c;
    color: #ffffff;
}

.btn-editing-on:hover {
    background: #c2410c;
}

.btn-editing-off {
    background: #2563eb;
    color: #ffffff;
}

.btn-editing-off:hover {
    background: #1d4ed8;
}

.login-page {
    background: #f3f4f6;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: min(360px, calc(100vw - 32px));
    margin: 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.login-box h1 {
    margin: 0 0 18px;
    font-size: 24px;
}

.login-box label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: bold;
    color: #374151;
}

.login-box input {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 15px;
}

.login-box a {
    display: block;
    margin-top: 14px;
    color: #2563eb;
    text-align: center;
    text-decoration: none;
}

.login-error {
    margin-bottom: 14px;
    border-radius: 8px;
    padding: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: bold;
}

@media (max-width: 720px) {
    .top-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .set-header {
        align-items: stretch;
        flex-direction: column;
    }

    .set-status-form {
        min-width: 0;
    }
}
