:root {
    --primary-color: #0b4d91;
    --secondary-color: #f5f7fa;
    --text-color: #333333;
    --border-color: #d0d7de;
    --danger-color: #c0392b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.main-header, .main-footer {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.main-footer {
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    font-size: 0.9rem;
    color: #666666;
}

.main-header h1 {
    margin: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-logo {
    max-height: 60px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.main-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.main-nav a:hover {
    text-decoration: underline;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0rem;
    text-align: center;
}

.footer-logo {
    max-height: 60px;
    width: auto;
}

.card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.card h2 {
    margin-top: 0;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.form-help {
    display: block;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    color: #555555;
    font-size: 0.85rem;
}

input[type="file"] {
    margin-bottom: 1rem;
}

button,
input[type="submit"] {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
}

button.danger,
input[type="submit"].danger {
    background-color: var(--danger-color);
}

button:disabled,
input[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.table th {
    background-color: #f0f3f7;
}

.table .repo-name,
.table th.repo-name {
    font-size: 0.95rem;
    word-break: break-all;
    max-width: 260px;
    white-space: normal;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert.error {
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    color: #a71d2a;
}

.alert.success {
    background-color: #eafaf1;
    border: 1px solid #c7eed8;
    color: #1e7e34;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.qr-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.qr-item img,
.qr-item canvas {
    max-width: 150px;
    height: auto;
    margin: 0 auto 0.5rem;
}

body.landing {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

a.button {
    display: inline-block;
    background-color: #2ecc71;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}

a.button:hover {
    background-color: #27ae60;
}

.table-responsive {
    overflow-x: auto;
}

ul {
    padding-left: 1.2rem;
}

.card ul {
    margin: 0.5rem 0 0;
}

.page-logo-bottom-right {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    max-width: 180px;
    width: 30vw;
    height: auto;
    z-index: 1000;
}

@media (max-width: 900px) {
    .container {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-brand {
        width: 100%;
    }

    .main-header h1 {
        font-size: 1.5rem;
    }

    .main-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .main-nav a {
        display: inline-block;
        padding: 0.45rem 0.5rem;
        border-radius: 6px;
        background-color: rgba(11, 77, 145, 0.08);
    }
}

@media (max-width: 600px) {
    body {
        font-size: 0.95rem;
    }

    .container {
        padding: 0.85rem;
    }

    .card {
        padding: 1.1rem;
    }

    .main-header,
    .main-footer {
        text-align: center;
    }

    .header-content {
        gap: 0.75rem;
        align-items: center;
    }

    .main-nav {
        justify-content: center;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
    }

    .table th,
    .table td {
        padding: 0.6rem;
        font-size: 0.95rem;
    }

    .table .repo-name,
    .table th.repo-name {
        max-width: 180px;
    }
    
    .header-logo,
    .footer-logo {
        max-height: 48px;
    }

    .page-logo-bottom-right {
        max-width: 120px;
        right: 0.75rem;
        bottom: 0.75rem;
    }
}