.form-signin {
  max-width: 400px;
  padding: 1rem;
}

.form-signin .form-floating:focus-within {
  z-index: 2;
}

.form-register {
  max-width: 500px;
  padding: 1rem;
}

.form-register .form-floating:focus-within {
  z-index: 2;
}



/* === STRONA REJESTRACJI === */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
}
.auth-card {
    width: 100%;
    max-width: 500px;
}
.auth-box {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.auth-header {
    background: linear-gradient(135deg, #981837 0%, #60112a 100%);
    padding: 32px 24px;
    text-align: center;
}
.auth-header img {
    max-width: 180px;
    max-height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.auth-header-sub {
    color: rgba(255,255,255,0.8);
    font-size: 0.82rem;
    margin-top: 12px;
}
.auth-body {
    padding: 28px 24px;
}
.auth-title {
    font-size: 1rem;
    font-weight: 700;
    color: #141414;
    margin-bottom: 20px;
    text-align: center;
}
.auth-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #adb5bd;
    margin-bottom: 10px;
}
.auth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.auth-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}
.auth-field label span { color: #981837; }
.auth-input {
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.15s;
}
.auth-input:focus { border-color: #981837; }

.auth-input-group {
    display: flex;
    align-items: center;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.auth-input-group:focus-within { border-color: #981837; }
.auth-input-group input,
.auth-input-group select {
    border: none !important;
    border-radius: 0 !important;
    outline: none;
    flex: 1;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    background: transparent;
    box-shadow: none !important;
    min-height: 48px;
}
.auth-input-group .icon {
    padding: 0 12px;
    color: #adb5bd;
    flex-shrink: 0;
}
.auth-input-group .toggle-password {
    padding: 0 12px;
    color: #adb5bd;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-row { display: flex; gap: 8px; }
.auth-row .auth-field { flex: 1; }
.auth-row .auth-field.narrow { flex: 0 0 90px; }
.auth-row .auth-field.narrow-md { flex: 0 0 110px; }

/* Telefon prefix */
.phone-group {
    display: flex;
    align-items: center;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.phone-group:focus-within { border-color: #981837; }
.phone-group .prefix-wrap {
    border-right: 1.5px solid #e9ecef;
    flex-shrink: 0;
    width: 130px;
}
.phone-group input {
    border: none;
    outline: none;
    flex: 1;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-family: inherit;
}
.phone-group .icon {
    padding: 0 12px;
    color: #adb5bd;
}

/* Select2 overrides */
.auth-body .select2-container { width: 100% !important; }
.auth-body .select2-container--bootstrap-5 .select2-selection {
    border: 1.5px solid #e9ecef !important;
    border-radius: 10px !important;
    min-height: 48px !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
}
.auth-body .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.auth-body .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #981837 !important;
    box-shadow: none !important;
}
.phone-group .select2-container { width: 130px !important; }
.phone-group .select2-container--bootstrap-5 .select2-selection {
    border: none !important;
    border-radius: 0 !important;
    border-right: 1.5px solid #e9ecef !important;
    min-height: 48px !important;
}

/* Checkbox */
.auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: #981837;
    flex-shrink: 0;
}
.auth-check label {
    font-size: 0.82rem;
    color: #495057;
}
.auth-check label a { color: #981837; font-weight: 600; text-decoration: none; }

/* Przycisk */
.auth-btn {
    background: linear-gradient(135deg, #981837 0%, #60112a 100%);
    color: #fff;
    border: none;
    border-radius: 8px 0 8px 8px;
    padding: 13px;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
}
.auth-btn:hover { opacity: 0.9; }

/* Linki */
.auth-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}
.auth-links a {
    font-size: 0.82rem;
    color: #981837;
    text-decoration: none;
}
.auth-links a.secondary { color: #6c757d; }
.auth-links a strong { color: #981837; }

/* Stopka */
.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.72rem;
    color: #adb5bd;
}

.auth-desc {
    font-size: 0.82rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-input-code {
    text-align: center;
    letter-spacing: 0.2em;
    font-size: 1.1rem;
}