/* ── Login Overlay Styles ── */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-overlay.hidden {
    display: none;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin: -32px -32px 24px;
    padding: 24px 32px 16px;
    background: #000;
    border-radius: 16px 16px 0 0;
}
.login-logo {
    width: min(280px, 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.login-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}


.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Auth brand override: use white horizontal logo only */
.login-header .login-logo {
    width: min(280px, 80%);
    height: auto;
    border-radius: 0;
    overflow: visible;
}

.login-header .login-logo img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-header h1 {
    display: none;
}

.login-form .input-group {
    margin-bottom: 16px;
}

.login-form .input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.login-form .input-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.login-form .input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: all 0.2s;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    color: var(--danger);
    font-size: 13px;
    display: none;
}

.login-error.visible {
    display: block;
}

.login-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success, #22c55e);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    color: var(--success, #22c55e);
    font-size: 13px;
    display: none;
}

.login-success.visible {
    display: block;
}

.login-toggle {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-toggle a {
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.login-toggle a:hover {
    text-decoration: underline;
}

/* Auth overlay/card color overrides (isolated to reduce merge conflicts) */
.login-overlay {
    background: var(--bg-card);
}

.login-overlay .login-card {
    background: #000;
}

/* Auth header brand overrides (isolated to reduce merge conflicts) */
.login-card .login-header {
    margin: -32px -32px 24px;
    padding: 24px 32px 16px;
    background: #000;
    border-radius: 16px 16px 0 0;
}

.login-card .login-header .login-logo {
    width: min(280px, 80%);
    height: auto;
    border-radius: 0;
    overflow: visible;
}

.login-card .login-header .login-logo img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-card .login-header h1 {
    display: none;
}

.signup-form .input-row {
    display: flex;
    gap: 12px;
}

.signup-form .input-row .input-group {
    flex: 1;
}

.signup-form .input-group {
    margin-bottom: 14px;
}

.signup-form .input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.signup-form .input-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.signup-form .input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Profile Modal */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.profile-modal-overlay.hidden {
    display: none;
}

.profile-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.profile-modal h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.profile-modal .input-group {
    margin-bottom: 14px;
}

.profile-modal .input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.profile-modal .input-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.profile-modal .input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.profile-modal .input-row {
    display: flex;
    gap: 12px;
}

.profile-modal .input-row .input-group {
    flex: 1;
}

.profile-modal .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Company autocomplete dropdown */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.autocomplete-dropdown.hidden {
    display: none;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.15s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--accent);
    color: #fff;
}

.autocomplete-item .company-match {
    font-weight: 600;
}

.autocomplete-item .company-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.autocomplete-item:hover .company-hint,
.autocomplete-item.active .company-hint {
    color: rgba(255,255,255,0.7);
}

/* Team members section in profile */
.team-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.team-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.team-member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.team-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.team-member-info {
    flex: 1;
    min-width: 0;
}

.team-member-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.team-member-email {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0;
}

/* User menu in header */
.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.user-badge .role {
    font-size: 9px;
    padding: 2px 6px;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.logout-btn {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

