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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 20px;
    color: #000;
}

.hidden {
    display: none !important;
}

/* Login Modal */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border: 1px solid #000;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #000;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 12px;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
    color: #000;
}

.modal-content input:focus {
    outline: none;
    border-color: #000;
}

.modal-content button {
    padding: 12px;
    background: #000;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-content button:hover {
    background: #333;
}

.error-message {
    color: #000;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

/* Header */
header {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

header h1 {
    color: #000;
    font-size: 24px;
}

.logout-btn {
    padding: 8px 16px;
    background: #000;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #333;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    background: white;
    padding: 30px 0;
    margin-bottom: 20px;
}

.search-section h2 {
    margin-bottom: 20px;
    color: #000;
}

.logout-container {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
}

.advanced-toggle-container {
    margin: 15px 0;
    display: flex;
    justify-content: flex-start;
}

.advanced-toggle {
    background: none;
    border: none;
    color: #000;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    font-family: inherit;
    transition: opacity 0.3s;
}

.advanced-toggle:hover {
    opacity: 0.7;
}

.advanced-fields {
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input {
    padding: 10px;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
    color: #000;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary {
    padding: 12px 24px;
    background: #000;
    color: white;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: #000;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

/* Results Section */
.results-section {
    background: white;
    padding: 30px 0;
}

.results-section h2 {
    margin-bottom: 20px;
    color: #000;
}

/* Results Cards */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-card {
    background: white;
    border: 1px solid #000;
    border-radius: 0;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.result-card:hover {
    border-color: #000;
    background: #f5f5f5;
}

.card-field {
    margin-bottom: 10px;
}

.card-field-label {
    font-weight: 600;
    color: #000;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.card-field-value {
    color: #000;
    font-size: 16px;
}

/* Detail Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    overflow-y: auto;
}

.overlay-content {
    background: white;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #000;
    color: white;
    border: none;
    border-radius: 0;
    width: 40px;
    height: 40px;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    line-height: 1;
    z-index: 2001;
}

.close-btn:hover {
    background: #333;
}

#overlayListContainer {
    min-height: 100vh;
}

.detail-content {
    padding: 60px 20px 20px 20px;
    min-height: 100vh;
}

/* Results List in Modal */
.results-list-header {
    padding: 60px 20px 20px 20px;
    border-bottom: 1px solid #ddd;
}

.results-list-header h2 {
    color: #000;
    font-size: 24px;
    margin: 0;
}

.results-list {
    padding: 0;
}

.result-list-item {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.result-list-item:hover {
    background: #f5f5f5;
}

.result-list-item:last-child {
    border-bottom: none;
}

.result-row-1 {
    font-size: 16px;
    color: #000;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-row-2 {
    font-size: 14px;
    color: #000;
}

.detail-field {
    padding-bottom: 15px;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.detail-field:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #000;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-value {
    color: #000;
    font-size: 16px;
    word-break: break-word;
}

.detail-value:empty::before {
    content: '-';
    color: #999;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #000;
    font-size: 18px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .results-list-header {
        padding: 60px 15px 15px 15px;
    }

    .result-list-item {
        padding: 15px;
    }

    .detail-content {
        padding: 60px 15px 15px 15px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

