* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f6f8fb;
    color: #1f2937;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 28px 20px;
}

.sidebar-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
}

.sidebar-item {
    display: block;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 600;
    margin-bottom: 8px;
}

.sidebar-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.sidebar-item.active {
    background: #2563eb;
    color: #ffffff;
}

.sidebar-divider {
    width: 100%;
    border: none;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
    margin-bottom: 12px;
}

.sidebar-reset-form {
    width: 100%;
    margin: 0;
}

.sidebar-reset-button {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(147, 197, 253, 0.45);
    color: #000000;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.sidebar-reset-button:hover {
    background: rgba(147, 197, 253, 0.7);
}

.content {
    flex: 1;
    padding: 36px 44px;
    max-width: 1500px;
}

h1 {
    margin: 0 0 22px 0;
    font-size: 34px;
    line-height: 1.2;
    color: #1d4ed8;
    font-weight: 800;
}

h2 {
    margin: 0 0 16px 0;
    font-size: 22px;
    color: #1d4ed8;
    font-weight: 800;
}

p {
    line-height: 1.55;
    color: #374151;
}

li {
    color: #374151;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.grid,
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 700;
    color: #374151;
}

.upload-card h2 {
    color: #1d4ed8;
}

.upload-grid {
    gap: 18px;
    margin-top: 16px;
}

.upload-box {
    position: relative;
    border: 1.5px dashed #bfdbfe;
    border-radius: 16px;
    padding: 20px;
    background: #f8fbff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-box:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-box input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-title {
    font-weight: 800;
    color: #1d4ed8;
    margin-bottom: 6px;
}

.upload-sub {
    font-size: 13px;
    color: #6b7280;
}

button,
.download {
    display: inline-block;
    margin-top: 18px;
    border: 0;
    border-radius: 14px;
    padding: 12px 20px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.download:hover {
    background: #1d4ed8;
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 14px;
    font-weight: 800;
    padding: 13px 22px;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

button:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: default;
}

.file-info.success {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 600;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
    font-size: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

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

th {
    background: #f8fafc;
    color: #1d4ed8;
    font-weight: 800;
}

td {
    color: #374151;
}

tr:last-child td {
    border-bottom: 0;
}

tr:hover td {
    background: #f9fafb;
}

.analysis-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 18px;
    background: #ffffff;
}

.analysis-title {
    font-size: 20px;
    font-weight: 800;
    color: #1d4ed8;
    margin-bottom: 16px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.metrics div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.metrics span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.metrics b {
    color: #111827;
    font-size: 16px;
}

.feedback {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
    margin-top: 16px;
}

.feedback textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 14px;
    font-family: inherit;
    resize: vertical;
    background: #f9fafb;
    color: #111827;
}

.feedback textarea::placeholder {
    color: #9ca3af;
}

.feedback textarea:focus {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
    background: #ffffff;
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .sidebar-divider {
        margin-top: 20px;
    }

    .content {
        padding: 24px;
    }

    .grid,
    .upload-grid,
    .metrics,
    .feedback {
        grid-template-columns: 1fr;
    }
}