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

:root {
    /* Dashboard-matching colors */
    --primary-color: #fcdf00;
    --primary-hover: #f5d500;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #e8e8e8;
    --text-secondary: #c0c0c0;
    --text-muted: #909090;
    --border-color: #3a3a3a;
    --background-dark: #0f0f0f;
    --background-black: #000000;
    --card-bg: #181818;
    --card-hover-bg: #202020;
    --accent-subtle: rgba(252, 223, 0, 0.04);
    --accent-border: rgba(220, 220, 220, 0.1);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --card-hover-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--background-dark);
    color: var(--text-primary);
}

/* Background with overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.92);
    z-index: -1;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    z-index: 1;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--accent-border);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: var(--card-shadow);
    animation: slideUp 0.5s ease-out;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    border-radius: 16px;
    z-index: -1;
    pointer-events: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    margin-bottom: 24px;
}

/* Brand row: logo + product name */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Product name typography */
.product-name {
    color: var(--primary-color);
    font-weight: 300;
    font-size: 18px;
    letter-spacing: 0.02em;
    opacity: 0.9;
    border-left: 1px solid var(--border-color);
    padding-left: 12px;
}

.logo[src$="logo.png"]:not([src*="data:"]) + h1::before {
    content: '🔐';
    display: block;
    font-size: 60px;
    margin-bottom: 16px;
}

h1 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(252, 223, 0, 0.1);
    background: rgba(0, 0, 0, 0.4);
}

input::placeholder {
    color: var(--text-muted);
}

/* Button */
.btn-login {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--background-black);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(252, 223, 0, 0.3);
}

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

.btn-login:disabled {
    background: #3a3a3a;
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: var(--background-black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Message */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message.info {
    background: rgba(252, 223, 0, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(252, 223, 0, 0.3);
}

/* Footer */
.footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.info-text {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    h1 {
        font-size: 24px;
    }

    .logo {
        height: 60px;
    }
}
