/* =========================================================
   VBAMigrator
   site.css
========================================================= */

:root {
    --bg-color: #f5f7fb;
    --surface-color: #ffffff;

    --border-color: #dbe2ea;

    --text-color: #1f2937;
    --text-light: #6b7280;

    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;

    --success-color: #0f9d58;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;

    --shadow:
        0 2px 8px rgba(0, 0, 0, 0.06);

    --radius: 14px;

    --max-width: 1200px;
}

/* =========================================================
   Reset
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-color);

    color: var(--text-color);

    font-family:
        Verdana,
        Arial,
        sans-serif;

    line-height: 1.5;
}

/* =========================================================
   Layout
========================================================= */

.page {
    max-width: var(--max-width);

    margin: 0 auto;

    padding:
        32px
        20px
        80px;
}

/* =========================================================
   Header
========================================================= */

.app-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        18px
        24px;

    background: var(--surface-color);

    border-bottom:
        1px solid var(--border-color);

    box-shadow: var(--shadow);
}

.logo {
    color: var(--primary-color);

    font-size: 1.5rem;

    font-weight: bold;

    text-decoration: none;
}

.logo-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.app-version {
    font-family: Consolas, monospace;
    font-size: 0.9rem;
    color: #475569;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 2px 10px;
}

.main-nav {
    display: flex;

    gap: 18px;
}

.main-nav a {
    color: var(--text-color);

    text-decoration: none;

    font-weight: 600;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* =========================================================
   Footer
========================================================= */

.app-footer {
    margin-top: 60px;

    padding: 24px;

    text-align: center;

    color: var(--text-light);
}

/* =========================================================
   Hero
========================================================= */

.hero {
    margin-bottom: 30px;
}

.hero h1 {
    margin-bottom: 10px;

    font-size: 2.1rem;
}

.hero p {
    color: var(--text-light);
}

/* =========================================================
   Cards
========================================================= */

.card {
    background: var(--surface-color);

    border:
        1px solid var(--border-color);

    border-radius: var(--radius);

    padding: 24px;

    margin-bottom: 24px;

    box-shadow: var(--shadow);
}

/* =========================================================
   Report Details
========================================================= */

.macro-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.macro-card {
    border: 1px solid #3f4b5c;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    color: #fef3c7;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.macro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    font-family: Consolas, monospace;
}

.macro-code {
    margin: 0;
    padding: 14px;
    background: #020617;
    color: #fde68a;
    white-space: pre-wrap;
    font-size: 0.92rem;
    line-height: 1.7;
    font-family: Consolas, monospace;
}

.highlightVba {
    display: block;
}

.vba-line {
    display: block;
}

.vba-keyword {
    color: #f59e0b;
    font-weight: 700;
}

.vba-function {
    color: #86efac;
}

.vba-string {
    color: #fca5a5;
}

.vba-comment {
    color: #94a3b8;
    font-style: italic;
}

/* =========================================================
   Upload Form
========================================================= */

.upload-form {
    display: flex;

    flex-direction: column;

    gap: 16px;
}

.upload-form label {
    font-weight: 600;
}

.upload-form input[type="file"] {
    padding: 12px;

    background: #fafafa;

    border:
        1px solid var(--border-color);

    border-radius: 10px;
}

.upload-form button {
    width: fit-content;

    padding:
        12px
        22px;

    background: var(--primary-color);

    color: white;

    border: none;

    border-radius: 10px;

    font-size: 1rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        background
        0.2s ease;
}

.upload-form button:hover {
    background: var(--primary-hover);
}

/* =========================================================
   Status / Result
========================================================= */

.status-box {
    margin-top: 18px;

    color: var(--text-light);
}

.result-box {
    margin-top: 24px;
}

/* =========================================================
   Metrics
========================================================= */

.metrics-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 20px;

    margin-bottom: 30px;
}

.metric-card {
    background: var(--surface-color);

    border:
        1px solid var(--border-color);

    border-radius: var(--radius);

    padding: 22px;

    box-shadow: var(--shadow);
}

.metric-card span {
    display: block;

    margin-bottom: 10px;

    color: var(--text-light);

    font-size: 0.95rem;
}

.metric-card strong {
    font-size: 2rem;

    color: var(--primary-color);
}

/* =========================================================
   Tables
========================================================= */

.report-table {
    width: 100%;

    border-collapse: collapse;
}

.report-table th {
    background: #eef3fb;

    text-align: left;

    padding: 14px;

    font-size: 0.95rem;
}

.report-table td {
    padding: 14px;

    border-top:
        1px solid var(--border-color);

    vertical-align: top;
}

.report-table tr:hover {
    background: #fafcff;
}

/* =========================================================
   Links
========================================================= */

.button-link {
    display: inline-block;

    padding:
        8px
        14px;

    background: var(--primary-color);

    color: white;

    border-radius: 8px;

    text-decoration: none;

    font-size: 0.9rem;

    font-weight: 600;
}

.button-link:hover {
    background: var(--primary-hover);
}

/* =========================================================
   Modules
========================================================= */

.module-card {
    padding:
        18px
        0;

    border-top:
        1px solid var(--border-color);
}

.module-card:first-child {
    border-top: none;
}

.module-card h3 {
    margin-top: 0;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {

    .report-table {
        display: block;

        overflow-x: auto;
    }

    .app-header {
        flex-direction: column;

        gap: 16px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }
}

.hidden {
    display: none;
}

.status-error {
    color: var(--danger-color);
    font-weight: bold;
}

.status-success {
    color: var(--success-color);
    font-weight: bold;
}