/* ================================================================== */
/* Base & Reset                                                         */
/* ================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    min-height: 100vh;
    padding: 40px 20px;
}

/* ================================================================== */
/* Layout                                                               */
/* ================================================================== */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    width: 100%;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

/* ================================================================== */
/* Header                                                               */
/* ================================================================== */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2em;
    color: #f0a500;
    letter-spacing: 2px;
}

header p {
    color: #8b949e;
    margin-top: 6px;
    font-size: 0.95em;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 1.8em;
    color: #f0a500;
}

.login-header p {
    color: #8b949e;
    margin-top: 6px;
    font-size: 0.9em;
}

.login-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

/* ================================================================== */
/* Cards                                                                */
/* ================================================================== */
.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 22px;
}

.card h2 {
    color: #f0a500;
    font-size: 1.15em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

/* ================================================================== */
/* Top Bar                                                              */
/* ================================================================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding: 10px 15px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 0.9em;
}

.top-bar span { color: #8b949e; }
.top-bar strong { color: #f0a500; }

/* ================================================================== */
/* Forms                                                                */
/* ================================================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.82em;
    color: #8b949e;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 13px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 1em;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #f0a500;
}

/* ================================================================== */
/* Buttons                                                              */
/* ================================================================== */
.btn {
    display: block;
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-primary {
    background: #f0a500;
    color: #0d1117;
}

.btn-primary:hover {
    background: #d4920a;
}

.btn-danger {
    background: #da3633;
    color: #fff;
}

.btn-danger:hover {
    background: #b22a28;
}

.btn-sm {
    display: inline-block;
    width: auto;
    padding: 5px 14px;
    font-size: 0.85em;
    margin-top: 0;
}

/* ================================================================== */
/* Alerts                                                               */
/* ================================================================== */
.alert {
    padding: 13px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.92em;
}

.alert-error {
    background: #2d1117;
    border: 1px solid #da3633;
    color: #f85149;
}

.alert-success {
    background: #0d2117;
    border: 1px solid #3fb950;
    color: #3fb950;
}

/* ================================================================== */
/* Upload Area                                                           */
/* ================================================================== */
.upload-area {
    border: 2px dashed #30363d;
    border-radius: 8px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 18px;
}

.upload-area:hover {
    border-color: #f0a500;
    background: #0d1117;
}

.upload-area.has-file {
    border-color: #3fb950;
    background: #0d1117;
}

.upload-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.upload-area p {
    color: #8b949e;
    font-size: 0.88em;
    margin-top: 5px;
}

.upload-area .click-label {
    color: #f0a500;
    font-size: 1.05em;
    font-weight: bold;
}

#file-name {
    margin-top: 8px;
    font-size: 0.88em;
    color: #3fb950;
    font-weight: bold;
    min-height: 1.2em;
}

input[type="file"] {
    display: none;
}

/* ================================================================== */
/* Stats Grid                                                            */
/* ================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.stat-box {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px 10px;
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.75em;
    color: #8b949e;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-total    { color: #79c0ff; }
.color-inserted { color: #3fb950; }
.color-skipped  { color: #f0a500; }
.color-errors   { color: #f85149; }

/* ================================================================== */
/* Message Log                                                           */
/* ================================================================== */
.log-title {
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
    margin-bottom: 8px;
    margin-top: 16px;
}

.message-log {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px 14px;
    max-height: 220px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.82em;
}

.message-log p {
    padding: 3px 0;
    color: #8b949e;
    border-bottom: 1px solid #161b22;
}

.message-log p:last-child {
    border-bottom: none;
}

/* ================================================================== */
/* Tips Box                                                              */
/* ================================================================== */
.tips {
    font-size: 0.85em;
    color: #8b949e;
}

.tips ul {
    padding-left: 18px;
}

.tips li {
    margin-bottom: 5px;
    line-height: 1.5;
}
