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

:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --text: #172033;
    --muted: #8992a5;
    --muted-dark: #64748b;
    --border: #e5e9f1;
    --blue: #2563eb;
    --blue-soft: #edf4ff;
    --green: #22c55e;
    --red: #dc2626;
    --red-soft: #fff1f1;
    --dark: #172033;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* NAVBAR */

.navbar {
    height: 76px;
    padding: 0 7%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cloud-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    background: var(--blue);
    color: white;

    font-size: 22px;
}

.brand-name {
    font-size: 17px;
    font-weight: 750;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.connection {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #5d687b;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
    background: var(--green);
}

/* LAYOUT */

.container {
    width: 86%;
    max-width: 1150px;
    margin: auto;
}

/* HERO */

.hero {
    padding-top: 58px;
    padding-bottom: 28px;
}

.eyebrow {
    margin-bottom: 14px;

    color: var(--blue);
    font-size: 12px;
    font-weight: 750;

    letter-spacing: 1.4px;
}

.hero h1 {
    font-size: 50px;
    line-height: 1.07;
    letter-spacing: -2.5px;
}

.hero h1 span {
    color: var(--blue);
}

.hero p {
    max-width: 650px;
    margin-top: 15px;

    color: #697386;
    font-size: 16px;
    line-height: 1.6;
}

/* STUDENT */

.student-card {
    display: flex;
    align-items: center;

    padding: 17px 20px;
    margin-bottom: 20px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
}

.student-avatar {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 13px;

    border-radius: 50%;
    background: #eaf1ff;
    color: var(--blue);

    font-weight: 750;
}

.student-name {
    font-size: 14px;
    font-weight: 700;
}

.student-details {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.deployment-badge {
    margin-left: auto;
    color: #64748b;
    font-size: 12px;
}

.deployment-badge span {
    margin-right: 5px;
    color: var(--green);
}

/* MESSAGES */

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 13px 16px;

    border-radius: 11px;
    font-size: 13px;
}

.alert.success {
    background: #effcf3;
    border: 1px solid #ccefd5;
    color: #15803d;
}

.alert.error {
    background: #fff2f2;
    border: 1px solid #ffd4d4;
    color: #b91c1c;
}

/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 18px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.stat-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

.stat-value {
    margin-top: 7px;
    font-size: 22px;
    font-weight: 780;
}

.stat-sub {
    margin-top: 3px;
    color: #a1a9b8;
    font-size: 10px;
}

.status-value {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 15px;
}

.mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.mini-dot.warning {
    background: #f59e0b;
}

.mini-dot.muted {
    background: #94a3b8;
}

/* CARD */

.card {
    margin-bottom: 22px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(31, 41, 55, 0.045);
}

/* UPLOAD */

.upload-card {
    padding: 28px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2,
.documents-header h2 {
    font-size: 19px;
}

.section-heading p,
.documents-header p {
    margin-top: 5px;

    color: var(--muted);
    font-size: 13px;
}

.upload-badge {
    padding: 7px 10px;

    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);

    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.drop-zone {
    display: block;

    margin-top: 23px;
    padding: 36px 20px;

    border: 2px dashed #d3d9e5;
    border-radius: 14px;

    text-align: center;
    cursor: pointer;

    transition:
        border-color .2s,
        background .2s,
        transform .2s;
}

.drop-zone:hover,
.drop-zone.drag-active {
    border-color: var(--blue);
    background: #f8fbff;
}

.drop-zone.drag-active {
    transform: scale(1.005);
}

.upload-symbol {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: auto;

    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);

    font-size: 25px;
}

.drop-title {
    margin-top: 15px;

    font-size: 15px;
    font-weight: 700;
}

.drop-description {
    margin-top: 5px;

    color: #687387;
    font-size: 13px;
}

.drop-limit {
    margin-top: 4px;

    color: #a1a9b8;
    font-size: 11px;
}

.drop-zone input {
    display: none;
}

/* QUEUE */

.upload-queue {
    margin-top: 18px;

    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 14px;

    background: #fafbfe;
    border-bottom: 1px solid var(--border);
}

.queue-header strong {
    font-size: 12px;
}

.queue-header span {
    margin-left: 7px;
    color: var(--muted);
    font-size: 10px;
}

.clear-button {
    border: none;
    background: transparent;

    color: var(--muted-dark);
    font-size: 10px;
    font-weight: 700;

    cursor: pointer;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;

    border-bottom: 1px solid #f0f2f5;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-item.invalid {
    background: #fffafa;
}

.queue-file-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    border-radius: 9px;
    background: var(--blue-soft);
    color: var(--blue);

    font-size: 8px;
    font-weight: 800;
}

