* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
    line-height: 1.5;
}

a {
    color: #0f4c81;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: #0f172a;
    color: #fff;
    padding: 18px 0;
    margin-bottom: 24px;
}

.topbar h1,
.topbar h2,
.topbar p {
    margin: 0;
    color: #fff;
}

.card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.btn,
button {
    display: inline-block;
    background: #0f4c81;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover,
button:hover {
    background: #0c3d68;
    text-decoration: none;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}
.btn-secondary:hover {
    background: #d1d5db;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 600;
}

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

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: #f8fafc;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.lot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.lot-card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.lot-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.lot-card-body {
    padding: 16px;
}

.lot-meta {
    margin: 8px 0;
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e0ecff;
    color: #0f4c81;
}

.section-title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.2;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.thumb-card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 10px;
}

.thumb-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin-bottom: 8px;
}

.notice-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.notice-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .grid-2,
    .grid-3,
    .lot-grid,
    .thumb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 20px, 1100px);
    }

    .grid-2,
    .grid-3,
    .lot-grid,
    .thumb-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 14px 0;
        margin-bottom: 18px;
    }

    .section-title {
        font-size: 24px;
    }

    th, td {
        padding: 10px;
        font-size: 13px;
    }

    .lot-card img {
        height: 200px;
    }
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.table-actions form {
    margin: 0;
    display: inline;
}

.table-actions .btn,
.table-actions button {
    white-space: nowrap;
}
