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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
.header {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.header h1 {
    font-size: 28px;
    color: #667eea;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    background: #f56565;
    color: white;
    padding: 8px 16px;
}

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

.btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.btn-close:hover {
    color: #000;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block !important;
}

/* Auth Screen */
#authScreen.active {
    display: flex;
}

#authScreen {
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.auth-container h2 {
    margin-bottom: 30px;
    color: #667eea;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#loginForm .btn-primary {
    width: 100%;
    margin-top: 10px;
}

.error {
    color: #f56565;
    font-size: 14px;
    margin-top: 10px;
}

/* Dashboard */
#dashboardScreen {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.search-section {
    margin-bottom: 30px;
}

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

.search-controls {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Results */
.results-section {
    min-height: 200px;
}

.support-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #d9dee7;
}

.claim-result {
    min-height: 120px;
    margin: 16px 0;
    padding: 16px;
    overflow: auto;
    background: #f5f7fa;
    border: 1px solid #d9dee7;
    border-radius: 6px;
    white-space: pre-wrap;
}

.claim-approval-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 2fr) auto;
    gap: 12px;
}

@media (max-width: 760px) {
    .claim-approval-controls {
        grid-template-columns: 1fr;
    }
}

.results-container {
    display: grid;
    gap: 15px;
}

.placeholder {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

.result-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9fafb;
}

.result-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    background: white;
}

.result-card-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.result-card-type.company {
    background: #c3dafe;
    color: #3c366b;
}

.result-card-type.driver {
    background: #c6f6d5;
    color: #22543d;
}

.result-card h3 {
    margin: 10px 0 5px 0;
    color: #333;
}

.result-card p {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.result-card-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 13px;
    color: #999;
}

/* Detail Panel */
.detail-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.detail-panel.hidden {
    transform: translateX(100%);
}

.detail-content {
    padding: 30px 20px;
}

.detail-header {
    margin-bottom: 20px;
}

.detail-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    color: #667eea;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 600;
}

.detail-field {
    margin-bottom: 12px;
}

.detail-field label {
    display: block;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.detail-field value {
    display: block;
    color: #333;
    font-size: 14px;
    word-break: break-word;
}

.detail-drivers {
    list-style: none;
}

.detail-drivers li {
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.detail-inspections {
    list-style: none;
}

.detail-inspections li {
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    border-left: 3px solid #667eea;
}

.detail-inspections .date {
    color: #667eea;
    font-weight: 600;
}

.detail-inspections .notes {
    color: #666;
    margin-top: 4px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-premium {
    background: #c6f6d5;
    color: #22543d;
}

.status-free {
    background: #fed7d7;
    color: #742a2a;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: white;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-controls {
        flex-direction: column;
    }

    .detail-panel {
        width: 100%;
    }

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

    .header h1 {
        font-size: 20px;
    }
}
