/* ============================================
   PushAdBid - Authentication Pages
   Premium Compact Design
   ============================================ */

.auth-section {
    padding: 48px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.auth-card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    animation: authFadeIn 0.4s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header ---- */
.auth-header {
    padding: 32px 32px 0;
    text-align: center;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #2563eb;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.auth-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ---- Body ---- */
.auth-body {
    padding: 24px 32px 32px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* ---- Role cards ---- */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    user-select: none;
}

.role-card i {
    font-size: 20px;
    margin-bottom: 2px;
}

.role-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-check:checked + .role-advertiser {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.btn-check:checked + .role-publisher {
    border-color: #10b981;
    background: #ecfdf5;
    color: #10b981;
}

/* ---- Inputs ---- */
.auth-input {
    padding: 11px 14px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    color: #111827;
    transition: all 0.2s ease;
}

.auth-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.auth-input::placeholder {
    color: #9ca3af;
}

select.auth-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ---- Password input group ---- */
.auth-input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.btn-toggle-pw {
    border: 1px solid #e5e7eb;
    border-left: 0;
    background: #fafafa;
    color: #6b7280;
    padding: 0 14px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    transition: all 0.2s ease;
}

.btn-toggle-pw:hover {
    background: #f3f4f6;
    color: #111827;
}

.input-group:focus-within .btn-toggle-pw {
    border-color: #2563eb;
    background: #fff;
}

/* ---- Password strength ---- */
.password-strength-track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    background: #e5e7eb;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

/* ---- Terms ---- */
.auth-terms {
    font-size: 13px;
}

.auth-terms .form-check-label {
    color: #6b7280;
}

.auth-terms .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* ---- Submit button ---- */
.btn-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.1px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ---- Footer note ---- */
.auth-footer-note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.auth-footer-note i {
    margin-right: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 575.98px) {
    .auth-section { padding: 24px 0; }
    .auth-header  { padding: 24px 20px 0; }
    .auth-body    { padding: 20px 20px 24px; }
    .auth-title   { font-size: 20px; }
    .role-card    { padding: 12px 6px; font-size: 13px; }
    .role-card i  { font-size: 18px; }
}

/* ---- Country flag image ---- */
.country-flag-img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Country Custom Select (Flag inside dropdown)
   ============================================ */

.country-wrapper {
    position: relative;
    width: 100%;
}

/* Invisible actual select — still functional */
.country-select {
    position: relative;
    width: 100% !important;
    padding: 11px 40px 11px 14px !important;
    background: #fafafa !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: transparent !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s ease;
    z-index: 2;
}

.country-select:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none;
}

/* Native dropdown options — visible */
.country-select option {
    color: #111827 !important;
    background: #ffffff !important;
    padding: 8px;
}

/* Visible display overlaid on top */
.country-display {
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 40px 0 14px;
    pointer-events: none;
    font-size: 14px;
    color: #111827;
    border-radius: 10px;
    background: #fafafa;
    z-index: 3;
    transition: background 0.2s ease;
}

.country-wrapper:focus-within .country-display {
    background: #ffffff;
}

.country-display .country-flag-img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.country-display #countryText.placeholder {
    color: #9ca3af;
}

/* Chevron arrow */
.country-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 12px;
    pointer-events: none;
    z-index: 4;
    transition: color 0.2s ease;
}

.country-wrapper:focus-within .country-chevron {
    color: #2563eb;
}

/* ============================================
   Forgot Password / Reset Password
   ============================================ */

.auth-instruction {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 20px 0;
}

/* Success State */
.reset-success {
    text-align: center;
    padding: 8px 0;
}

.reset-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.reset-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.reset-success-text {
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
    margin: 0 0 20px 0;
}

.reset-success-note {
    font-size: 13px;
    line-height: 1.6;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
    display: flex;
    align-items: flex-start;
}

.reset-success-note i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ============================================
   Reset Password — Error States
   ============================================ */

.reset-error-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #dc2626 !important;
}

.reset-error-note {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

/* ============================================
   Secondary Button (Outline Style)
   ============================================ */
.btn-auth-secondary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 20px !important;
    background: transparent !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.1px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-auth-secondary:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}