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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.login-body {
    padding: 0;
    overflow: hidden;
}

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

/* ─── Header ─────────────────────────────────────────────────────────────── */

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.username-badge {
    color: rgba(255,255,255,0.85);
    font-size: 0.95em;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.35);
}

/* ─── Server cards ───────────────────────────────────────────────────────── */

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.server-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.server-card h2 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 10px;
}

.server-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    flex: 1;
    min-width: 140px;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-spire {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.btn-spire:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
}

.btn-peq {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}
.btn-peq:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: scale(1.05);
}

.btn-db {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}
.btn-db:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    transform: scale(1.05);
}

.btn-files {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
}
.btn-files:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    transform: scale(1.05);
}

.btn-rebuild {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}
.btn-rebuild:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    transform: scale(1.05);
}
.btn-rebuild:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ─── Login page ─────────────────────────────────────────────────────────── */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1040 0%, #2d1b69 50%, #3d2490 100%);
    position: relative;
    overflow: hidden;
}

.login-bg-text {
    position: absolute;
    font-size: 38vw;
    font-weight: 800;
    color: rgba(255,255,255,0.025);
    letter-spacing: -0.05em;
    user-select: none;
    pointer-events: none;
    line-height: 1;
    right: -5vw;
    bottom: -10vw;
}

.login-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 28px;
    padding: 52px 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    font-size: 3.6em;
    margin-bottom: 14px;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(150,100,255,0.5));
}

.login-header h1 {
    font-size: 1.75em;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: rgba(255,255,255,0.55);
    font-size: 0.9em;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8em;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-group input {
    padding: 14px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 1em;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.3);
}

.form-group input:focus {
    border-color: rgba(150,100,255,0.7);
    background: rgba(255,255,255,0.12);
}

.error-msg {
    background: rgba(220,38,38,0.2);
    border: 1px solid rgba(220,38,38,0.4);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88em;
    text-align: center;
}

.btn-login {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 6px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.btn-login:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(124,58,237,0.6);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 0.78em;
    margin-top: 28px;
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95em;
    opacity: 0;
    transition: all 0.35s ease;
    z-index: 9999;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #065f46;
    color: #d1fae5;
    box-shadow: 0 4px 20px rgba(6,95,70,0.4);
}

.toast-error {
    background: #7f1d1d;
    color: #fee2e2;
    box-shadow: 0 4px 20px rgba(127,29,29,0.4);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    header h1 { font-size: 2em; }
    .servers-grid { grid-template-columns: 1fr; }
    .links { flex-direction: column; }
    .btn { min-width: 100%; }
    .login-card { padding: 36px 28px; margin: 20px; }
}
