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

body {
    display: grid;
    grid-template-rows: auto 1fr auto; /* header - auto, main - растягивается, footer - auto */
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
    font-size: 16px; /* Базовый размер для rem */
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.3125rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.btn-logout {
    background: #2c3e50;
    border: none;
    color: white;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem; /* 20px */
}

footer {
    margin-top: 1.25rem;
    padding: 0.625rem;
    background: #2c3e50;
    color: white;
    text-align: center;
    border-radius: 0.3125rem;
    font-size: 0.875rem; /* 14px */
}

.accounts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0.9375rem;
}

.accounts h2 {
    font-size: 1.125rem; /* 18px */
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.accounts h3 {
    font-size: 0.875rem; /* 14px */
    margin: 0.5rem 0 0.25rem 0;
    color: #34495e;
}

.account-info {
    background: white;
    padding: 1.25rem;
    border-radius: 0.3125rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
}

.account-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
}

.account-info-item ul {
    list-style: none;
    padding-left: 0.5rem;
}

.account-info-item ul li {
    font-size: 0.875rem; /* 14px */
    padding: 0.1875rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.account-info-item ul li:last-child {
    border-bottom: none;
}

.danger {
    color: #e74c3c;
    font-weight: bold;
}

.warning {
    color: #f39c12;
    font-weight: bold;
}

.success {
    color: #27ae60;
    font-weight: bold;
}

.errors {
    background: white;
    padding: 1.25rem;
    border-radius: 0.3125rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
    margin-top: 1.25rem;
}

.errors h3 {
    font-size: 0.875rem; /* 14px */
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.errors ul {
    list-style: none;
    padding-left: 0.5rem;
}

.errors ul li {
    font-size: 0.875rem; /* 14px */
    color: #e74c3c;
    font-weight: bold;
    padding: 0.1875rem 0;
}

.login-form {
    background: white;
    padding: 1.25rem;
    border-radius: 0.3125rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-input {
    display: flex;
    justify-content: space-between;
}

.form-input input {
    width: 75%;
}

.form button {
    margin: 25px auto;
    padding: 1rem 2rem;
    max-width: 50%;
    background: #2c3e50;
    border: none;
    border-radius: 0.3125rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
    color: white;
}

.login {
    margin: auto;
    max-width: 500px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .accounts {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .accounts {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .accounts {
        grid-template-columns: 1fr;
    }

    body {
        padding: 10px;
    }

    .account-info {
        padding: 0.9375rem;
    }
}