.queue-file-info {
    min-width: 0;
    flex: 1;
}

.queue-file-name {
    overflow: hidden;

    color: var(--text);
    font-size: 12px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-file-meta {
    margin-top: 3px;

    color: var(--muted);
    font-size: 10px;
}

.remove-file {
    width: 27px;
    height: 27px;

    border: 1px solid #e6eaf1;
    border-radius: 7px;

    background: white;
    color: #64748b;

    cursor: pointer;
}

.remove-file:hover {
    background: var(--red-soft);
    color: var(--red);
}

.upload-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;

    padding: 12px 16px;

    border: 1px solid #dfe4ed;
    border-radius: 10px;

    color: #475569;
    background: white;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.secondary-button:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.upload-button {
    display: inline-flex;
    align-items: center;

    padding: 12px 19px;

    border: none;
    border-radius: 10px;

    background: var(--dark);
    color: white;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.upload-button span {
    margin-left: 7px;
}

.upload-button:hover:not(:disabled) {
    background: var(--blue);
}

.upload-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* DOCUMENTS */

.documents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 25px 27px;

    border-bottom: 1px solid #edf0f4;
}

.file-count {
    font-size: 21px;
    font-weight: 750;
}

.file-count span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

/* TOOLBAR */

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 15px 27px;

    border-bottom: 1px solid #edf0f4;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 7px;

    flex: 1;

    padding: 9px 11px;

    border: 1px solid #e0e5ee;
    border-radius: 9px;

    background: white;
}

.search-box span {
    color: #94a3b8;
    font-size: 17px;
}

.search-box input {
    width: 100%;

    border: none;
    outline: none;

    color: var(--text);
    background: transparent;

    font-size: 12px;
}

.sort-select {
    padding: 9px 11px;

    border: 1px solid #e0e5ee;
    border-radius: 9px;

    outline: none;

    color: #475569;
    background: white;

    font-size: 11px;
}

/* FILE ROW */

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 27px;

    border-bottom: 1px solid #f0f2f5;
}

.file-left {
    display: flex;
    align-items: center;

    min-width: 0;
}

.file-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    margin-right: 13px;

    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);

    font-size: 9px;
    font-weight: 800;
}

.file-details {
    min-width: 0;
}

.file-name {
    max-width: 480px;

    overflow: hidden;

    font-size: 14px;
    font-weight: 650;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    margin-top: 4px;

    color: #9aa2b1;
    font-size: 11px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-left: 15px;
}

.download-button,
.version-button,
.delete-button {
    display: inline-flex;
    align-items: center;

    padding: 8px 11px;

    border-radius: 8px;

    font-size: 10px;
    font-weight: 700;
}

.download-button {
    background: var(--blue-soft);
    color: var(--blue);
    text-decoration: none;
}

.version-button {
    border: 1px solid #e0e5ee;
    background: white;
    color: #475569;
    cursor: pointer;
}

.delete-button {
    border: none;
    background: var(--red-soft);
    color: var(--red);
    cursor: pointer;
}

.download-button:hover,
.version-button:hover,
.delete-button:hover {
    transform: translateY(-1px);
}

/* VERSION PANEL */

.version-panel {
    margin: -1px 27px 0;

    border: 1px solid #e5e9f1;
    border-radius: 10px;

    background: #fafbfe;

    overflow: hidden;
}

.version-header {
    padding: 13px 15px;

    border-bottom: 1px solid #e5e9f1;
}

.version-header strong {
    font-size: 11px;
}

.version-header span {
    margin-left: 8px;

    color: var(--muted);
    font-size: 10px;
}

