:root {
    --inah-red: #8b1e34;
    --inah-red-dark: #611427;
    --inah-gold: #b68a35;
    --inah-ink: #202733;
    --inah-muted: #667085;
    --inah-line: #d9dee7;
    --inah-bg: #f4f6f9;
    --inah-white: #ffffff;
    --shadow: 0 18px 45px rgba(18, 28, 45, 0.14);
}

body {
    color: var(--inah-ink);
    background: var(--inah-bg);
}

.login-page {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(135deg, rgba(139, 30, 52, 0.96), rgba(42, 49, 66, 0.96)),
        linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.08) 75%),
        #2a3142;
    background-size: auto, 28px 28px, auto;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 440px);
    align-items: center;
    gap: 48px;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0;
}

.login-hero {
    color: var(--inah-white);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border: 2px solid rgba(255,255,255,.55);
    border-radius: 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 28px;
}

.eyebrow {
    color: #f0d79b;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.login-hero h1 {
    max-width: 680px;
    margin: 0 0 18px;
    font-size: 44px;
    line-height: 1.08;
    font-weight: 700;
}

.hero-copy {
    max-width: 620px;
    color: rgba(255,255,255,.86);
    font-size: 18px;
    line-height: 1.55;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 14px;
    max-width: 560px;
    margin-top: 34px;
}

.tech-grid div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}

.icon {
    color: #f0d79b;
    font-size: 22px;
}

.login-card {
    background: var(--inah-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 34px;
}

.login-card-header p {
    margin: 0 0 6px;
    color: var(--inah-gold);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.login-card-header h2 {
    margin: 0 0 24px;
    font-size: 28px;
}

.login-card label {
    display: block;
    margin: 18px 0 8px;
    font-weight: 700;
}

.modern-input {
    min-height: 46px;
    border-radius: 8px;
    border-color: var(--inah-line);
}

.modern-input:focus {
    border-color: var(--inah-red);
    box-shadow: 0 0 0 3px rgba(139,30,52,.14);
}

.btn-modern {
    width: 100%;
    min-height: 48px;
    margin-top: 24px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
}

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

.btn-primary-modern:hover,
.btn-primary-modern:focus {
    background: var(--inah-red-dark);
}

.alert-modern {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 700;
}

.alert-danger {
    color: #7f1d1d;
    background: #fee2e2;
}

.alert-warning {
    color: #7c5800;
    background: #fff3cd;
}

.app-shell {
    min-height: 100vh;
    background: var(--inah-bg);
}

.app-header {
    color: var(--inah-white);
    background: linear-gradient(135deg, var(--inah-red), #343b4d);
    padding: 18px 24px;
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
}

.app-title {
    margin: 0;
    font-size: 22px;
}

.app-subtitle {
    margin: 4px 0 0;
    color: rgba(255,255,255,.78);
}

.app-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.repo-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 24px;
}

.panel-modern {
    background: var(--inah-white);
    border: 1px solid var(--inah-line);
    border-radius: 8px;
    padding: 20px;
}

.file_upload {
    border: 2px dashed #98a2b3;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: #fafbfc;
}

.toolbar-modern {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.breadcrumb-modern {
    margin: 0;
    color: var(--inah-muted);
    overflow-wrap: anywhere;
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--inah-line);
    border-radius: 8px;
    background: var(--inah-white);
}

.file-row.is-folder {
    background: #fffaf0;
    border-color: #ead7ad;
}

.file-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #344054;
    background: #eef2f6;
    font-weight: 700;
}

.file-icon::before {
    content: "FILE";
    font-size: 10px;
}

.file-icon-folder {
    color: #7a4f00;
    background: #ffe8a3;
}

.file-icon-folder::before { content: "DIR"; }
.file-icon-disc::before { content: "ISO"; }
.file-icon-archive::before { content: "ZIP"; }
.file-icon-virtual::before { content: "VM"; }
.file-icon-pdf::before { content: "PDF"; }
.file-icon-doc::before { content: "DOC"; }
.file-icon-sheet::before { content: "XLS"; }
.file-icon-slides::before { content: "PPT"; }

.file-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--inah-muted);
    font-size: 13px;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.repo-summary {
    margin: 6px 0 0;
    color: var(--inah-muted);
    font-size: 13px;
}

.upload-status {
    margin-top: 14px;
}

.upload-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--inah-muted);
    font-size: 13px;
}

.upload-progress {
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e7ec;
}

.upload-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--inah-red);
    transition: width .2s ease;
}

.upload-message {
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
}

.upload-message.success {
    color: #166534;
}

.upload-message.error {
    color: #991b1b;
}

.upload-message.info {
    color: var(--inah-muted);
}

.empty-state {
    display: grid;
    gap: 4px;
    padding: 24px;
    border: 1px dashed var(--inah-line);
    border-radius: 8px;
    color: var(--inah-muted);
    text-align: center;
}

@media (max-width: 860px) {
    .login-shell,
    .repo-grid {
        grid-template-columns: 1fr;
    }

    .login-hero h1 {
        font-size: 34px;
    }

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

    .app-header-inner,
    .file-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .file-actions {
        justify-content: flex-start;
    }
}
