* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 1.8rem;
    color: #1a237e;
    margin-bottom: 4px;
}

.subtitle {
    color: #666;
    font-size: 0.95rem;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto 24px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #1a237e;
}

.search-btn {
    padding: 12px 28px;
    font-size: 1rem;
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #283593;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* Result Info */
.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.toggle-cols {
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.toggle-cols input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #fff;
}

thead {
    background: #1a237e;
    color: #fff;
}

thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

tbody tr:nth-child(even) {
    background: #f8f9fc;
}

tbody tr:hover {
    background: #e8eaf6;
}

tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

td code {
    font-family: "SF Mono", "Fira Code", "Courier New", monospace;
    font-size: 0.85rem;
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #d0d5dd;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #e8eaf6;
    border-color: #1a237e;
}

.pagination a.active {
    background: #1a237e;
    color: #fff;
    border-color: #1a237e;
    font-weight: 600;
}

.pagination span {
    border: none;
    background: none;
}

.page-info {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Import page */
.import-info table {
    width: auto;
    margin: 16px 0;
    background: none;
}

.import-info td {
    padding: 6px 16px 6px 0;
    border: none;
}

.btn-import {
    padding: 14px 36px;
    font-size: 1.1rem;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-import:hover {
    background: #388e3c;
}

footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    color: #999;
    font-size: 0.8rem;
}

a {
    color: #1a237e;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .result-info {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        font-size: 0.8rem;
    }

    thead th, tbody td {
        padding: 6px 8px;
    }
}
