:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #ca8a04;
    --error: #dc2626;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.nav {
    display: flex;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.nav a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav a:hover {
    color: var(--text);
    background: var(--bg);
}

.nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.drop-zone p {
    margin-bottom: 0.5rem;
}

.drop-zone .hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="file"] {
    display: none;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.status.loading {
    background: #eff6ff;
    color: var(--primary);
}

.status.success {
    background: #f0fdf4;
    color: var(--success);
}

.status.error {
    background: #fef2f2;
    color: var(--error);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.file-name {
    font-weight: 500;
    word-break: break-all;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.results-header h2 {
    font-size: 1.25rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: var(--success);
}

.badge-warning {
    background: #fef9c3;
    color: var(--warning);
}

.badge-error {
    background: #fee2e2;
    color: var(--error);
}

.violation {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.violation-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.violation-type {
    font-weight: 600;
    font-family: monospace;
    font-size: 0.9rem;
}

.severity-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.severity-error { background: var(--error); }
.severity-warning { background: var(--warning); }

.violation-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.violation-items {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

.violation-item {
    margin-bottom: 0.25rem;
}

.sheet-group {
    margin-bottom: 1.5rem;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.no-violations {
    text-align: center;
    padding: 2rem;
    color: var(--success);
}

.no-violations-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.json-output {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.85rem;
    max-height: 400px;
    overflow-y: auto;
}

.toggle-json {
    font-size: 0.9rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.feature-icon {
    color: var(--success);
}

#results {
    display: none;
}

.header-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.hub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.hub-card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.hub-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hub-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hub-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.hub-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    .card { padding: 1rem; }
    .drop-zone { padding: 2rem 1rem; }
}
