html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #e2e8f0;
    color: #1e293b;
    margin: 0;
    padding: 0;
    text-align: center;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 14px 24px;
    border: 1px solid #e2e8f0;
    border-top: none;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-center h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.5px;
}

.logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.user {
    color: #334155;
    font-weight: 600;
    font-size: 15px;
}

.logout-btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
}

.logout-btn:hover {
    background: #1d4ed8;
    color: #020617;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    max-width: 60%;
    margin: 0 auto;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

nav a {
    padding: 10px 18px;
    margin: 0;
    font-size: 16px;
    border-radius: 8px;
    color: #2563eb;
    font-weight: 600;
    transition: 0.2s ease;
}

nav a:hover {
    background: #e0f2fe;
    color: #1d4ed8;
}

.auth-box {
    width: 320px;
    margin: 80px auto;
    padding: 25px;
    background: #dbeafe;
	border: 1px solid #93c5fd;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.auth-box h2 {
    margin-top: 0;
}

.auth-box input {
    width: 90%;
}

.auth-box button {
    width: 95%;
}

h1 {
    margin: 0;
}

h2 {
    color: #2563eb;
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 28px;
}

h3 {
    color: #475569;
    margin-top: 22px;
}

a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: #1d4ed8;
}

.stat-link {
	margin: 0 15px;
}

table {
    margin: 20px auto;
    border-collapse: collapse;
    width: 95%;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

th {
    background: #f1f5f9;
    color: #1e293b;
    padding: 14px 12px;
    text-align: center;
    font-size: 15px;
}

td {
    padding: 12px 10px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 14px;
}

th a {
    color: #7dd3fc;
    font-weight: 700;
}

tr:hover {
    background: #f8fafc;
}

form {
    margin: 18px auto;
    padding: 10px;
}

input,
select {
    padding: 10px 12px;
    margin: 6px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    outline: none;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
}

button {
    padding: 10px 16px;
    margin: 6px;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s ease;
}

button:hover {
    background: #1d4ed8;
}

.success {
    color: #16a34a;
    font-weight: bold;
}

.fail {
    color: #dc2626;
    font-weight: bold;
}

ul {
    padding: 0;
    margin: 10px 0;
}

ul li {
    list-style-type: none;
    margin: 6px 0;
}

hr {
    border: none;
    height: 1px;
    background: #e2e8f0;
    width: 88%;
    margin: 20px auto;
}

@media (max-width: 900px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        max-width: 100%;
        border-radius: 0;
    }

    .header-left,
    .header-center,
    .header-right {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .header-center h1 {
        font-size: 22px;
        text-align: center;
    }

    .header-right {
        gap: 10px;
    }

    .logo {
        width: 42px;
        height: 42px;
    }

    nav {
        max-width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
        border-radius: 0;
    }

    nav a {
        padding: 8px 16px;
        font-size: 14px;
    }

    table {
		width: 95%;
		font-size: 13px;
		display: table;
		overflow-x: auto;
		border-radius: 10px;
	}

    th,
    td {
		white-space: nowrap;
		text-align: center;
        padding: 10px 8px;
    }

    form {
        width: 95%;
        margin: 12px auto;
    }

    input,
    select,
    button {
        width: 100%;
        max-width: 420px;
        display: block;
        margin: 8px auto;
        box-sizing: border-box;
    }

    .logout-btn {
        width: auto;
        display: inline-block;
    }

    .stat-link {
        display: inline-block;
        margin: 6px 8px;
    }

    hr {
        width: 95%;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .header-center h1 {
        font-size: 20px;
    }

    nav a {
        width: calc(50% - 12px);
        box-sizing: border-box;
        text-align: center;
    }

    table {
        width: 100%;
        font-size: 12px;
    }

    th,
    td {
        padding: 8px 6px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 18px;
    }
}