/* Portal Mayorista - Custom Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portal-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 520px;
    width: 95%;
    overflow: hidden;
}
.portal-header {
    background: linear-gradient(135deg, #ececec 0%, #d2d2d2 100%);
    color: #1e1e1e;
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid #c4c4c4;
}
.portal-header .logo {
    display: block;
    width: auto;
    height: auto;
    /* Was 120x60 → the 660x153 logo rendered at only 120x28 px */
    max-width: min(80%, 340px);
    max-height: 130px;
    object-fit: contain;
    margin: 0 auto 15px;
}
@media (max-width: 480px) {
    .portal-header .logo { max-height: 90px; }
}
.portal-header h1 { font-size: 1.6rem; font-weight: 600; }
.portal-header p { font-size: 0.9rem; color: #4a4a4a; margin-top: 5px; }
.portal-body { padding: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #2b2b2b;
    box-shadow: 0 0 0 2px rgba(43, 43, 43, 0.15);
}
.btn {
    display: inline-block;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}
.btn-lg { width: 100%; font-size: 1.1rem; }
.btn-primary {
    background: #2b2b2b;
    color: #fff;
}
.btn-primary:hover {
    background: #3d3d3d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.btn-outline {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
}
.btn-outline:hover { background: #eee; }
.btn-success { background: #4caf50; color: #fff; }
.btn-success:hover { background: #388e3c; }
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-danger { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-info { background: #f1f1f1; color: #444; border: 1px solid #ddd; }
.text-center { text-align: center; }
.text-muted { color: #999; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.switch-form {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}
.switch-form a { color: #2b2b2b; text-decoration: none; cursor: pointer; }
.switch-form a:hover { text-decoration: underline; }
.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    font-size: 0.85rem;
    color: #999;
}
.divider::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; width: 42%; height: 1px; background: #ddd;
}
.divider::after {
    content: '';
    position: absolute;
    right: 0; top: 50%; width: 42%; height: 1px; background: #ddd;
}
.file-info {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-info .file-icon { font-size: 2rem; }
.file-info .file-name { font-weight: 600; }
.file-info .file-date { font-size: 0.85rem; color: #999; }
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ---- Route cards: new client vs. existing client ---- */
.path-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.path-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.35);
}
.path-card-icon { font-size: 1.9rem; line-height: 1; }
.path-card-text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.path-card-text strong { font-size: 1.2rem; font-weight: 700; letter-spacing: .2px; }
.path-card-text small { font-size: .9rem; line-height: 1.35; opacity: .9; }
.path-card-arrow { font-size: 1.3rem; font-weight: 700; }

/* Option 1 — main path (new registrations) */
.path-card-primary {
    background: #2b2b2b;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    padding: 22px 20px;
}
.path-card-primary:hover { background: #3a3a3a; transform: translateY(-2px); }
.path-card-primary:active { transform: translateY(0); }

/* Option 2 — existing client */
.path-card-secondary {
    background: #fff;
    color: #2b2b2b;
    border-color: #d4d4d4;
}
.path-card-secondary:hover { border-color: #2b2b2b; background: #f5f5f5; }
.path-card-secondary[aria-expanded="true"] { border-color: #2b2b2b; background: #f5f5f5; }
.path-card-secondary[aria-expanded="true"] .path-card-arrow { transform: rotate(180deg); }

.path-hint {
    font-size: .82rem;
    color: #777;
    margin: 8px 2px 0;
}
.path-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #999;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.path-divider::before,
.path-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* Collapsible login panel for existing clients */
.existing-login {
    border: 1px dashed #c9c9c9;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    margin-top: 14px;
}
.existing-login-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}
.existing-login .btn { width: 100%; }

/* ---- Forms ---- */
.form-note { font-size: .85rem; color: #777; }
.req { color: #c62828; font-weight: 700; }

/* Big, easy-to-hit "back" buttons instead of tiny text links */
.btn-back {
    display: inline-block;
    width: 100%;
    padding: 13px 18px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #2b2b2b;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.btn-back:hover { background: #ececec; border-color: #c4c4c4; text-decoration: none; }
.switch-form a { font-size: 1rem; font-weight: 600; }
