:root {
    --bg-start: #f3f6fb;
    --bg-end: #dde8f5;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #0f766e;
    --accent-hover: #0d5f59;
    --border: #dbe4f0;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background: radial-gradient(circle at 20% 20%, #ffffff 0%, transparent 32%),
                linear-gradient(160deg, var(--bg-start), var(--bg-end));
}

.home-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.home-logo-shell {
    display: grid;
    place-items: center;
    width: min(100%, 720px);
    min-height: 280px;
    padding: 32px;
}

.home-logo {
    display: block;
    width: min(100%, 360px);
    height: auto;
    object-fit: contain;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.login-card__header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.login-card__header p {
    margin: 8px 0 0;
    color: var(--text-secondary);
}

.login-form {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.alert {
    margin: 16px 0 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 600;
}

.alert--error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.alert--success {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}

.login-form label {
    font-weight: 600;
}

.login-form input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    font-size: 1rem;
}

.login-form input:focus {
    outline: 2px solid rgba(15, 118, 110, 0.3);
    border-color: var(--accent);
}

.login-form button {
    border: none;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--accent);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-form button:hover {
    background: var(--accent-hover);
}

.login-note {
    margin-top: 14px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.products-page {
    min-height: 100vh;
    padding: 28px;
}

.products-shell {
    width: min(100%, 1080px);
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.products-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.products-header p {
    margin: 6px 0 0;
    color: var(--text-secondary);
}

.logout-btn {
    display: inline-block;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-primary);
    background: #f8fafc;
    padding: 10px 14px;
    font-weight: 700;
}

.logout-btn:hover {
    background: #eef2f7;
}

.products-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.products-table th,
.products-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #edf2f7;
}

.products-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #334155;
    letter-spacing: 0.04em;
}

.empty-row {
    text-align: center;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .login-card {
        padding: 22px;
        border-radius: 16px;
    }

    .home-logo-shell {
        min-height: 220px;
        padding: 20px;
    }

    .home-logo {
        width: min(100%, 260px);
    }

    .products-page {
        padding: 16px;
    }

    .products-shell {
        padding: 14px;
        border-radius: 14px;
    }
}