.version-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 15px;

    border-bottom: 1px solid #eef1f5;
}

.version-row:last-child {
    border-bottom: none;
}

.version-number {
    font-size: 11px;
    font-weight: 750;
}

.latest-badge {
    display: inline-block;

    margin-left: 7px;
    padding: 3px 5px;

    border-radius: 5px;

    background: #eaf8ee;
    color: #15803d;

    font-size: 7px;
    letter-spacing: .5px;
}

.version-meta {
    margin-top: 3px;

    color: #7d8799;
    font-size: 10px;
}

.version-id {
    margin-top: 3px;

    max-width: 520px;
    overflow: hidden;

    color: #a0a8b7;
    font-family: monospace;
    font-size: 8px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.small-download,
.small-delete {
    padding: 7px 9px;

    border-radius: 7px;

    font-size: 9px;
    font-weight: 700;

    text-decoration: none;
}

.small-download {
    background: var(--blue-soft);
    color: var(--blue);
}

.small-delete {
    border: none;
    background: var(--red-soft);
    color: var(--red);
    cursor: pointer;
}

.version-empty {
    padding: 20px;

    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

/* INFO */

.info-card {
    display: flex;
    gap: 12px;

    margin: 28px 0;

    padding: 18px 20px;

    border: 1px solid #dfe7f6;
    border-radius: 14px;

    background: #f7faff;
}

.info-icon {
    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);

    font-size: 12px;
    font-weight: 800;
}

.info-card strong {
    font-size: 12px;
}

.info-card p {
    max-width: 900px;

    margin-top: 5px;

    color: #667085;

    font-size: 11px;
    line-height: 1.65;
}

/* EMPTY */

.empty-state {
    padding: 48px;

    color: var(--muted);
    text-align: center;
}

.empty-icon {
    margin-bottom: 10px;
    font-size: 31px;
}

.empty-state h3 {
    color: #374151;
    font-size: 15px;
}

.empty-state p {
    margin-top: 5px;
    font-size: 12px;
}

/* ARCHITECTURE */

.architecture {
    margin: 35px 0;

    padding: 25px;

    border-radius: 17px;

    background: var(--dark);
    color: white;
}

.architecture-title {
    margin-bottom: 20px;

    color: #aeb8ca;

    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.architecture-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.architecture-item {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
}

.architecture-icon {
    margin-bottom: 2px;

    color: #93c5fd;
    font-size: 15px;
    font-weight: 800;
}

.architecture-item strong {
    font-size: 12px;
}

.architecture-item span {
    color: #9ba7bb;
    font-size: 9px;
}

.arrow {
    color: #64748b;
    font-size: 18px;
}

/* FOOTER */

footer {
    padding-bottom: 35px;

    color: #a1a9b8;
    font-size: 10px;

    text-align: center;
}

/* UTILITIES */

.hidden {
    display: none !important;
}

/* MOBILE */

@media (max-width: 850px) {

    .container {
        width: 92%;
    }

    .navbar {
        padding: 0 4%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .file-row {
        align-items: flex-start;
        gap: 15px;
    }

    .file-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .architecture-flow {
        flex-wrap: wrap;
    }
}


@media (max-width: 600px) {

    .navbar {
        height: 68px;
    }

    .connection {
        display: none;
    }

    .hero {
        padding-top: 40px;
    }

    .hero h1 {
        font-size: 38px;
    }

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

    .upload-card {
        padding: 20px;
    }

    .section-heading {
        flex-direction: column;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 13px 18px;
    }

    .documents-header {
        padding: 20px 18px;
    }

    .file-row {
        flex-direction: column;
        padding: 16px 18px;
    }

    .file-left {
        width: 100%;
    }

    .file-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .file-name {
        max-width: 260px;
    }

    .version-panel {
        margin-left: 18px;
        margin-right: 18px;
    }

    .version-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .version-actions {
        width: 100%;
    }

    .upload-controls {
        flex-wrap: wrap;
    }

    .architecture-flow {
        flex-direction: column;
        align-items: flex-start;
    }

    .arrow {
        transform: rotate(90deg);
        margin-left: 8px;
    }
}
